s-news
[Top] [All Lists]

Problems with lme and 2 levels of nesting

To: s-news@lists.biostat.wustl.edu
Subject: Problems with lme and 2 levels of nesting
From: Andreas Svensson <andreas.svensson@bio.ntnu.no>
Date: Wed, 29 Mar 2006 18:56:32 +0200
Organization: NTNU
Reply-to: andreas.svensson@bio.ntnu.no
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910
Hello
After struggling with Crawley's and Pinheiro & Bates' books + scanning the archiove for a day I feel compelled to ask thourgh this list.

There were two treatments of food; "Treatment" = "1" and "2". In each treatment there were 60 females that ate the food and then laid one clutch of eggs each. From each clutch I took 50 larvae and divided them on 5 cups (with 10 larvae per cup). Then I let the larvae starve to death and noted the day-of-death ("Deathday") for each larva.
The data set looks like this:

Treatment Clutch Cup Larva DeathDay
1      2        1     1       2
1      2        1     2       2
1      2        1     3       2
1      2        1     4       2
1      2        1     5       4
1      2        1     6       4
1      2        1     7       4
1      2        1     8       4
1      2        1     9       6
1      2        1     10      6
1      2        2     1       2
1      2        2     2       4
1      2        2     3       9... and so on

What I'm interested in is the effect of the fixed factor "Treatment" on "DeathDay". The unit of replication is "Clutch". However, I want to use a model where the variation within Clutch and within Cup is taken into account, while avoiiding pseudoreplication of 5 cups (and 50 larvae) coming from the same clutch.

I guess the solution is a mixed model, with "Cup" nested in "Clutch" nested in "Treatment" and with "Cup" and "Clutch" as random factors, while
"Treatment" is a fixed factor.

I now have trouble writing the syntax. I was recommended this by one expert:

model1<-lme(DeathDay~Treatment,random=~Treatment|Clutch/Cup)

But after consulting various books, I wonder if it is right. Treatment is fixed factor, so what is it doing left od the |?. I think I should write it like this:

model2<-lme(DeathDay~ Treatment,random=~1|Clutch/Cup)

And then, to test if Treatment had an effect do a model comparison
model3<-lme(DeathDay~ 1,random=~1|Clutch/Cup)
anova(model2,model3)

Which of model1 and 2 is right? Perhaps neither? If not, I would be thankful for any suggestions on a proper model.
Sincerely
Andreas Svensson


PS I have the corresponding script for SPSS, which might clarify my question for you:

glm
DeathDay by Cup Clutch Treatment
/method=sstype(1)
/random Cup Clutch
/design Treatment Clutch(Treatment) Cup(Clutch(Treatment)).


<Prev in Thread] Current Thread [Next in Thread>
  • Problems with lme and 2 levels of nesting, Andreas Svensson <=