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 |
Richard Williams <richardwilliams.ndu@gmail.com> |

To |
statalist@hsphsun2.harvard.edu, statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Difference between using dummy variables and the '==1' command |

Date |
Wed, 24 Aug 2011 21:41:24 -0500 |

At 09:58 AM 8/24/2011, lreine ycenna wrote:

Hi all, I compared the regression results based on two different comamnds, namely those derived from dummy variables and the 'if female==1' command and found that at times these results can be quite different, though they can also be very similar in some cases. For example, comparing results from two separate regressions - (1) 'regress A B AxFemale BxFemale' (from which I then add up the coefficients for A and AxFemale), and (2) 'regress A B if female==1'. Normally, at least I expect, the coeffcients for A and female should be very similar under these two commands, but I am unable to explain why sometimes these coeffcients (e.g. A and Female) are very different depending on the method used (e.g. 0.6 v.s -0.02). I am wondering whether this is normal? Can anyone explain to me whether there is any significant methodological difference between these two comamnds?

reg A B female AxFemale BxFemale i.e. you are leaving out the main effect of female. So, try something like sysuse auto reg price weight foreign i.foreign#c.weight reg price weight if foreign ==0 reg price weight if foreign ==1

------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW: http://www.nd.edu/~rwilliam * * 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**:**st: Difference between using dummy variables and the '==1' command***From:*lreine ycenna <lreine.ycenna@gmail.com>

- Prev by Date:
**Re: st: Panel cointegration** - Next by Date:
**st: One-way table and multiple variables** - Previous by thread:
**Re: st: Difference between using dummy variables and the '==1' command** - Next by thread:
**re:RE: st: passing a function name as an argument to another function** - Index(es):