Hello,

How does Stata calculate the Inverse Mill Ratio (IMR)?

Here I got different values from the Stata post-estimation option
and the direct calculation of the ratio.

Please check the following:

Here we can get the values of IMR in
.

Now let's calculate it directly:

probit married children age education

predict xx, xb

gen pdf=normalden(xx)

gen cdf=normal(xx)

gen millrat=pdf/cdf

replace millrat=pdf/(cdf-1) if married==0

Here, we get IMR in
.

Now if we look at estimated
and
together using the following command, they look different.

Does anyone know what is wrong?

Best regards,

Hossein

How does Stata calculate the Inverse Mill Ratio (IMR)?

Here I got different values from the Stata post-estimation option

mills(lambda)

Please check the following:

webuse womenwk,clear reg wage education age married heckman wage education age married, select(married children age education) twostep mills(lambda)

lambda

Now let's calculate it directly:

probit married children age education

predict xx, xb

gen pdf=normalden(xx)

gen cdf=normal(xx)

gen millrat=pdf/cdf

replace millrat=pdf/(cdf-1) if married==0

millrat

Now if we look at estimated

millrat

lambda

edit millrat lambda

Does anyone know what is wrong?

Best regards,

Hossein

## Comment