Hi Bill,
try sonething like this:
random=list(Sp=~time, palnte=~1)
I hope it helps.
Best,
Dimitris
----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Bill Shipley" <bill.shipley@usherbrooke.ca>
To: "SPLUS_NEWS" <s-news@lists.biostat.wustl.edu>
Sent: Thursday, January 27, 2005 5:04 PM
Subject: [S] setting random terms in lme
Hello. I am fitting a simple linear model to data with a 3-level
hierarchy (species, plants within species, times within individuals).
The model is:
Random effects:
Formula: ~ 1 + time | Sp
Structure: General positive-definite
StdDev Corr
(Intercept) 1.05723143 (Inter
time 0.03824994 -0.53
Formula: ~ 1 + time | plante %in% Sp
Structure: General positive-definite
StdDev Corr
(Intercept) 0.18103949 (Inter
time 0.01453066 1
Residual 0.48031388
Fixed effects: log(FM) ~ time
Value Std.Error DF t-value p-value
(Intercept) -4.213142 0.1933546 823 -21.78972 <.0001
time 0.250802 0.0072350 823 34.66499 <.0001
Correlation:
(Intr)
time -0.537
QUESTION: I note that the correlation between the intercepts and
slopes
(time) for plants within species is 1.0. This indicates (I think)
that
I should not allow both to randomly vary at this level. However, the
equivalent correlation at the level of species is -0.53 and I do what
both the slopes and intercepts to vary at this species level. How can
I
specify this? Specifically, that both slopes and intercepts can vary
at
one level but only one of the two can vary at a lower level?
Thanks for any help.
Bill Shipley
Subject Matter Editor, Ecology
North American Editor, Annals of Botany
Département de biologie, Université de Sherbrooke,
Sherbrooke (Québec) J1K 2R1 CANADA
Bill.Shipley@USherbrooke.ca
<http://callisto.si.usherb.ca:8080/bshipley/>
http://callisto.si.usherb.ca:8080/bshipley/
|