[R-meta] Model selection: Model matrix not of full rank

Cesar Terrer Moreno cesar.terrer at me.com
Mon Mar 12 11:45:41 CET 2018


Hi, I am running a model selection analysis using metafor and glmulti in order to find the most important predictors driving an effect size:

rma.glmulti <- function(formula, data, ...) {
  rma(as.formula(paste(deparse(formula))), var, data=data, method="ML", knha=TRUE,  control=list(stepadj=.5),...)
}

res.ECM <- glmulti(es ~ CNr + ph + MAT + MAP + deltaco2 + Biome, 
                   dat=ecmdat,level=2, fitfunction=rma.glmulti, crit="aicc", confsetsize=2^6)

I know the number of moderators is probably too high for a model with interactions (level=2), but anyway after a while running the process I got this error:

Error in rma(as.formula(paste(deparse(formula))), var, data = data, method = "ML",  : 
  Model matrix not of full rank. Cannot fit model.
In addition: There were 50 or more warnings (use warnings() to see the first 50)

How can I avoid this error to make the whole process run until the end? It seems like an error unrelated to metafor or glmulti, but I can’t really find a solution to this error.
Thanks


More information about the R-sig-meta-analysis mailing list