jacob-long / panelr

Regression models and utilities for repeated measures and panel data
Other
99 stars 21 forks source link

Enhance documentation with information what happens with time-invariant dummy variables #19

Open hannes101 opened 5 years ago

hannes101 commented 5 years ago

I am estimating a within-between model, where the industry classification of a company is stored as a factor variable and has the four levels (Downstream, Midstream, Upstream, Support Services). I just add the variable to the time-invariant portion of the regression formula. In the resulting output the first level Downstream is dropped and I am now wondering if I need to interpret the coefficients as relative to Downstream? I hope it's clear what I am asking, perhaps I also need to create dummy variables for each of the industry classifications, but I think the use of a factor variable should be supported, or?

jacob-long commented 5 years ago

Yes, your interpretation is correct. It is similar to the interpretation you'd have if you included a factor variable in a simple linear regression (i.e., in lm()).

I cannot support suppressing the intercept as a way to include every factor level in the output because the within-between model requires a random intercept.

hannes101 commented 5 years ago

Thanks a lot! I forgot about the random intercept, since I only used FE in the past. Coming from Economics it's quite unusual to use Random Effects or even Within-Between models, but there's a paper in the works, which is using it :-)