Re: [R] ANOVA model

From: Douglas Bates <bates_at_stat.wisc.edu>
Date: Fri 22 Apr 2005 - 02:28:10 EST

Street N.R. wrote:
> Hi,
>
> Could someone tell me if this is the correct model syntax for the
> following dataset:
>
> lme(height~treatment+genotype+treatment*genotype,drought,random=~genotyp
> e)
>
> The dataset has two factors: one fixed - treatment, and one random -
> genotype. I need to test the effect of both factors to identify their
> significance. There are multiple (but not equal) replicates at each
> level of genotype (the replicates are independent biological samples).
>
> What I need are the p values for genotype, treatment and their
> interaction. It is the specification of the random factor that I am
> unsure of.
>
> Also, does anyone know if biologists 'expect' to see type I or type III
> SS results presented in a standard (i.e. non statistical) journal
> article?

I'm not sure exactly what you want but the syntax you have given won't work. If you say that you want a fixed effect for treatment plus random effects for genotype and for the treatment:genotype interaction then I would write the model as

lme(height ~ treatment, drought, random = list(genotype = ~ treatment - 1))

or, from the lme4 package,

lmer(height ~ treatment + (treatment - 1 | genotype), drought)

How many levels of treatment do you have? If you have k levels you will end up estimating (k * (k + 1))/2 variance-covariance parameters for the random effects. This is not difficult for a small value of k but larger k would produce a problem.

I'm not even going to start discussing Type I and Type III sums of squares again. There has been an active thread on that topic for the last several days. Please refer to the archives.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Apr 22 02:33:58 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:21 EST