Bhogal, Harkiran
2012-Mar-14 14:21 UTC
[R] random effect of species in lme on slope taking into account two variables
Hi! Just wondering how you would change this code so i can look at the random effect of species on slopes of effect of logM (body mass) and K (temperature) together. I did this so far: model1<-lme(logSSP~logM + K,random=~1|species,data=data1) #random effect of spp on intercept model2<-lme(logSSP~logM + K,random=~K|species,data=data1) #random effect of spp on slope K model3<-lme(logSSP~logM + K,random=~logM|species,data=data1) #random effect of spp on slope logM The one I now want is: model4<-lme(logSSP~logM + K,random=~logM|species,K|species,data=data1) #random effect of spp on both slopes of logM and K # but this code doesn't work so how do i change the code to have a random effect of species on slopes of logM and K together??? Please help :( Harkiran [[alternative HTML version deleted]]