model averaged coefficients of linear mixed models in glmulti? Fix no longer works

305 Views Asked by At

I'm using the glmulti package to do variable selection on the fixed effects of a mixed model in lme4. I had the same problem retrieving coefficients and confidence intervals that was solved by the author of the package in this thread. Namely using the coef or coef.multi gives an check.names error and the coefficients are listed as NULL when calling the predict method. So I tried the solution listed on the thread linked above, using:

setMethod('getfit', 'merMod', function(object, ...) {
summ=summary(object)$coef
summ1=summ[,1:2]
if (length(dimnames(summ)[[1]])==1) {
    summ1=matrix(summ1, nr=1, dimnames=list(c("(Intercept)"),c("Estimate","Std.    Error")))
}
cbind(summ1, df=rep(10000,length(fixef(object))))
})

I fixed the missed " in the original post and the code ran. But, now instead of getting

Error in data.frame(..., check.names = FALSE) :arguments imply differing number of rows: 1, 0

I get this error for every single model...

Error in calculation of the Satterthwaite's approximation. The output of lme4 package is returned summary from lme4 is returned some computational error has occurred in lmerTest

I'm using lmerTest and it doesn't surprise me that it would fail if glmulti can't pull the correct info from the model. So really it's the first two lines of the error that are probably what should be focussed on.

A description of the original fix is on the developers website here. Clearly the package hasn't been updated in awhile, and yes I should probably learn a new package...but until then I'm hoping for a fix. I'll contact the developer directly through his website. But, in the mean time, has anyone tried this and found a fix?

lme4 glmulti rJava and other related packages have all been updated to the latest version.

0

There are 0 best solutions below