CI2p {ReplicationSuccess}R Documentation

Transforms confidence intervals to p-values.

Description

Transforms confidence intervals to the corresponding p-values.

Usage

CI2p(lower, upper, conf.level=0.95, ratio=FALSE, alternative="two.sided")

Arguments

lower

a vector of lower confidence interval bounds

upper

a vector of upper confidence interval bounds

conf.level

The confidence level of the confidence intervals. Default is 0.95.

ratio

Indicates whether the confidence interval is for a ratio, e.g. an odds ratio, relative risk or hazard ratio. Defaults to FALSE.

alternative

type of p-value. Either "two.sided" or "one.sided". Defaults to "two.sided". Specifies if the P-values are one-sided or two-sided.

Value

A numeric vector of p-values

Examples

CI2p(1, 3)
CI2p(1, 3, alternative="one.sided")

[Package ReplicationSuccess version 0.1-1 Index]