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? Thanks in advance
You are missing a grouping factor and you don't need to specify main effects and the interaction. You just need lme(height~treatment*genotype, random=~genotype|ID, drought) If you're using lme4 and not nlme you would specify this as lmer(height~treatment*genotype+(genotype|ID), drought) -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Street N.R. Sent: Thursday, April 21, 2005 12:13 PM To: r-help at stat.math.ethz.ch Subject: [R] ANOVA model 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? Thanks in advance ______________________________________________ R-help at 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
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.