Is there a way to include categorical variables (factors with several factor levels) when using plm()
for pooled OLS? As far as I understand, in plm()
all variables have to be numeric, which will not work in my case. I could include one dummy variable for each factor level, however, this would lead to a larger number of variables which actually are only levels of considerably fewer factors.
I've posed a similar question on CrossValidated and would be thankful for any kind of help.
I will include a minimal example if requested, but I assume this is more a general question on how to use plm()
and lm()
.