Re: [R] anova-interaction

From: Richard M. Heiberger <rmh_at_temple.edu>
Date: Mon 02 Apr 2007 - 03:58:15 GMT


I continue with your example

dados$mat <- factor(dados$mat)
dados$temp <- factor(dados$temp)
contrasts(dados$temp)
contrasts(dados$temp) <- contr.poly(3)
amt <- aov(time ~ mat*temp, data=dados)
summary(amt)
summary.lm(amt)
summary(amt,

        split=list(mat=list(mat2=1, mat3=2),
                   temp=list(temp.L=1, temp.Q=2)))

library(HH)
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   ?summary.aov
for an example.

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



R-help@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 and provide commented, minimal, self-contained, reproducible code. Received on Mon Apr 02 14:01:23 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 02 Apr 2007 - 04:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.