Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | David Hoaglin <dchoaglin@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Interpretation of factor variables |
Date | Thu, 11 Jul 2013 07:28:44 -0400 |
Dear Yu, In writing "i.Dummy i.Dummy#c.Continuous" in the Stata command, you are specifying three predictors: an indicator variable whose value is 1 when Dummy == 1, a continuous variable whose value equals that of Continuous when Dummy == 0, and a continuous variable whose value equals that of Continuous when Dummy == 1. The coefficient for Dummy in your output is the effect of Dummy == 1 (the coefficient of _const applies when Dummy == 0). The two coefficients under Dummy#c.Continuous are, respectively, the slope of DV against Continuous when Dummy == 0 and the slope of DV against Continuous when Dummy == 1. Each of these coefficients summarizes the contribution of its predictor after adjusting for simultaneous linear change in the other predictors in the model (Including the "other control variables"). If you used the predictors Dummy, Continuous, and Dummy*Continuous, you would have an equivalent model (i.e., it would produce the same predicted values of DV), but one of the coefficients would be different: the coefficient of Continuous would be the slope of DV against Continuous when Dummy == 0 (as before), but the coefficient of Dummy*Continuous would be the additional slope of DV against Continuous when Dummy == 1 (from your output, 37.70141 - 31.54672 = 6.15469). David Hoaglin On Thu, Jul 11, 2013 at 7:00 AM, Yu Chen, PhD <profyuchen@gmail.com> wrote: > Dear Statalist, > I have a dummy variable that takes values of one or zero, and a > continuous variable. I ran the following regression. > Dependent Variable (DV) = Dummy + Dummy*Continuous + other control > variables. I used factor variables (i.e., i.Dummy + > i.Dummy#c.Continuous ) > I got results as below. My question is how should I interpret the two > lines below Dummy#c.Continuous? The first line shows a 0. I interpret > it as Dummy takes 0 for this line. However, if Dummy takes 0, the > whole term should be zero and should be eliminated from the results. > But Stata still gave me a Coef. What is going on? > Thank you in advance for your help. > > > ------------------------------------------------------------------------------ > DV | Coef. Std. Err. t P>|t| [95% Conf. Interval] > -------------+---------------------------------------------------------------- > Dummy#c.Continuous | > 0 | 31.54672 9.438251 3.34 0.001 13.04526 50.04818 > 1 | 37.70141 7.609734 4.95 0.000 22.78433 52.6185 > | > Dummy | .1026062 .1648457 0.62 0.534 -.2205349 .4257472 > > > Yu Chen * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/