multicomp.test: Multiple Comparisons

View source: R/multicomp.test.R

multicomp.testR Documentation

Multiple Comparisons

Description

Performs multiple comparison tests among groups of data. The tests may be either parametric (Yandell, 1997), nonparametric (Higgins, 2004), or Dunn's nonparametric (Glantz, 2005).

Usage

multicomp.test(x, g, method = "parametric", critical.value = "",
  alpha = 0.05)

Arguments

x

the numeric vector of observations. Missing values (NAs) are allowed and removed before the test is performed.

g

any group vector for the observations. Missing values (NAs) are allowed and removed before the test is performed.

method

a character string describing the test. Only the first character is necessary. See Details.

critical.value

a character string describing the method to use for determining the critical value. Only the first character is necessary. See Details.

alpha

the significance level of the test. See Note.

Details

The choices for method are "parametric," "nonparametric," and "dunn." If the method is "parametric," then the comparisons are based on the means and variances of the raw data and the valid choices for critical.value are "tukey" (default), "bonferroni," or "lsd." Otherwise, the comparisons are based on the ranks of the data. Valid choices for critical.value are "tukey" (default), "bonferroni," or "lsd" when method is "nonparametric" and "sidak" (default) or "bonferroni" when method is "dunn." The basic diffference between the default nonparametric method and Dunn's nonparametric method is in the handling of ties.

Value

An object of class MCT containing the following components:

title

a description of the test.

cv.method

the method used to compute the critical value.

alpha

the value of alpha.

crit.value

the critical value for the pairwise comparisons.

response

the name of the response variable.

groups

the name of the group variable.

means

the means for each group.

sizes

the number of observations in each group.

table

the table of the results of the pairwise comparisons.

assoc

a data frame containing the possible association for each group.

Note

All computations of the variance for unequal group sizes are based on the harmonic mean as described in Yandell (1997). That adjustment is only approximate when critical.value is "tukey" and method is "parametric" but useful when the design is slightly unbalanced.
The default nonparametric method method = "nonparametric" is only assymptotically unbiased when some data are tied. For smaller data sets with small numbers of ties, it may be preferable to use Dunn's nonparametric method method = "dunn."

References

Glantz, S.A., 2005, Primer of biostatistics: McGraw Hill, New York, 520 p.

Higgins, J.J., 2004, Introduction to modern nonparametric statistics: Pacific Grove, Calif., Brooks/Cole, 384 p.

Yandell, B.S., 1997, Practical data analysis for designed experiments: London, United Kingdom, Chapman & Hall, 437 p.


USGS-R/smwrStats documentation built on Oct. 11, 2022, 6:15 a.m.