Hi all, I am attempting to use the language R for analyzing mixed 
models.  I have encountered a syntax problem, and can't seem to get the 
code right.  If someone else is using R for the same purpose 
(specifically using the "lme" package), I think you'll be able to 
answer my question easily.  Once I've got this figured out, I will post 
another message with a kind of quick how-to on getting started with 
complex models in R, as I think there are other people that would like 
to use R but have been intimidated by the learning curve.  Anyway, this 
is the question:

The model I want to run has the following factors:

Host (fixed)
Sire (random)
Dam nested within Sire (random)
Host * Sire (random)
Host * Dam within Sire (random)

Without the interactions I have:
hogmodel = lme(gain ~ host, random = ~1|sire/dam)

If I understand correctly, that "sire/dam" term gives me both Sire and 
Dam within Sire as random factors.  OK, so now I want to add the two 
interactions (listed above)...

In SAS, I would just enter them as random factors, but I can't seem to 
make that work.  I think I need to make a list that includes Sire/Dam, 
Host:Sire, and Host:Sire/Dam.  Two questions:

1) Is it sufficient to have simply Host:Sire/Dam in order to code for 
both interactions (host*sire and host*dam-within-sire)?

2) In any event, WHAT IS THE SYNTAX FOR MAKING A LIST OF RANDOM FACTORS 
(as opposed to the single random factor, which I was able to enter 
correctly)?

I have looked in section 1.3 of Pinheiro&Bates, which was helpful, but 
I wasn't able to answer my question.

--Matt



- - -


- - -
Matthew L Forister
Department of Ecology and Evolution
State University of New York at Stony Brook
650 Life Sciences Building
Stony Brook, New York 11794-5245
Email: [EMAIL PROTECTED]
Webpage: http://life.bio.sunysb.edu/~forister/
Lab phone: (631) 632-8609
Fax: (631) 632-7626
- - -

Reply via email to