Statalist The Stata Listserver


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

st: Regression and "what-if" predictions


From   "Christer Thrane" <[email protected]>
To   <[email protected]>
Subject   st: Regression and "what-if" predictions
Date   Fri, 25 Aug 2006 18:02:07 +0200

Hi,

The variables in my panel regression model are:

logwage (log of annual wage)
male (male=1, female=0)
edlevel (5 levels of education)
exp (working experience)
expsq (working experience squared)
year (1994=0, 1995=1, ... 2002=8)
married (married=1, unmarried=0)
nrchild (number of children)

The first prediction I'm interested in is the:

(i) log wage for a married male with edlevel = 3 in 2002 with average number of children and working experience.

To obtain this, I use the code:

xi: xtreg logwage i.edlevel exp expsq year /*

*/ married nrchild if male==1, re cluster (lpnr)
and

adjust _Iedlevel_2=0 _Iedlevel_3=1 _Iedlevel_4=0 _Iedlevel_5=0 /*
*/ exp expsq year=8 married=1 nrchild if male==1
This seems to work well.

The second prediction I'm interested is analogues to (i), but now I want to answer the question, What would be "the same" male's logwage if he had female averages on the various independent variables in the model?

To obtain this second prediction (ii), I simply replace the "male==1" with "male==0" in the -adjust- command, as in:

adjust _Iedlevel_2=0 _Iedlevel_3=1 _Iedlevel_4=0 _Iedlevel_5=0 /*

*/ exp expsq year=8 married=1 nrchild if male==0
This also seem to work well. At least exp, expsq and nrchild are given the female's averages, but I'm not sure of whether the effect of married and year are evaluated at the female's averages here.

Now comes the tricky part, i.e. the two predictions I don't know how to get:

(iii) What would "the same" male's logwage if he had male averages on the various independent variables, but the female's xt regression coefficients?

(iv) What would "the same" male's logwage if he had female averages on the various independent variables, but the female's xt regression coefficients?

At some point this, I think, involves the regression:

xi: xtreg logwage i.edlevel exp expsq year /*

*/ married nrchild if male==0, re cluster (lpnr)
to obtain the female's xt regression coefficients, but I can't seem to figure out how to "force" the female's coefficients onto the male sample. Any help is appreciated!

Best regards,

Christer Thrane
Lillehammer University College

*
* 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