[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-mixed-models
Subject:    Re: [R-sig-ME]  Different number of observations in variables of glmer
From:       Paul Johnson <paul.johnson () glasgow ! ac ! uk>
Date:       2018-06-14 18:44:14
Message-ID: 17B3708E-ADDA-4E08-8D3F-3DF9AFD03472 () glasgow ! ac ! uk
[Download RAW message or body]

The r.squaredGLMM function in MuMIn tries to add an observation-level random effect \
term if it doesn't find one — I suspect this is where your error is coming from. \
It's debatable whether this is a good idea (on the one hand it's often a good idea to \
add an OLRE, but I think it would be better to give the user the choice). 

I suggest using the rsquared function in piecewiseSEM. A major update has just been \
uploaded to CRAN, which includes extensions of R-squared to models not previously \
covered: https://cran.r-project.org/web/packages/piecewiseSEM/index.html

> On 13 Jun 2018, at 16:35, Cueva, Jorge <jorge.cueva@tum.de> wrote:
> 
> Hello, I am trying fit a glmer where the fixed variables has a different number of \
> observations (72 and 60). With the models where the variables has the full \
> observations I don�t have problems but yes in the models where some of its \
> variables has 60 observations. In the second case,  all work well until I compute \
> the R2m and R2c and I get the error "fitting model with the observation-level \
> random effect term failed. Add the term manually", so, when I ingress the \
> observation level the AIC increase 2 points, and miss 1 df. Please how I might work \
> in these cases?? 
> First case...
> glmer(Spp~1+Mth.Prec+Soil.depth+Drainage+(1|Cluster),data = \
> VariabRL,family=poisson,glmerControl(optimizer="bobyqa", optCtrl = list(maxfun = \
> 2e5))) 
> Second case...
> glmer(Spp~1+Mth.Prec+Soil.depth+Drainage+(1|Cluster)+(1|X),data = \
> VariabRL,family=poisson,glmerControl(optimizer="bobyqa", optCtrl = list(maxfun = \
> 2e5))) 
> Mth.Prec = 72 observations
> Soil.depth and Drainage = 60 observations
> X = observation level
> 
> Thanks a lot
> 
> Jorge Cueva Ortiz
> Ing. Forestal
> ECU: 0993085161
> GER: 0049 1631327886
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic