CInpvppv {bdpv} R Documentation

Asymptotic confidence intervals for negative and positive predictive values.

Description

Computes asymptotic confidence intervals for negative and positive predictive values under the assumption of binomial sampling and known prevalence, according to Mercaldo et al. (2007). The standard logit intervals and and adjusted version are available, where the standard logit intervals are recommended.

Usage

CIlnpv(x0, x1, p, conf.level = 0.95,
alternative = c("two.sided", "less", "greater"))

CIlppv(x0, x1, p, conf.level = 0.95,
alternative = c("two.sided", "less", "greater"))

CIlnpvak(x0, x1, p, conf.level = 0.95,
alternative = c("two.sided", "less", "greater"))

CIlppvak(x0, x1, p, conf.level = 0.95,
alternative = c("two.sided", "less", "greater"))

CombCInpv(x0, x1, p, conf.level = 0.95,
alternative = c("two.sided", "less", "greater"))

CombCIppv(x0, x1, p, conf.level = 0.95,
alternative = c("two.sided", "less", "greater"))


Arguments

 x0 A vector of two (integer) values, specifying the observed number of positive (x0[1]) and negative (x0[2]) outcomes in the group of true negatives. x1 A vector of two (integer) values, specifying the observed number of positive (x1[1]) and negative (x1[2]) outcomes in the group of true positives. p The assumed prevalence, a single numeric value between 0 and 1. conf.level The confidence level, a single numeric value between 0 and 1, defaults to 0.95 alternative A character string specifying whether two-sided ("two.sided"), only lower bounds ("greater") or only upper bounds ("less") shall be calculated.

Details

CIlnpv and CIlppv implement the standard logit intervals for NPV and PPV, Section 2.2, Eq.(8)-Eq.(11) in Mercaldo et al. (2007). CIlnpvak and CIlppval implement the logit intervals for NPV and PPV with adjusted estimates according to Table II in Mercaldo et al. (2007). The standard logit intervals have better properties, but are not defined in a number of extreme outcomes. The adjusted logit methods do always produce intervals, but have worse frequentist properties (Mercaldo et al. 2007). The functions CombCInpv, CombCIppv combine both methods by computing the stdnard logit method when possible and computing the adjusted methods in those cases where the standard method is not defined. These functions are meant to facilitate simulation, e.g. in simPV, simPVmat.

Value

A list with elements

 conf.int the confidence bounds estimate the point estimate

Note

These functions are meant for internal use. There is not much checking for the validity of input.

Author(s)

Frank Schaarschmidt

References

Mercaldo ND, Lau KF, Zhou XH (2007). Confidence intervals for predictive values with an emphasis to case-control studies. Statistics in Medicine 26: 2170-2183.

BDtest as a user level function

Examples

CIlnpv(x0=c(87,288), x1=c(240,178), p=0.03,
conf.level = 0.95, alternative = "two.sided")

CIlppv(x0=c(87,288), x1=c(240,178), p=0.03,
conf.level = 0.95, alternative = "two.sided")

CIlnpvak(x0=c(87,288), x1=c(240,178), p=0.03,
conf.level = 0.95, alternative = "two.sided")

CIlppvak(x0=c(87,288), x1=c(240,178), p=0.03,
conf.level = 0.95, alternative = "two.sided")



[Package bdpv version 1.3 Index]