Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: st: playing with coefficients


From   Christopher Baum <[email protected]>
To   "[email protected]" <[email protected]>
Subject   re: st: playing with coefficients
Date   Fri, 23 Mar 2012 09:20:43 -0400

<>
Chiara said

I totally agree: is there a way to cast this as a single regression:
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==0 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==1
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==1 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==1
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==0 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==2
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==1 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==2
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==0 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==3
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==1 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==3
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==0 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==4
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==1 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==4
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==0 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==5
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==1 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==5
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==0 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==6
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==1 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==6
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==0 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==7
reg lwage pexper pexpersq edu2 edu3 child12 married northe centre
south ftc partime d09 if fem==1 & cond3==1 & age>=15 & age<=64 &
dipind==1 & hours>20 & hours<55 & occupation==7

preserve
keep if cond3==1 & age>=15 & age<=64 & dipind==1 & hours>20 & hours<55 
reg lwage i.fem##i.occupation##c.(pexper pexpersq edu2 edu3 child12 married northe centre south ftc partime d09)
restore

If some of the parenthesized variables are categorical, rewrite the latter as 

(c.pexper c.pexpersq i.edu2 i.edu3 c.child12 ... )

You can then use margins to produce coefficients or conditional means for any combinations of gender and occupation.

Kit

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                             An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
  An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index