# Panel data model estimation with dummy variables

In "R - project" I am trying to estimate the panel data lm model with plm function. When I include 3 dummy variables into the regression it doesn't appear in the summary of the model, but when I estimate a simple lm model it appears.

Why is it so? What should I do to estimate the statistics for those dummy variables?

• Hi there, welcome to the site. Could you post the lm code that you are using - both sets? Mar 15, 2012 at 6:14
• Hello. the code is : model.FE<- plm(income~area+weight+dproduct+dummy1+dummy2+dummy3,data=panel, model = "within")
– Ieva
Mar 15, 2012 at 6:37
• Have you tried to specify your dummy variable with all the levels as a factor (use as.factor) and then entered it into plm as factor(mydummy)? That was how Year was entered into the model on p.17 of the package vignette: cran.r-project.org/web/packages/plm/vignettes/plm.pdf Mar 15, 2012 at 6:45
• I think these comments would be more appropriate to incorporated into your question. Mar 15, 2012 at 8:16
• @RomanLuštrik I agree, and more information on the variables would be good too. :) Mar 15, 2012 at 9:27

Another possibility is that the dummy variables are (very close to) co-linear. In this case, plm will automatically exclude the co-linear variables from its output. One way to check this is to run the model, and check the aliased object:
model.FE<- plm(income~area+weight+dproduct+dummy1+dummy2+dummy3,data=pa‌​nel, model = "within")
model.FE$aliased  If model.FE$aliased reports TRUE for any of the dummies, then they are linearly dependent (or very close being so). In that case, go back and check that dummy1,dummy2, and dummy3 are sufficiently different.