# testing how to do a twoway.anova method
data(sentRT)
sent.2way <- twoway(sentRT)
sent.df <- as.data.frame(sent.2way)
aov1 <- anova(mod1 <- aov(data ~ row + col, data=sent.df))
aov2 <- anova(mod2 <- aov(data ~ row + col + nonadd, data=sent.df))
aov3 <- anova(mod1, mod2)
sent.mod1 <- lm(data ~ row + col, data=sent.df)
sent.mod2 <- lm(data ~ row + col + nonadd, data=sent.df)
anova(sent.mod1)
anova(sent.mod2)
# test non-add
anova(sent.mod1, sent.mod2)
str(aov1)
rownames(aov1)
attr(aov1, "heading") <- "Analysis of Variance Table, assuming additivity"
aov1
attr(aov2, "heading") <- "Analysis of Variance Table, allowing non-additivity"
aov2
row.names(aov2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.