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" <[email protected]>
To   <[email protected]>
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,

Christer
----- Original Message ----- From: "Scott Merryman" <[email protected]>
To: <[email protected]>
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
preserve
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)
restore


Scott




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

Hi,

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
prediction
for the "latent" mean earnings
(ie regardless of if a person actually is employed or not). However, I
want
to get the mean earnings for the
variuos combinations of my indeps, condtitional on being employed (ie
being
observed).

How do I do this?

Best regards,

Christer Thrane


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/




*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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