[R-sig-ME] Unbalance design in GLMM

Gabriela Agostini gabrielaagostini18 at gmail.com
Sun Feb 3 01:33:03 CET 2013


Hello!

I am working with GLMM using the binomial family for testing
differences in amphibian malformations that occur in several ponds
located in two different areas.
The random effects are sampled day (samplday) and pond identity
(pondident).The fixed effects are area (studyarea) and species (sp).
Ymat is the response variable.


> class(data$pondident)
[1] "factor
> class(data$samplday)
[1] "integer"

> levels(data$pondident)
 [1] "A"     "arro"  "B"     "C"     "campo" "D"     "E"     "F"     "G"
[10] "hum"
>levels(data$samplday)
NULL

> library(biology)
> is.balanced(Ymat~pondident,data=data)
[1] FALSE
> is.balanced(Ymat~pondident+samplday,data=data)
[1] FALSE

as you notice, it is an unbalanced design, so When I run the model

> GLMM.c<-lmer(Ymat~studyarea+sp+studyarea*sp+(1|samplday/pondident),data=data,family="binomial")
Error: length(f1) == length(f2) is not TRUE
Además: Mensajes de aviso perdidos
1: In pondident:samplday :
  expresión numérica tiene 400 elementos: solo el primero es utilizado
2: In pondident:samplday :
  expresión numérica tiene 400 elementos: solo el primero es utilizado

You can help me? I could not find the solution for unbalanced designs
applied to generalized models

Gracias!
Gabriela










-- 
Lic. María Gabriela Agostini


CIMA. Centro de Investigaciones del Medio Ambiente.

Facultad de Ciencias Exactas. UNLP

47 y 115 s/n (1900) La Plata. Argentina


Conservación de Anfibios en Agroecosistemas

Sapos y Ranas del Fondo de tu Casa

http://www.facebook.com/saposyranasdelfondodetucasa



More information about the R-sig-mixed-models mailing list