[R] anova-interaction

Richard M. Heiberger rmh at temple.edu
Mon Apr 2 05:58:15 CEST 2007

I continue with your example

dados$mat <- factor(dados$mat)
dados$temp <- factor(dados$temp)
contrasts(dados$temp) <- contr.poly(3)
amt <- aov(time ~ mat*temp, data=dados)
        split=list(mat=list(mat2=1, mat3=2),
                   temp=list(temp.L=1, temp.Q=2)))

interaction2wt(time ~ mat*temp, data=dados)

In your original post, you did not force the factors to be factor().

In the usual usage of split=list(), the individual factors are specified
and the partitioning is automatically expanded to the interactions.

It is possible to use the interaction term directly in split().  See the documentation
for an example.

I included the interaction2wt plot from the HH library to illustrate
the appearance of the interaction.

More information about the R-help mailing list