1

I'm having difficulties with calculating r squared (ideally between and overall r squared, but between is more important to me) for a random effects model after multiple imputation with mice. The function pool.r.squared() only works for lm objects. I have tried for quite a while now, but I cannot figure out how to do it. This is my code:

imp <- mice(data_panel, 
               m=5,
               maxit=5)
fit.1 <- with(imp,
              plm(y ~ x1 + x2 + x3 + x4,
              data = data.frame(mget(ls())),
              index = c("Name", "Year"),
              model = "random")) 

summary(pool(fit.1)) 

I tried to make use of this post: Adjusted R squared using 'mice' but I couldn't get it work for a plm model. Any help would be greatly appreciated.

Progman
  • 16,827
  • 6
  • 33
  • 48

0 Answers0