[R-sig-ME] Help. GLMM Random intercept and slope
Ben Bolker
bbolker at gmail.com
Mon Aug 15 20:07:27 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/15/2011 01:37 PM, Gonzalez,Enrique wrote:
> Dear Dr Ben Bolker,
>
> I am using the function lmer of the library(lme4) to do a GLMM
>
>
Please don't write to me (or other people who frequently respond to
questions on the r-sig-mixed-models list) personally -- write to the
r-sig-mixed-models list! I *may* answer to a post to the list (or
someone else might), but for my own protection I can't afford to answer
individual, personal queries.
I'm going to take the liberty of forwarding this to the
r-sig-mixed-models list, so that the general point of etiquette (of
which you may not have been aware) can be expressed to others who might
be unaware of it ...
cheers
Ben Bolker
>
> 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.
You need to be more specific about what "doesn't work" means.
Providing a reproducible example (read the R Posting Guide and
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
) would be helpful.
>
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk5JYF8ACgkQc5UpGjwzenN6YQCeJbRRDxxcsxdhvoaGbZQv826G
JvEAn0MZtJFFXflDtATNCyy7Gia23u/V
=o87B
-----END PGP SIGNATURE-----
More information about the R-sig-mixed-models
mailing list