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]

From |
Joerg Luedicke <[email protected]> |

To |
[email protected] |

Subject |
Re: st: playing with coefficients |

Date |
Fri, 23 Mar 2012 08:27:06 -0700 |

-c.- is for continuous, see -help fvvarlist- J. On Fri, Mar 23, 2012 at 8:08 AM, Chiara Mussida <[email protected]> wrote: > I got it: for categorical variable c.namevariable, and for dummy > variables? or continuous variable? > > > > > > On 23/03/2012, Chiara Mussida <[email protected]> wrote: >> Occupation takes the values from 1 to 7, therefore by using >> i.occupation I get 7 coefs. i.fem is instead a dummy variable (fem==1 >> if female, 0 otherwise). The use of both i.occupation and i.fem >> therefore gives me the coefs for female. How do I get the one for male >> (fem==0)? >> >> Thanks >> chiara >> >> On 23/03/2012, Christopher Baum <[email protected]> wrote: >>> <> >>> 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/ >>> >> >> >> -- >> Chiara Mussida >> PhD candidate >> Doctoral school of Economic Policy >> Catholic University, Piacenza (Italy) >> > > > -- > Chiara Mussida > PhD candidate > Doctoral school of Economic Policy > Catholic University, Piacenza (Italy) > * > * 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/ * * 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/

**References**:**re: st: playing with coefficients***From:*Christopher Baum <[email protected]>

**Re: st: playing with coefficients***From:*Chiara Mussida <[email protected]>

**Re: st: playing with coefficients***From:*Chiara Mussida <[email protected]>

- Prev by Date:
**Re: st: playing with coefficients** - Next by Date:
**Re: st: playing with coefficients** - Previous by thread:
**Re: st: playing with coefficients** - Next by thread:
**Re: st: playing with coefficients** - Index(es):