0

I was recently working with the rlm function from the MASS package, seeking to fit a robust regression for a panel. Just like many other functions, rlm does not have a built-in way to introduce fixed effects. ID dummies however cost too much degrees of freedom and doesn't allow for two-way fixed effects.

This got me wondering whether there is a convenient way of "tricking" R into including individual or two-way fixed effects in a regression by performing the within transformation manually? I haven't seen anything about this flying around so possible I am getting the concept wrong. But out of interest: Has anyone done this before?

Helix123
  • 3,502
  • 2
  • 16
  • 36
  • This doesn't appear to be a specific programming question that's appropriate for Stack Overflow. If you have questions about fitting a statistical model to your data, you should ask for statistical advice at [stats.se] instead. You are more likely to get better answers there. Rather than trying to trick an existing function, find a method that's appropriate for your data. – MrFlick Aug 12 '22 at 15:26
  • There does not seem to be a readily available function in R that allows for robust estimation with two-way fixed effects – philipp.kn_98 Aug 12 '22 at 15:29

0 Answers0