Learn R Programming

rcompanion (version 1.0.1)

pairwiseRobustTest: Pairwise two-sample robust tests

Description

Performs pairwise two-sample robust tests across groups.

Usage

pairwiseRobustTest(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 dataframe of the groups being compared, the p-values, and the 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 pairwiseRobustTest 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

pairwiseRobustMatrix

Examples

Run this code
data(PoohPiglet)
PoohPiglet = PoohPiglet[order(factor(PoohPiglet$Speaker, 
                        levels=c("Pooh", "Tigger", "Piglet"))),]
pairwiseRobustTest(x      = PoohPiglet$Likert,
                   g      = PoohPiglet$Speaker,
                   method = "fdr")

Run the code above in your browser using DataLab