Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: RE: adjust after heckman

From   "Christer Thrane" <>
To   <>
Subject   st: Re: RE: adjust after heckman
Date   Fri, 7 Apr 2006 18:08:21 +0200

Thanks, Scott!

That worked nicely. I have a short follow-up, though.

Is it also possible, using your code, to set weight and length to specific values, and not only their means?

Thanks again,

----- Original Message ----- From: "Scott Merryman" <>
To: <>
Sent: Friday, April 07, 2006 5:53 PM
Subject: st: RE: adjust after heckman

Unfortunately, -adjust- does not have predict option, but you can
-preserve-, -replace-, and -predict, ycond-.

The following generates the conditional expectation for 5 values of mpg with
the other variables at their means.

sysuse auto
qui heckman price mpg weight length , select(fore = trunk )
foreach v of varlist weight trunk length {
sum `v', meanonly
replace `v' = r(mean)
forv i = 10(10)50 {
replace mpg = `i'
predict ycond_`i', ycond
tabstat ycond*, stat(mean)


-----Original Message-----
From: [mailto:owner-] On Behalf Of Christer Thrane
Sent: Friday, April 07, 2006 9:22 AM
Subject: st: adjust after heckman


Normally I use adjust (after -regress-) to predict the mean earnings for
variuos combinations of my indeps.
When doing this for -heckman- I suspect that adjust produces the
for the "latent" mean earnings
(ie regardless of if a person actually is employed or not). However, I
to get the mean earnings for the
variuos combinations of my indeps, condtitional on being employed (ie

How do I do this?

Best regards,

Christer Thrane

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index