-----Oorspronkelijk bericht-----
Van: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-
bounces at r-project.org] Namens Samantha Patrick
Verzonden: donderdag 6 oktober 2011 12:20
Aan: r-sig-mixed-models at r-project.org
Onderwerp: [R-sig-ME] Random slope models with nested random effects and
multiple x variables
Hi
I am fitting random intercept and slope models on some GPS tracking data. I
have data from 113 tracks from 31 individuals with about 400 behavioural
observations per track.
I am interested in looking at how individuals change their behaviour in response
to an environmental variable (a) but want to control for the non-independence
of points from individual tracks.
So I have these possible lmer models :
a) lmer (behaviour ~ (1|bird/track) + (-1+a|bird))
b) lmer (behaviour ~ (1|bird/track) + (0+a|bird))
c) lmer (behaviour ~ (1|bird/track) + (a|bird))
I have two questions:
1) Can you fit an intercept and slope with different random effect structures?
In theory I think this is ok but I have not see it done.
2) I am interested in the differences in covariance structures in the three
models. I thought that model (a) set the covariance between the slope and
intercept for bird to 0 but from looking at previous posts in the forum, it seems
that model (b) may do this? In which case does model (a) set the covariance to -
1?
My understanding is that model (c) allows a symmetric variance-covariance
matrix (which is what I want) but I am concerned that this model is fitting two
intercepts for bird?
Ideally I want the intercept for bird to be allowed to covary with the slope for
bird (I don't want to constrain it to 0 or 1) but I am unsure if my problem is in the
syntax or whether I don't fully understand how the model partitions the variance
in nested random effects and that maybe the model I want to fit is not possible.
Any advice on creating the models would be much appreciated!
Many Thanks
Sam
Dr Samantha Patrick
EU INTERREG Post Doc
Davy 618
Marine Biology & Ecology Research Centre University of Plymouth Plymouth
PL4 8AA
T: 01752 586165
M: 07740472719
[[alternative HTML version deleted]]