How to use mixed models / random effects in glmulti?

41 views Asked by At

In https://cran.r-project.org/web/packages/glmulti/glmulti.pdf the following is written:

Examples
# See the document "glmulti.pdf" included in the package.
# It explains the general approach and shows how to use
# glmulti with mixed models from the lme4 package.
# Other examples:

and also:

fitfunction The fitting function to be used. Any function similar to glm can be used. See
Examples

though I don't know what this means. I try to include random effects but I fail doing so. Is it even possible and if so, how?

I try e.g.:

glmulti(BDV ~ Humidity + Temperature + (1|Sample)
                            , data = df
                            , level = 2   
                            , crit = "bic"
                            , confsetsize = 5 
                            , method = "h" 
                            , fitfunction = "lmer"
                            ) 

but this results in

Initialization...
Error in .subset2(x, i, exact = exact) : 
  attempt to select less than one element in get1index
0

There are 0 answers