Dear all, this is a newbie's question.
I have a 4x4 latin square replicated 3 times. That is:
          operators
batches 1  2  3  4
  1      A  B  C  D
  2      B  C  D  A
  3      C  D  A  B
  4      D  A  B  C
          operators
batches 1  2  3  4
  5      A  B  C  D
  6      B  C  D  A
  7      C  D  A  B
  8      D  A  B  C
          operators
batches 1  2  3  4
  9      A  B  C  D
  10     B  C  D  A
  11     C  D  A  B
  12     D  A  B  C
I have used the same operators but different batches.
How can I get the anova table for this design using R?
I have created a R object as
  bathces operators treatment  y   rep
   1         1        A        y1   1
   1         1        b        b2   1
   .         .        .        .    .
and so on
I appreciate in advance.
L.
Dear Lamack: Have you considered "lme" or "varcomp"? For me, essential documentation for "lme" is Pinhiero and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer). In my experience, it is easier to get "varcomp" to run but harder to get the answers I want from it. Best Wishes, Spencer Graves ################################## lamack lamack wrote:> Dear all, this is a newbie's question. > > I have a 4x4 latin square replicated 3 times. That is: > > operators > batches 1 2 3 4 > 1 A B C D > 2 B C D A > 3 C D A B > 4 D A B C > > operators > batches 1 2 3 4 > 5 A B C D > 6 B C D A > 7 C D A B > 8 D A B C > > operators > batches 1 2 3 4 > 9 A B C D > 10 B C D A > 11 C D A B > 12 D A B C > > I have used the same operators but different batches. > How can I get the anova table for this design using R? > I have created a R object as > > bathces operators treatment y rep > 1 1 A y1 1 > 1 1 b b2 1 > . . . . . > and so on > > I appreciate in advance. > > L. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
kjetil brinchmann halvorsen
2003-Apr-03  05:09 UTC
[R] replication of latin squares --- again
On 2 Apr 2003 at 11:57, lamack lamack wrote:> Dear all, this is a newbie's question. > > I have a 4x4 latin square replicated 3 times. That is: > > operators > batches 1 2 3 4 > 1 A B C D > 2 B C D A > 3 C D A B > 4 D A B C > > operators > batches 1 2 3 4 > 5 A B C D > 6 B C D A > 7 C D A B > 8 D A B C > > operators > batches 1 2 3 4 > 9 A B C D > 10 B C D A > 11 C D A B > 12 D A B C > > I have used the same operators but different batches. > How can I get the anova table for this design using R? > I have created a R object as > > bathces operators treatment y rep > 1 1 A y1 1 > 1 1 b b2 1 > . . . . . > and so on >Something like , assuming the variables batches, operators, treatment, rep are factors and y is numeric, model <- aov(y ~ rep + batches + operators + treatment) or model <- aov(y ~ batches + operators + treatment) (which will give another parametrization of the same model) summary(model) Kjetil Halvorsen> I appreciate in advance. > > L. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help