[R-sig-ME] [FWD] GLMM Random intercept and Slope

Gonzalez,Enrique e.gonzalez at bangor.ac.uk
Mon Aug 15 22:14:51 CEST 2011


This was sent to me, instead of the Mailing list :

------- start of forwarded message -------
From: "Gonzalez,Enrique" <e.gonzalez at bangor.ac.uk>
To: maechler at R-project.org
Subject: Help. GLMM Random intercept and Slope
Date: Mon, 15 Aug 2011 18:34:44 +0100


I am using the function lmer of the library(lme4) to do a GLMM

All models with random intercept works successfully with all my factors.

M4 <- lmer (Stages2 ~ factor(Temperatura) * factor (Sal) *
factor(Food)*factor(Embrion) + (1 | fFemale/fEmbrion), data = PS, family 
= binomial)



A model with a random intercept and slope using only one fixed factor in
the random part works successfully Example:
M4 <- lmer (Stages2 ~ factor(Temperatura) * factor (Sal) *
factor(Food)*factor(Embrion) + (1 + factor(Temperatura) |
fFemale/fEmbrion), data = PS, family = binomial)

but when I include in the random part several factors (1 +
factor(Temperatura) +factor(Food) + factor (Sal)| fFemale/fEmbrion), it
doesn't work.

I want to test if the relationship between the variable Y and fixed
factors is different in each Female. For this reason I need to include
in the random part all the fixed factors.

I think my main problem is that I don't know how can I include 3 factors
in a random intercept and slope model.

All my explanatory variables are factors I mean categoric variables, the 
matrix has 0 and 1.

If you know how can I write in R for one of this library the code, it
would be OK for me
thanks in advance.
Enrique
-- 
Gonzalez,Enrique         e.gonzalez ... 

------- end of forwarded message -------




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