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

From |
Tae Hun Kim <thkim91@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: about dummy variables |

Date |
Thu, 17 Mar 2005 10:56:15 -0600 |

Yes, I know this question is not directly related to State program. But I need someone's help to understand the problem. The Ststa code to generate dummy variables is **dummy variable gen pre96=0; replace pre96=1 if year==1986 | year==1987 | year==1988 | year==1989 | year==1990 | year==1991 | year==1992 | year==1993 | year==1994 | year==1995; gen post96=0; replace pos96=1 if year==1996 | year==1997 | year==1998 | year==1999 | year==2000 | year==2001 | year==2002; **interactive term gen pre96s=pre96*smom; gen post96s=post96*smom; Thanks, TaeHun Kim On Thu, 17 Mar 2005 11:20:37 -0500, Daniel Lawson <k95dl01@gmail.com> wrote: > This doesn't sound like a Stata-specific question. You might get more > or better responses to this question if you asked this question in > another forum. > > In terms of Stata code, how did you generate your dummy variable? > > Daniel Lawson > > On Mar 16, 2005, at 6:20 PM, Tae Hun Kim wrote: > > > Hello. > > I would be greatfull if someone helps me to understand dummy variables. > > > > For example, > > Y= a+b*X+c*dum+d*(X*dum)+e > > where Y : income, X : education(years), dum=dummy variable (dum=1 if > > male, dum=0 if female) > > > > If I estimate this equation using OLS, recalulated coefficents are the > > same regardless of whether dum=1 if male (0 otherwise) or dum=1 if > > female(0 otherwise). > > i.e. if I define a dummy variable as dum=1 if male, o otherwise > > male(1) : E(Y)= (a+c)+(b+d)X, female(1) : E(Y)=a+bX > > if I define a dummy variable as dum=1 if female, o otherwise > > male(2) : E(Y)=a+bX, female(2) : E(Y)= (a+c)+(b+d)X > > =>the coefficients of male(1) and male(2) equation are the same. > > > > (Question) > > 1. But when I estimate this equation using GMM or IV, the coefficients > > of male(1) and male(2) equation are not the same. Why? > > 2. If the coefficient are different, what is the criteria to define a > > dummy variable(male=1 or female=1) ? > > > > Thanks in advance > > TaeHun Kim > > * > > * 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/ > * * 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/

**References**:**Re: st: about dummy variables***From:*Daniel Lawson <k95dl01@gmail.com>

- Prev by Date:
**Re: st: about dummy variables** - Next by Date:
**Re: st: help creating a unique identifier** - Previous by thread:
**Re: st: about dummy variables** - Next by thread:
**RE: st: about dummy variables** - Index(es):

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