But not allowing factor notation is not the same as a bug. A real bug is that Stata drops interaction terms among continuous variables when using differencing if one of the variables doesn't change across time. Here's my Stata output, using airfare.dta that comes with my MIT Press book:
Code:
. sum ldist Variable | Obs Mean Std. dev. Min Max -------------+--------------------------------------------------------- ldist | 4,596 6.696482 .6593177 4.553877 7.909857 . gen ldist_dm = ldist - r(mean) . xtreg lfare concen c.concen#c.ldist_dm y98 y99 y00, fe vce(cluster id) Fixed-effects (within) regression Number of obs = 4,596 Group variable: id Number of groups = 1,149 R-squared: Obs per group: Within = 0.1429 min = 4 Between = 0.3048 avg = 4.0 Overall = 0.2411 max = 4 F(5,1148) = 104.09 corr(u_i, Xb) = -0.6841 Prob > F = 0.0000 (Std. err. adjusted for 1,149 clusters in id) ------------------------------------------------------------------------------------- | Robust lfare | Coefficient std. err. t P>|t| [95% conf. interval] --------------------+---------------------------------------------------------------- concen | .1661329 .0484029 3.43 0.001 .0711647 .261101 | c.concen#c.ldist_dm | -.2498619 .0828545 -3.02 0.003 -.4124252 -.0872987 | y98 | .0230874 .0041459 5.57 0.000 .014953 .0312218 y99 | .0355923 .0051452 6.92 0.000 .0254972 .0456874 y00 | .0975745 .0054655 17.85 0.000 .0868511 .1082979 _cons | 4.93797 .0317998 155.28 0.000 4.875578 5.000362 --------------------+---------------------------------------------------------------- sigma_u | .50598297 sigma_e | .10605257 rho | .95791776 (fraction of variance due to u_i) ------------------------------------------------------------------------------------- . reg D.(lfare concen c.concen#c.ldist_dm y98 y99 y00), nocons vce(cluster id) note: cD.concen#cD.ldist_dm omitted because of collinearity. Linear regression Number of obs = 3,447 F(4, 1148) = 118.18 Prob > F = 0.0000 R-squared = 0.0952 Root MSE = .12508 (Std. err. adjusted for 1,149 clusters in id) --------------------------------------------------------------------------------------- | Robust D.lfare | Coefficient std. err. t P>|t| [95% conf. interval] ----------------------+---------------------------------------------------------------- concen | D1. | .1759764 .0430367 4.09 0.000 .0915371 .2604158 | cD.concen#cD.ldist_dm | 0 (omitted) | y98 | D1. | .0227692 .0041573 5.48 0.000 .0146124 .030926 | y99 | D1. | .0364365 .005153 7.07 0.000 .026326 .0465469 | y00 | D1. | .0978497 .0055468 17.64 0.000 .0869666 .1087328 ---------------------------------------------------------------------------------------
Leave a comment: