Working with a panel dataset (n=50 units, t=20 years at the monthly level = 240), I am fitting a fixed-effects model while controlling for the seasonality by monthly dummy variables. I defined the panel data by unit (1:50) and the time as a year-month (1:240). Here is how I did that in
paneldata <- pdata.frame(data, c("unit", "year_month_serial")) fe_model <- plm(y ~ x1+x2+x3+factor(month) , data= paneldata , model="within" , effect="individual")
My understanding is this model controls for the unit level as a fixed-effect and seasonality (by monthly dummies) without explicitly taking into account the year (time) effects. My question: is it appropriate to add a year variable
factor(year) to the model to capture the time effects? What statistical tests that can be run to verify?
Similarly (or maybe not), if the units are companies, for instances, and they are categorized in 4 industries (which are believed to have an effect on the dependent variable due to different policies or characteristics), What is an appropriate to control for the industry level (given that the industry level is time-invariant and cannot be used as a dummy indicator in the model)?