propBarchart {flexclust} | R Documentation |
This function splits a binary data matrix into subgroups, computes the
percentage of ones in each column and compares the proportions in the
groups using prop.test
. The p-values for all variables
are adjusted for multiple testing and a barchart of group percentages
is drawn highlighting variables with significant differences in
proportion.
propBarchart(x, g, alpha=0.05, correct="holm", strip.prefix="", strip.labels=NULL, which=NULL, ...)
x |
A binary data matrix. |
g |
A factor specifying the groups. |
alpha |
Significance level for test of differences in proportions. |
correct |
Correction method for multiple testing, passed to
|
strip.prefix |
Character string prepended to strips of the
|
strip.labels |
Character vector of labels to use for strips of
|
which |
Index numbers or names of variables to plot. |
... |
Passed on to |
Friedrich Leisch
## create a binary matrix from the iris data plus a random noise column x <- apply(iris[,1:4], 2, function(z) z>median(z)) x <- cbind(x, Noise=sample(0:1, 150, replace=TRUE)) ## There are significant differences in all 4 original variables, Noise ## has most likely no significant difference (of course the difference ## will be significant in alpha percent of all random samples). propBarchart(x, iris$Species)