Hello, I'm exploring different ways to plot interactions for mixed-design ANOVA and am having difficulty getting the brkdn.plot() function in the R plotrix package to work.
The interaction.plot() is working fine, but I'd really like to be able to customize the plot more as the brkdn.plot() function seems to be able to do. Any help pointing out my error(s) would be much appreciated. Pete Miksza IU Jacobs School of Music, Bloomington, IN Here is an example of my code: set.seed(1976) Y = rnorm(1600, 5, 2) A = c(rep(1, 200), rep(2, 200), rep(1, 200), rep(2, 200), rep(1, 200), rep(2, 200), rep(1, 200), rep(2, 200)) B = c(rep(1, 400), rep(2, 400), rep(3, 400), rep(4, 400)) A = factor(A, levels = c(1, 2), labels = c("Treat", "Control")) B = factor(B, levels = c(1, 2, 3, 4), labels = c("One", "Two", "Three", "Four")) dat = data.frame(Y, A, B) str(dat) # I can't figure out why this doesn't work library(plotrix) brkdn.plot("dat$Y", "dat$B", "dat$A", data = dat) # this works interaction.plot(dat$B, dat$A, dat$Y, fun = mean) [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.