Forums | OpenR

OpenR: R & Statistics /
The another way to do ancova for other learning materials


Huanzhi Gong's profile picture
Posts: 11

10 March 2022, 3:55 PM

data(litter, package="multcomp")
attach(litter)
fit <- aov(weight ~ gesttime*dose, data=litter)
summary(fit) ##this can judge whether there are interaction bewteen virables
fit2 <- aov(weight ~ gesttime + dose)
summary(fit2) ##this can test whether the two variables have significant effects on weight

 

Edits to this post:
Peng Zhao's profile picture
Posts: 128

10 March 2022, 4:31 PM

Thanks for sharing. I added one line so that the code is reproducible.

2 results