Skip to content
Prev 16174 / 20628 Next

R^2 for linear mixed effects models with glmer()

Thanks Thierry,

 ?????? Sorry about my question, I start to use the mixed models 
approach recently. My structure of data was:

'data.frame':	288 obs. of  13 variables:
  $ Transecto        : int  2 2 2 2 2 2 3 3 3 3 ...
  $ Ponto            : int  1 2 3 4 5 6 1 2 3 4 ...
  $ Distancia        : int  160 120 80 40 20 0 160 120 80 40 ...
  $ tipo_trat        : Factor w/ 4 levels "","controle",..: 3 3 3 3 3 3 4 4 4 4 ...
  $ umid_inici       : num  81.3 84.1 81.3 83.9 81.9 ...
  $ umid_final       : num  63.7 68 66.2 66.8 66.4 ...
  $ temp_inici       : num  19.1 19.5 19.5 19.1 19.1 ...
  $ temp_final       : num  29.1 27.8 27.6 28 28.6 ...
  $ abertu_dossel    : num  35.6 20.8 28.9 30.6 27.1 ...
  $ delta.umidade    : num  -17.6 -16.1 -15.2 -17.1 -15.5 ...
  $ delta.temperatura: num  9.95 8.3 8.1 8.91 9.5 ...
  $ remocao          : num  0.02 0 0.1 0 0.08 0 1 0.04 0.08 0.42 ...
  $ riqueza          : int  3 9 3 3 4 5 4 3 2 5 ...


And the summary of model below. In my case is a adjustment problem or in 
r.squaredGLMM() function?
glmerMod]
  Family: poisson  ( log )
Formula: riqueza ~ tipo_trat + temp_final + temp_inici + umid_inici +
     umid_final + (1 | Ponto)
    Data: d1
Control:
glmerControl(check.conv.singular = "warning", optCtrl = list(maxfun = 1e+05))

      AIC      BIC   logLik deviance df.resid
    326.1    344.3   -155.0    310.1       64

Scaled residuals:
     Min      1Q  Median      3Q     Max
-1.8416 -0.7947 -0.2221  0.7253  2.4622

Random effects:
  Groups Name        Variance  Std.Dev.
  Ponto  (Intercept) 5.293e-17 7.275e-09
Number of obs: 72, groups:  Ponto, 6

Fixed effects:
                       Estimate Std. Error z value Pr(>|z|)
(Intercept)           -5.18941    3.18615  -1.629   0.1034
tipo_trattrat_euc     -0.51209    0.29360  -1.744   0.0811 .
tipo_trattrat_mat_euc -0.43877    0.25986  -1.688   0.0913 .
temp_final             0.06914    0.04144   1.669   0.0952 .
temp_inici             0.07176    0.05479   1.310   0.1903
umid_inici             0.03270    0.02543   1.286   0.1985
umid_final             0.01774    0.01660   1.069   0.2850
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1

Correlation of Fixed Effects:
             (Intr) tp_tr_ tp_t__ tmp_fn tmp_nc umd_nc
tp_trttrt_c  0.457
tp_trttrt__  0.525  0.358
temp_final  -0.546 -0.393 -0.143
temp_inici  -0.750 -0.557 -0.696  0.037
umid_inici  -0.755  0.028 -0.522 -0.020  0.667
umid_final  -0.287 -0.661  0.236  0.651  0.023 -0.352
convergence code: 0
Model failed to converge with max|grad| = 0.00894145 (tol = 0.001, component 1)
singular fit
Model is nearly unidentifiable: very large eigenvalue
  - Rescale variables?
Model is nearly unidentifiable: large eigenvalue ratio
  - Rescale variables?