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

Cesar Terrer Moreno cesar.terrer at me.com
Tue Mar 13 18:29:14 CET 2018


Dear Michael,

Thanks for your comments. It’s a pity I can’t include more predictors, when the reality is that the set of potential important predictors is large, and interactions are likely.

Is there any alternative (e.g. Bayesian) to this approach to use model selection with an rma model? 

Thanks
César

> On 12 Mar 2018, at 14:26, Michael Dewey <lists at dewey.myzen.co.uk> wrote:
> 
> Dear Cesar
> 
> Comments inline
> 
> On 12/03/2018 10:45, Cesar Terrer Moreno wrote:
>> 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:
> 
> I suspect your observation is probably correct. Can you fit the model with rma.uni using (CNr + ph + MAT + MAP + deltaco2 + Biome)^2 as the formula?
> 
>> 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)
>> 
> 
> What were the warnings?
> 
>> 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.
> 
> I think you may have to choose a simpler model. I think your comment is probably correct, this is a general problem of model complexity not specific to the particular packages you are using.
> 
>> Thanks
>> _______________________________________________
>> R-sig-meta-analysis mailing list
>> R-sig-meta-analysis at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
> 
> -- 
> Michael
> http://www.dewey.myzen.co.uk/home.html



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