Multiple comparison plot.
mc_plot.Rd
For grouped data. Draws boxplots for each group and overlays with confidence intervals for pairwise comparison of means.
Arguments
- data
A list of vectors, such as that returned by
split
.- fit
Either an
aov
fit, or else a matrix with columns estimate, followed by confidence intervals. If fit is not anaov
fit, the path argument should be a vector.- path
an index vector or a function. If a vector, groups are plotted in order
data[path]
. By default, it is the functioneulerian
, and produces an ordering where each pair of groups appears adjacently, with p-values roughly increasing as the sequence progresses.- col
A vector of colours, one per group.
- levels
Vector of increasing confidence levels.
- varwidth
Passed to
boxplot
.- frame.plot
Passed to
boxplot
.- boxwex
Passed to
boxplot
.- cex
Passed to
boxplot
.- zoom
If provided, a numeric vector specifying a subsequence of path to display.
- ci.yusr
Specifies the vertical
par(usr)
for the confidence intervals. Defaults to max and min.- ci.pos
If TRUE, all CIs are mu(max) - mu(min), otherwise mu(right) - mu(left).
- ...
Optional arguments, passed to
boxplot
andoverlayCI
.
References
see overview
See also
See also overlayCI
Examples
require(PairViz)
data(cancer)
bx <- with(cancer, split(sqrt(Survival),Organ))
a <- aov(sqrt(Survival) ~ Organ,data=cancer)
if (FALSE) {
dev.new(height=4.5, width=9.5)
op <- par(no.readonly = TRUE)
par(cex.axis=.75, cex.main = 1.0, cex.lab=1)
par(mar=c(3,5,3,5))
mc_plot(bx,a,main="Pairwise comparisons of cancer types", ylab="Sqrt Survival")
par(op)
}