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 |
Daifeng He <dhe.statlist@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: specify base year for interacted factor variable. |

Date |
Thu, 17 May 2012 16:23:41 -0400 |

Dear all, I am running a panel model regressing y on a continous variable x, year dummies, and an interaction of x with the year dummies. I have three years of data 1999, 2000 and 2001 and I wan to specify the first year 1999 to be the base year. However, when trying to use the factor variable commands to do the job, I can only sucessfully make the 1999 as baseyear for the year dummies, but I cannot make 1999 as the base year for the interaction term -- it's always 2001 which is dropped. (Please see the Stata output below). Does anyone know how I can get 1999 to be the base year for the year#c.x interaction term? Any insight would be appreciated! Thanks, Daifeng . xtreg y ib1999.year#c.x i.year, i(id) fe note: 2001.year#c.x omitted because of collinearity Fixed-effects (within) regression Number of obs = 3027 Group variable: id Number of groups = 1029 R-sq: within = 0.0036 Obs per group: min = 1 between = 0.0076 avg = 2.9 overall = 0.0046 max = 3 F(4,1994) = 1.81 corr(u_i, Xb) = 0.0409 Prob > F = 0.1252 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- year#c.x | 1999 | 3.345423 3.330076 1.00 0.315 -3.18537 9.876217 2000 | 1.934874 3.289485 0.59 0.556 -4.516315 8.386062 2001 | (omitted) | year | 2000 | 1.422862 1.469454 0.97 0.333 -1.458965 4.304689 2001 | 3.554589 1.46647 2.42 0.015 .6786138 6.430563 | _cons | 195.3646 1.04039 187.78 0.000 193.3243 197.405 -------------+---------------------------------------------------------------- sigma_u | 55.369127 sigma_e | 32.73169 rho | .74103537 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(1028, 1994) = 6.85 Prob > F = 0.0000 * * 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/

**Follow-Ups**:**Re: st: specify base year for interacted factor variable.***From:*brendan.halpin@ul.ie (Brendan Halpin)

- Prev by Date:
**Re: st: Looping and saving regression outputs** - Next by Date:
**Re: st: specify base year for interacted factor variable.** - Previous by thread:
**st: Heckman selection w mprobit in first stage** - Next by thread:
**Re: st: specify base year for interacted factor variable.** - Index(es):