Learn R Programming

pairwiseCI (version 0.1-21)

pairwiseCIInt: Internal functions for pairwiseCI

Description

For internal use. Two different methods for data representable as a two numeric vectors (pairwiseCICont) and data representable as matrix with two columns like cbind(successes, failures). 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 methods documented in pairwiseCImethodsCont and pairwiseCImethodsProp.

Usage

pairwiseCICont(formula, data, alternative="two.sided",
 conf.level=0.95, method, control=NULL, ...)

pairwiseCIProp(formula, data, alternative="two.sided",
 conf.level=0.95, control=NULL, method, ...)

Arguments

formula
A formula of the structure response ~ treatment for numerical variables, and of structure cbind(success, failure) ~ treatment for binomial variables
data
A data.frame containing the numerical response variable and the treatment and by variable as factors. Note, that for binomial data, two columns containing the number of successes and failures must be present in the data.
alternative
Character string, either "two.sided", "less" or "greater"
conf.level
The comparisonwise confidence level of the intervals, where 0.95 is default
method
A character string specifying the confidence interval method, one of the following options "Param.diff": Difference of two means, with additional argument var.equal=FALSE(default) as in t.test(stats) "Param.
control
Character string, specifying one of the levels of the treatment variable as control group in the comparisons; default is NULL, then CI for all pairwise comparisons are calculated.
...
further arguments to be passed to the functions specified in methods

Value

  • a list containing:
  • estimatenumeric vector: the point estimates
  • lowernumeric vector: lower confidence bounds
  • uppernumeric vector: upper confidence bounds
  • compnamescharacter vector with the names of comparisons

Details

These functions are for internal use in pairwiseCI.

See Also

pairwiseCI for the user level function; pairwiseCImethodsCont, and pairwiseCImethodsProp for a more detailed documentation of the implemented methods; summary.pairwiseCI for a summary function. t.test(stats), wilcox.exact(exactRankTests), prop.test(stats) for the sources of some of the CI methods, multcomp for simultaneous intervals for difference for various contrasts, mratios for simultaneous intervals for the ratio in many-to-one comparisons