[R] replication of latin squares --- again
kjetil brinchmann halvorsen
kjetil at entelnet.bo
Thu Apr 3 07:09:18 CEST 2003
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
More information about the R-help
mailing list