plotnPV: Plot experimental design for different setting in a single...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The function creates a plot from the results of the function nPV.

Usage

1
plotnPV(x, NPVpar = NULL, PPVpar = NULL, legpar = NULL, ...)

Arguments

x

an object of class "nPV" as can be obtained by calling function nPV

NPVpar

a named list which specifies plot parameters for the negative predictive values, possible are lty, lwd, col, pch

PPVpar

a named list which specifies plot parameters for the positive predictive values, possible are lty, lwd, col, pch

legpar

a named list to pass arguments to the legend. See ?legend for the possible arguments.

...

further arguments to be passed to plot

Details

Required sample sizes for different experimental settings and prevalences, needed to achieve a prespecified power can be calculated in dependence of the proportion of true negative and true positive compounds in the validation set, using function nPV. This function draws a plot with the proportion of positive on x and the total sample size on y, combining all parameter settings in one plot. Parameter settings my be distinguished bylty, lwd, col, pch in NPVpar and PPVpar. By default a legend is drawn which can be further modified in legpar.

Value

A plot.

Author(s)

Frank Schaarschmidt

References

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.

See Also

plotnPV2 for a plot with separate subplots for each parameter setting

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
TEST<-nPV(se=c(0.9, 0.92, 0.94, 0.96, 0.98), sp=c(0.98, 0.96, 0.94, 0.92, 0.90),
 pr=0.12, NPV0=0.98, PPV0=0.4, NPVpower = 0.8, PPVpower = 0.8,
 rangeP = c(0.05, 0.95), nsteps = 100, alpha = 0.05)

plotnPV(TEST)

# plot parameters maybe introduced via ...
# the legend maybe modified via legpar:

plotnPV(TEST, log="y", legpar=list(x=0.6))

# own colour definitions
plotnPV(TEST, NPVpar=list(col=1:6, lwd=2, lty=1),
 PPVpar=list(col=1:6, lwd=2, lty=3))

bdpv documentation built on May 2, 2019, 1:08 p.m.