I saw the helpful posts from Dec 2004 on censored regression - I have a related question.
I've copied the text below from the substituted coefficients section of 'representations' view for a Tobit estimation left censored at zero - with extreme value errors.
NEET_MONTHS = 0*@CEXTREME((0 - I_NEET_MONTHS)/15.9) + (1-@CEXTREME((0 - I_NEET_MONTHS)/15.9)>0)*(I_NEET_MONTHS*(1-@CEXTREME((0 - I_NEET_MONTHS)/15.9))+15.9*(@DIGAMMA(1)-(@DIGAMMA(1)*@GAMMAINC(@EXP((0 - I_NEET_MONTHS)/15.9),1)+@GAMMAINCDER(@EXP((0 - I_NEET_MONTHS)/15.9),1,2))))
Eviews 7.0.
My immediate question, hopefully a quick one, is: "Why is there a >0 in my second @CEXTREME command, and what does this mean?"
I want to convert the above description into an actual equation (in order to take partial derivative) - since most of my DIGAMMAs and variables going into GAMMAINCDER collapse to '1', this is simpler than it might be. But I need to understand the greater than command first. In all the helpfiles, it suggests cumdists are the usual functions with a single input value - I can't see how a 'greater than' command makes sense at this point in the estimation.
Many thanks
Christian
Interpreting estimation output in censored regression
Moderators: EViews Gareth, EViews Moderator
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Interpreting estimation output in censored regression
It's a computational term that ensures that the probability of observation is > 0 when we evaluate the term on the right. It's easier to see what is going on when we have a simple Tobit model. Then you'll get a representations view that is something like.
Y=0*@CNORM((0 - i_Y)/C(3)) + (1-@CNORM((0 - i_Y)/C(3))>0)*(i_Y*(1-@CNORM((0 - i_Y)/C(3)))+C(3)*(@DNORM((0 - i_Y)/C(3))))
Ignoring the first term with 0 which is for the censored observations, the term with the > 0 which is the one we are talking about, and letting the probability of observation be just P you'll see we have the usual contribution to the censored expectation of
p*(i_y + c(3)*mills)
which is (generally) equal to
p*(i_y + c(3)*@dnorm/p) = i_y*p + c(3)*@dnorm
The expression on the right is the basic component of interest in the representations view. What we've done on the right is to push the p=1-@cnorm term into the term in parentheses on the left. Note however that if the p=0, this is problematic since we have 0 times the infinity in the Mills ratio term (which has the probability in the denominator) which is undefined (and which we cannot evaluate). In terms of the logic of the model, however, we can collapse the distribution down to the one-point distribution with probability mass at the censoring point, in which case we don't need to evaluate the term on the right at all. So to allow for this numeric possibility, we use premultiplication by a (0, 1) )indicator variable (which is what the term involving ">" is) for whether the probability is non-zero,
(1-@CNORM((0 - i_Y)/C(3))>0
to assign the appropriate weight. Multiplying by this indicator indicates whether to add the second term or not. The second term is added only if the probability of observation is non-zero.
Y=0*@CNORM((0 - i_Y)/C(3)) + (1-@CNORM((0 - i_Y)/C(3))>0)*(i_Y*(1-@CNORM((0 - i_Y)/C(3)))+C(3)*(@DNORM((0 - i_Y)/C(3))))
Ignoring the first term with 0 which is for the censored observations, the term with the > 0 which is the one we are talking about, and letting the probability of observation be just P you'll see we have the usual contribution to the censored expectation of
p*(i_y + c(3)*mills)
which is (generally) equal to
p*(i_y + c(3)*@dnorm/p) = i_y*p + c(3)*@dnorm
The expression on the right is the basic component of interest in the representations view. What we've done on the right is to push the p=1-@cnorm term into the term in parentheses on the left. Note however that if the p=0, this is problematic since we have 0 times the infinity in the Mills ratio term (which has the probability in the denominator) which is undefined (and which we cannot evaluate). In terms of the logic of the model, however, we can collapse the distribution down to the one-point distribution with probability mass at the censoring point, in which case we don't need to evaluate the term on the right at all. So to allow for this numeric possibility, we use premultiplication by a (0, 1) )indicator variable (which is what the term involving ">" is) for whether the probability is non-zero,
(1-@CNORM((0 - i_Y)/C(3))>0
to assign the appropriate weight. Multiplying by this indicator indicates whether to add the second term or not. The second term is added only if the probability of observation is non-zero.
Re: Interpreting estimation output in censored regression
That's very helpful, thank you. So from an analytic partial derivative perspective I do not need to include the > 0.
My initial optimism has foundered though - I can't find a convenient analytic representation of the first derivative (with respect to a) of the incomplete gamma function - which means I can't represent the full equation above and then take partial derivative of it. It is made simpler after taking the derivative because the 'a' in question is '1', but that doesn't help during the calculation of the derivative formula (in the approach I'm trying anyway).
Any ideas for this?
End goal is the usual one about marginal effect of a change in an independent variable on the conditional mean of the latent DV, conditional on being observed. I can do this with 'normal' errors, but not with Gumbel errors as above.
I'm also thrown by the gammainc definition in Eviews which appears to be the definition of the lower incomplete gamma function, divided by the Gamma function in a, as opposed to the standard definition of the incomplete gamma function. Am I missing something simple here?
Thanks again!
My initial optimism has foundered though - I can't find a convenient analytic representation of the first derivative (with respect to a) of the incomplete gamma function - which means I can't represent the full equation above and then take partial derivative of it. It is made simpler after taking the derivative because the 'a' in question is '1', but that doesn't help during the calculation of the derivative formula (in the approach I'm trying anyway).
Any ideas for this?
End goal is the usual one about marginal effect of a change in an independent variable on the conditional mean of the latent DV, conditional on being observed. I can do this with 'normal' errors, but not with Gumbel errors as above.
I'm also thrown by the gammainc definition in Eviews which appears to be the definition of the lower incomplete gamma function, divided by the Gamma function in a, as opposed to the standard definition of the incomplete gamma function. Am I missing something simple here?
Thanks again!
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Interpreting estimation output in censored regression
It's the lower ratio. I'm rusty on my special functions but I'm pretty certain that it was specified this way since we had a series or continued fraction expansion algorithm to compute the incomplete gamma ratio.
It sounds like you are doing this outside of EViews? I think the closest you'll get to an analytic is one involving the derivatives of the expansion, or a numeric evaluation of the derivative.
There is a reason that most people do this with the normal :)
It sounds like you are doing this outside of EViews? I think the closest you'll get to an analytic is one involving the derivatives of the expansion, or a numeric evaluation of the derivative.
There is a reason that most people do this with the normal :)
Re: Interpreting estimation output in censored regression
Hi all, can someone please tell me how do I calculate the marginal effect for an independent variable (say x) for the observed variable (say y) in a censored regression model using eviews?
Who is online
Users browsing this forum: No registered users and 2 guests
