Hi,
I want to analyse a small experiment studying the effect of two factors: tree
family (there are eight families, fixed effect) and hormone application (two
levels, fixed effect) on the weight of the seed collected from the trees. There
are between four an eight trees within each family (numbered from 1 to 8, a
random sample of all potential trees that can be produced by a family) that
were assessed for seed weight.
Initially I thought that this could be done using the following code:
DerfordGroup <- groupedData(seedwt ~ 1 | Family/Tree, data=DerfordPaclo,
+ outer = ~Family*Hormone, labels = list(y="Seed Weight"), units =
list(y="(g)"))
DerfordGroup.lme <- lme(seedwt~Family*Hormone, data=DerfordGroup, random=~ 1 |
Family/Tree)
But it seems to be a conflict with the definition of Family as part of the
fixed effects and then using Family/Tree in the random effects. Then, I created
a new tree ID, pasting the codes of Family and Tree (new.id, ensuring that all
trees would have a different code) and using:
DerfordGroup <- groupedData(seedwt ~ 1 | new.id, data=DerfordPaclo,
+ outer = ~Family*Hormone, labels = list(y="Seed Weight"), units =
list(y="(g)"))
DerfordGroup.lme <- lme(seedwt~Family*Hormone, data=DerfordGroup, random=~ 1 |
new.id)
This seems to work OK, but I'm not sure if I have achieved my aim of fitting
trees within family as random. Some questions:
1. Is the second code correct?
2. Is there any other way to specify the code without creating a new variable
or renumbering the trees?
3. If the family effect is significant, how can I specify contrasts in lme to
test the significance of the difference between specific combinations of
families?
Cheers,
Luis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr Luis A. Apiolaza
Forest Biometrician
Forestry Tasmania
GPO Box 207
Hobart Tas 7001
Australia
email: Luis.Apiolaza@forestrytas.com.au
phone: +61-3-6233 8127
web: http://www.forestrytas.com.au
http://uncronopio.org/luis
"All I want is a warm bed, and a kind word,
and unlimited power" --Ashleigh Brilliant
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This transmission is intended solely for the person
or organisation to whom it is addressed.
It is confidential and may contain legally privileged information.
If you have received this transmission in error,
you may not use, copy or distribute it.
Please advise us by return e-mail or by phoning 61 3 62338203
and immediately delete the transmission in its entirety.
We will meet your reasonable expenses of notifying us.
Despite our use of anti-virus software, Forestry Tasmania cannot guarantee
that this transmission is virus-free.
|