oneway: Nonparametric group comparisons

Description Usage Arguments Details Value Author(s) Examples

View source: R/oneway.R

Description

oneway computes nonparametric group comparisons, including an omnibus test and post-hoc pairwise group comparisons.

Usage

1
2
oneway(formula, data, exact = FALSE, sort = TRUE, method = c("holm",
  "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"))

Arguments

formula

an object of class formula, relating the dependent variable to the grouping variable.

data

a data frame containing the variables in the model.

exact

logical. If TRUE, calculate exact Wilcoxon tests.

sort

logical. If TRUE, sort groups by median dependent variable values.

method

method for correcting p-values for multiple comparisons.

Details

This function computes an omnibus Kruskal-Wallis test that the groups are equal, followed by all pairwise comparisons using Wilcoxon Rank Sum tests. Exact Wilcoxon tests can be requested if there are no ties on the dependent variable. The p-values are adjusted for mulitple comparisons using the p.adjust function.

Value

a list with 7 elements:

CALL

function call

data

data frame containing the depending and grouping variable

sumstats

data frame with descriptive statistics by group

kw

results of the Kruskal-Wallis test

method

method used to adjust p-values

wmc

data frame containing the multiple comparisons

vnames

variable names

Author(s)

Rob Kabacoff <rkabacoff@statmethods.net>

Examples

1
2
3
4
results <- oneway(hlef ~ region, life)
summary(results)
plot(results, col="lightblue", main="Multiple Comparisons",
     xlab="US Region", ylab="Healthy Life Expectancy at Age 65")

yunxileo/npar documentation built on May 4, 2019, 7:44 p.m.