pairwiseCImethodsProp {pairwiseCI}R Documentation

Confidence interval methods implemented for proportions in pairwiseCI

Description

For the comparison of two independent samples of binomial observations, confidence intervals for the difference (RD), ratio (RR) and odds ratio (OR) of proportions are implemented.

Usage


Prop.diff(x, y, conf.level=0.95, alternative="two.sided", ...)
Prop.diffAdd2(x, y, conf.level = 0.95, alternative = "two.sided", ...)
Prop.ratio(x, y, conf.level=0.95, alternative="two.sided")
Prop.or(x, y, conf.level=0.95, alternative="two.sided")

Arguments

x observations of the first sample: either a vector with number of success and failure, or a data.frame with two columns (the success and failures))
y observations of the second sample: either a vector with number of success and failure, or a data.frame with two columns (the success and failures))
alternative character string, either "two.sided", "less" or "greater"
conf.level the comparisonwise confidence level of the intervals, where 0.95 is default
... further arguments to be passed to the individual methods, see details

Details

Value

A list containing:

conf.int a vector containing the lower and upper confidence limit
estimate a single named value

Author(s)

Frank Schaarschmidt, Institute of Biostatistics, Leibniz University of Hannover, Germany

References

Examples


# The rooting data.

data(rooting)

# the first comparison should be the same as:

Age5_PosB_IBA0 <- subset(rooting,
 Age=="5" & Position=="B" & IBA=="0")[,c("root", "noroot")]
Age5_PosB_IBA0.5 <- subset(rooting,
 Age=="5" & Position=="B" & IBA=="0.5")[,c("root", "noroot")]

Age5_PosB_IBA0
Age5_PosB_IBA0.5

Prop.diff(x=Age5_PosB_IBA0,y=Age5_PosB_IBA0.5)
Prop.or(x=Age5_PosB_IBA0,y=Age5_PosB_IBA0.5)
Prop.ratio(x=Age5_PosB_IBA0,y=Age5_PosB_IBA0.5)

# is the same as input two vectors x,y each containing
# the count of successes and the count of failures

 colSums(Age5_PosB_IBA0)
 colSums(Age5_PosB_IBA0.5)

Prop.diff(x=c(16,32),y=c(29,19))
Prop.or(x=c(16,32),y=c(29,19))
Prop.ratio(x=c(16,32),y=c(29,19))

 

[Package pairwiseCI version 0.1-6 Index]