I'm currently working on the correlation between sustainability and performance in the S&P500.
I'm using a panel data model, with fixed effects for both, ime and firm.
I wanted to insert a sector specific dummy variable and a ESGscore specific dummy variable, which is structured that way:
ESGscore 100 - 75 --> excellent
ESGscore >50 - 75 --> good
ESGscore >25 - 50 --> medium
ESGscore 0 -25 --> poor
I did the dummy variables by the following code:
# dummy variable for sector
Dummy.sector <- dummy.code(Datensatz_final$ggroup)
colnames(Dummy.Sektor) <- c("D.Energy", "D.Material")
Datensatz_final <- cbind(Datensatz_final, Dummy.Sektor)
# dummy variable for ESGscore
# Categorizing the ESGscore #
ESG.Categories <- cut(PD.Datensatz_final$ESGscore, breaks = 4, labels = c("poor","medium","good","excellent"))
Datensatz_final <- cbind(Datensatz_final, ESG.Categories)
Dummy.ESG <- dummy.code(Datensatz_final$ESG.Kategorien)
colnames(Dummy.ESG) <- c("D.schlecht", "D.befriedigend", "D.gut", "D.exzellent")
Datensatz_final <- cbind(Datensatz_final, Dummy.ESG)
When I now try to run my regression it is dropping the dummy varaibles because my dummies do not vary over time. In this case, the fixed effects estimator and first differencing will remove such variables from the model. The reason is that these estimators cannot identify variables that do not vary over time because those variables will be eliminated together with the unobserved fixed effects. (Panel data model estimation with dummy variables)
Is the only way to get dummies in the output, to use the Random effects model? :)