I am trying to perform a model 3 ANOVA for a 2 factor (say factor A and factor B) anova in which factor A is fixed and factor B is random. Therefore, the error term for the test of factor A should be the A:B interaction term and the error terms for B and A:B should be the model residual (within) term. I have tried to work out how to specify such error strata using aov, however, I have had little success. Is there a way to specify just the interaction (A:B) as an error term using Error() within aov or provide a list of error strata. Ideally as Error=list(A="A:B",B="Within", A:B="Within") In addition, I have tried using lme to perform this function, but again without much success. Can anyone offer any ideas Ta Murray
Hi Murray> I am trying to perform a model 3 ANOVA for a 2 factor (say factor A and > factor B) anova in which factor A is fixed and factor B is random. > ... > In addition, I have tried using lme to perform this function, > but again without much success.What did not work? And, did you read Pinheiro & Bates? Personally, I find it easier to work with lme and this should be an easy one. What about lme (fixed= Y ~ A, random= ~ 1 | B) or lme (fixed= Y ~ A, random= ~ A | B)? Regards, Lorenz - Lorenz Gygax, Dr. sc. nat. Tel: +41 (0)52 368 33 84 / lorenz.gygax at fat.admin.ch Center for proper housing of ruminants and pigs Swiss Veterinary Office agroscope FAT T??nikon, CH-8356 Ettenhausen / Switzerland Fax : +41 (0)52 365 11 90 / Tel: +41 (0)52 368 31 31
On Wed, 16 Jun 2004, Murray Logan wrote:> I am trying to perform a model 3 ANOVA for a 2 factor (say factor A and > factor B) anova in which factor A is fixed and factor B is random. > Therefore, the error term for the test of factor A should be the A:B > interaction term and the error terms for B and A:B should be the model > residual (within) term. I have tried to work out how to specify such > error strata using aov, however, I have had little success. Is there a > way to specify just the interaction (A:B) as an error term using Error() > within aov or provide a list of error strata. > Ideally as Error=list(A="A:B",B="Within", A:B="Within")Error is documented in ?aov, which has a reference. Have you read it? It does contain the answer to your question. I will not try to explain it here, and your attempt at specification suggests you do not understand the meaning of `strata' here. The strata are function of the way the experiment was designed, not the AOV tables you want which should be a consequence of the design.> In addition, I have tried using lme to perform this function, but again > without much success.-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595