Learn R Programming

rcompanion (version 1.13.2)

pairwiseRobustTest: Pairwise two-sample robust tests

Description

Performs pairwise two-sample robust tests across groups.

Usage

pairwiseRobustTest(formula = NULL, data = NULL, x = NULL, g = NULL,
  est = "mom", nboot = 599, method = "fdr", ...)

Arguments

formula

A formula indicating the measurement variable and the grouping variable. e.g. y ~ group.

data

The data frame to use.

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 input should include either formula and data; or x, and g.

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
# NOT RUN {
data(PoohPiglet)
PoohPiglet$Speaker = factor(PoohPiglet$Speaker,
                     levels = c("Pooh", "Tigger", "Piglet"))
PT = pairwiseRobustTest(Likert ~ Speaker,
                        data   = PoohPiglet,
                        method = "fdr")
PT
cldList(comparison = PT$Comparison,
        p.value    = PT$p.adjust,
        threshold  = 0.05)
       
# }

Run the code above in your browser using DataLab