Page 1 of 1

Inverse Mills Ratio

Posted: Fri Sep 19, 2008 12:15 pm
by Effiezal
Hi Guys

Efi here. Need some dear help.

I need to know how to calculate the inverse Mill ratio which is the the ratio of the probability density function over the cumulative distribution function of a distribution.

I have no idea on HOW to retrieve the

1. Probability density function
2. Cumulative distribution function

from an estimation regression, and in this case it is a logit/probit.

Please help.

Kind regards

Efi.

Posted: Fri Sep 19, 2008 1:41 pm
by EViews Gareth
There are two methods to calculate the Inverse Mills Ratio from an equation.

The first is to use fitted values from the equation, and calculate the PDF and CDF from them:

Code: Select all

eq01.fit(d) xb series imills1 = @dnorm(-xb)/(1-@cnorm(-xb))
The second method is to use the ordinary and generalised residuals:

Code: Select all

eq01.makeresid ordinary eq01.makeresid(g) general eq01.fit yprob series imills2 = general*(1-yprob)/ordinary

Thank you

Posted: Fri Sep 19, 2008 10:00 pm
by Effiezal
Hi Gareth

Thank you so much.

Finally!

Thank you again.

Rgds

Efi.

Re: Inverse Mills Ratio

Posted: Tue Apr 12, 2011 12:02 pm
by Kanykei
:roll:

It seems that I am really stupid, but I couldn't understand the previous post. So, dear Gareth and Effiezal could you explain please how this Mills ratio is calculated in eviews?

Thank you in advance,
Regards,
kanykei

Re: Inverse Mills Ratio

Posted: Wed Mar 18, 2015 9:07 am
by joshchipunza
Guys I am looking for someone who can assist me in providing the step to follow when estimating the OLS regression including the Inverse Mills ratio as an independent variable. Thus far, I have used Eviews 8 which can automatically estimate the Heckman's two step procedure without having to use the probit mode (if I am right). But now I do not know what to do after I estimate the Heckman's two step procedure because I want to incorporate the Inverse Mills ratio in the OLS regression using panel data method. Can someone help me!

Re: Inverse Mills Ratio

Posted: Wed Mar 18, 2015 9:22 am
by joshchipunza
Hi Gareth

I am trying to estimate following equations:
Liquidity/Volatility Measurei,t = α + βDi,t + ΣθFi,t + γλi,t +εi,
where "γλi,t "is the inverse Mills ratio.
So how do I estimate the Inverse Mills ratio using eviews 8 because thus far I have estimated the Heckman's two step procedure but I am stuck on how I can estimate the Inverse Mills and then include in the OLS regression above. Your help will be greatly appreciated

Re: Inverse Mills Ratio

Posted: Wed Mar 18, 2015 2:28 pm
by trubador
I am not sure as to why coefficient of inverse mills ratio is left out, but the estimation takes it into account. So it is already incorporated in the results shown in the output from Heckman 2-step estimation. You'll need to do both steps explicitly to get the estimated coefficient. In the first step, you should estimate a Probit model and then compute the inverse Mill's ratio for further use (see Gareth's code above).

Re: Inverse Mills Ratio

Posted: Wed Mar 18, 2015 3:03 pm
by joshchipunza
Thank you for the response Trubador.
However, I am still unclear about how I go about it after I estimate the probit model. In other words, should I use the codes provided by Gareth? If that is the case then it appears not to be working because it give sme a feedback that the equation is not defined. I do not know whether you can provide a step by step procedure which I can follow. Thank you very much.

Re: Inverse Mills Ratio

Posted: Thu Mar 19, 2015 1:28 am
by trubador
That is probably because in the code above, Gareth refers to an equation named "eq01". If you give the exact same name to "your" equation, then the code should work seamlessly. If you assign a different name, say "myeq", then you should adjust the code accordingly:

Code: Select all

myeq.fit(d) xb

Re: Inverse Mills Ratio

Posted: Thu Mar 19, 2015 1:33 am
by joshchipunza
HI Gaareth
How do i use fitted values from an equation in Eviews 8 after estimating the probit model. according to your instructions we are supposed to use the fitted values from the estimated probit model and thereafter calculate the Inverse Mills ratio using the codes you provided.
Again, i do not know the commands required to program in Eviews 8. Is it possible that you can show me where to go and how to do it. Thank you for you response. :wink:

Re: Inverse Mills Ratio

Posted: Thu Mar 19, 2015 7:49 am
by EViews Gareth
The commands are in the post in this thread...