nNPVPPV {bdpv} | R Documentation |
For internal use. Functions to compute sample size (to reach a pre-specified power) and optimal allocation of true positives and true negatives in case-control designs for binary diagnostic tests (Mercaldo et al. 2007).
nNPV(propP, se, sp, prev, NPV0, conf.level = 0.95, power = 0.8) nPPV(propP, se, sp, prev, PPV0, conf.level = 0.95, power = 0.8) AOppvnpv(se, sp)
se |
a numeric value, specifying the expected sensitivity |
sp |
a numeric value, specifying the expected specificity |
propP |
a vector of numeric values of proportions of truely positives in the trial (n1/(n1+n0)) |
prev |
a numeric value, the prevalence |
NPV0 |
a numeric value, the negative predictive value to be rejected under H0: NPV>=NPV0 |
PPV0 |
a numeric value, the positive predictive value to be rejected under H0: PPV>=PPV0 |
conf.level |
a single numeric values, the nominal confidence level (1-alpha) |
power |
a single numeric value, the power that is to be obtained |
The functions implement the methods described in section 3.2 of Steinberg et al.(2009), nPPV gives the solution to Eq.(3.6) and NA if necesarry conditions mentioned before are not fulfilled, nNPV gives the solution to Eq.(3.8) and NA if necesarry conditions mentioned before are not fulfilled, AOppvnpv gives the optimal proportion of true poistives as are solutions to Eq.(3.4) and Eq. (3.6) for PPV and NPV, respectively.
For nNPV and nPPV: a list with first element
n |
the (vector of) sample size (s), or NA if necessary conditions are not met |
and further elements giving the input arguments
Frank Schaarschmidt
Steinberg DM, Fine J, Chappell R (2009). Sample size for positive and negative predictive value in diagnostic research using case-control designs. Biostatistics 10,1, 94-105.
For a combination of PPV and NPV experimental design see nPV
and plotnPV
; to validate small sample results of these asymptotic formulas, see simPVmat
nPPV(propP=c(0.2,0.4,0.6,0.8), se=0.9, sp=0.9, prev=0.1, PPV0=0.4, conf.level=0.95, power=0.8) nNPV(propP=c(0.2,0.4,0.6,0.8), se=0.9, sp=0.9, prev=0.1, NPV0=0.95, conf.level=0.95, power=0.8) AOppvnpv(se=0.9, sp=0.9)