[R] How do I specify a model with nested random terms?

From: <Ingrid.Mage_at_matforsk.no>
Date: Tue, 29 Apr 2008 15:32:21 +0200

Dear R-users,

I have problems specifying a model with nested random terms. I want to reproduce a variance component model made in Mintab, the model specification in Minitab is:

Response = Prod P Prod*P Sample(Prod P) Extract(Prod P Sample)

        Random Prod Sample Extract

The dataset is balanced, and "P" is a fixed effect (treatment) while 

"Prod", "Sample" and "Extract" are random effects.
"Sample" is nested under the "Prod*P" interaction, and "Extract" is nested
under "Sample".

I tried using the lme function with the following formula specification:

lme(Response~Prod*P, Random=~1|Prod/P/Sample/Extract)

but the results do not look right. I don't understand how to specify the
"fixed" and "random" arguments correctly. Could someone explain these
arguments to me? I have tried to read the help files and manuals but I still don't get it :-S

Would it also be possible to use the aov function with Error() strata for this problem?

Thank you and regards,
Ingrid Måge

        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 29 Apr 2008 - 14:04:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Apr 2008 - 14:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive