Learn R Programming

rcompanion (version 1.0.1)

pairwiseRobustMatrix: Pairwise two-sample robust tests with matrix output

Description

Performs pairwise two-sample robust tests across groups with matrix output.

Usage

pairwiseRobustMatrix(x, g, est = "mom", nboot = 599, method = "fdr", ...)

Arguments

x
The response variable as a vector.
g
The grouping variable as a vector.
est
Estimate used for group comparisons. "onestep", "mom", "median", or "mean". See pb2gen for details.
nboot
The number of bootstrap samples.
method
The p-value adjustment method to use for multiple tests. See p.adjust.
...
Additional arguments passed to pb2gen.

Value

A list consisting of: A matrix of p-values; the p-value adjustment method; a matrix of adjusted p-values.

Details

The WRS2 package provides functions for robust estimation and hypothesis testing. This function invokes the pb2gen to make pairwise comparisons among groups. The pairwiseRobustMatrix function can be used as a post-hoc method following an omnibus one-way anova with robust estimation.

References

http://rcompanion.org/rcompanion/d_08a.html

See Also

pairwiseRobustTest

Examples

Run this code
data(PoohPiglet)
PoohPiglet = PoohPiglet[order(factor(PoohPiglet$Speaker, 
                        levels=c("Pooh", "Tigger", "Piglet"))),]               
PT = pairwiseRobustMatrix(x      = PoohPiglet$Likert,
                          g      = PoohPiglet$Speaker,
                          method = "fdr")$Adjusted
PT                           
library(multcompView)
multcompLetters(PT,
                compare="<",
                threshold=0.05,
                Letters=letters)

Run the code above in your browser using DataLab