Hi, everyone. I'm new here
I'm trying to switch from Stata to r, by recreating the regressions from my bachelors thesis.
This is a difference-in-difference (kind of) regression, but with paneldata (fixed effect), and I would like to get robust standard errors
In Stata it would look like this;
xtset firm year
xtreg debt_to_equity2019 recession##involved i.year, fe robust
This is how I'm trying to do it in r;
summary(robis <- rlm(debt_to_equity2019 ~ involved*recession + factor(firm) + factor(year) - 1, data = super))
Now, this works without the factor variables in the rlm regression and with the factors in a an lm-regression, but trying to get both xt and robust standard errors, returns the following...
summary(robis <- rlm(debt_to_equity2019 ~ involved*recession + factor(firm) + factor(year) - 1, data = super))
Error in rlm.default(x, y, weights, method = method, wt.method = wt.method, :
'x' is singular: singular fits are not implemented in 'rlm'
How should I write instead of "+ factor(firm) + factor(year) - 1" to make it work?
Thanks in advance!
//Joel