Hi Itay,

I think what you want is the following.


z0 <- lme(growth ~ 1,     random = ~ 1 | population, data =
times,method="ML")

z1 <- lme(growth ~ type, random = ~ 1 | population, data =
times,method="ML")

anova(z0,z1)


This tests for differences in growth between plant types while allowing
growth rates to vary randomly between populations - or to look at it a
different way, it accounts for individuals within populations being more
similar to each other on average than individuals from different
populations.


A construction like this
z1 <- lme(growth ~ type, random = ~ type | population, data =
times,method="ML")

allows the difference in growth between plant types to vary randomly between
populations. But this would only makes sense if different plant types
existed in the same populations, which does not sound to be the case here,
and is asking a different question.



Andy.






andydolman@gmail.com


On 6 April 2010 20:45, Itay Mayrose <itaymay@gmail.com> wrote:

> Hi all,
>
>  This should be a somewhat trivial question but I am new to R and I am a
> bit
> puzzled with the lme syntax.
>
>  I would like to test for growth difference between three types of plants.
> For each plant type I randomly sampled four populations and for each
> population several individuals.
>
>  First, I used lme where type is the fixed effect and population is random
> nested within type, but I am not sure which of the three options the
> correct
> syntax is:
>
> (1)
>
> z1 <- lme(growth ~ type, random = ~ 1 | population, data =
> times,method="ML")
>
>  (2)
>
> z1 <- lme(growth ~ type, random = ~ 1 | type/population, data =
> times,method="ML")
>
>  (3)
>
> z1 <- lme(growth ~ type, random = ~ type | population, data =
> times,method="ML")
>
>
>
> I am using the ML method because I would like to contrast this model
> against
> a NULL model where growth does not depend on plant type (assuming the first
> syntax is correct):
>
> z0 <- lme(growth ~ 1, random = ~ type | population, data =
> times,method="ML")
>
> anova(z0,z1)
>
>
>
> Thanks!
> Khilik
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]


