How to investigate the effect of a main factor on a respone with ANOVA?
You can quite easily calculate the mean of y at different levels of A, B and C:
by( y, B, mean ) # mean of y at each level
diff( by( y, B, mean ) ) # the difference of the means at the two available levels of y
# same for A and C:
by( y, C, mean )
# etc.
I don't really see your newdata
variable that you plot, but assuming its just data.frame(A,B,C,y)
, my figure matches the mean's of y at levels of predictors. Though my figure is slightly different from yours.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.