[R] fitting a linear mixed effects model

E. Corda e.corda at oncfs.gouv.fr
Tue Sep 17 17:44:37 CEST 2002


Dear all,

I still have the same question as before. You'll find below my original
question and Peter's answer, as well as additional elements.

A 17:14 11/09/02 +0200, vous avez écrit :
>"E. Corda" <e.corda at oncfs.gouv.fr> writes:
>
>> fm1fox <- lme(nbfox ~ zone*annee, data=fox, random ~ 1|transect/year)
>> 
>> I would like the TRANSECT factor to be nested in the ZONE factor. But
>> if I estimate the model like this:
>> 
>> fm1fox <- lme(nbfox ~ zone*annee, data=fox, random ~
>> 1|zone/transect/year)
>
>(shouldn't that be transect/zone/year?)

No, one zone has several transects so TRANSECT is nested within ZONE.

>
>> zone is now a random effect.
>> 
>> Do you have any idea on this? Thanks a lot for any help.
>
>Does random ~ 1|(zone:transect)/year work? Otherwise, you might need
>something like random ~ 1|interaction(zone,transect)/year.
>
>-- 
>   O__  ---- Peter Dalgaard             Blegdamsvej 3  
>  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
> (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
>~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
>

The two commands indicated by Peter don't work on R. Moreover, I don't want
to estimate a model with ZONE*TRANSECT interaction, I'd rather want to
specify that the between transects variability must be taken into account
within each zone. The problem is that the way we write the model in lme
makes random effects be separated from fixed effects. So I can't see how I
could write the model I want. 

Thanks very much for any help,

Eve

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list