Learn R Programming

pairwiseCI (version 0.1-17)

pairwiseTestInt: Internal functions for pairwiseTest

Description

Only for internal use by pairwiseTest. Two different functions for data representable as a two numeric vectors (pairwiseTestCont) and data representable as matrix with two columns (pairwiseTestProp) as created can be done with a formula like cbind(successes, failures) ~ group. Functions that split up a data.frame according to one factor, and perform all pairwise comparisons and comparisons to control among the levels of the factor by calling functions that can deal with two vectors x and y or the one documented in ?Prop.test.

Usage

pairwiseTestCont(formula, data, alternative="two.sided", control=NULL, method, ...)
pairwiseTestProp(formula, data, alternative="two.sided", control=NULL, method, ...)

Arguments

formula
a formula specifiying the response and the factor variable: response ~ factor
data
a data frame, containing the variables specified in formula
alternative
character string, defining whether the direction of the alternative hypothesis, passed to the function defined in method
method
character string, giving the name of the function, which shall be used to calculate local p-values. Any function, taking two vectors x, and y as first arguments and returning a list with the p.value in a list element named p.value can be spec
control
optional character string, defining the name of a control group. Must be one of the levels of the factor variable defined in formula. By default control=NULL, then all pairwise comparisons between the levels of the factor variable are compu
...
Arguments to be passed the function defined in method

Value

  • a data.frame containing the columns
  • p.valuenumeric vector: the p.values
  • compnamescharacter vector: the names of the comparisons performed
  • groupxcharacter vector: the names of the first group
  • groupycharacter vector: the names of the second group

Details

For internal use in pairwiseTest.

See Also

pairwiseTest for a user level function, and pairwise.t.test, pairwise.prop.test, p.adjust for further functions to calculate multiplicity adjusted p-values.