lines.thres3 {ThresholdROC} | R Documentation |
Add threshold lines to a plot (three-state setting)
Description
The function includes vertical lines for the thresholds and confidence intervals in a plot created with plot.thres3()
.
Usage
## S3 method for class 'thres3'
lines(x, ci = TRUE, which.boot = c("norm", "perc"),
col = 1, lty = c(1, 2), lwd = 1, ...)
Arguments
x |
an object of class |
ci |
should the confidence intervals be plotted? Default, |
which.boot |
in case |
col |
color for the thresholds and their corresponding confidence intervals. Default, 1. |
lty |
a 2-dimensional vector containing:
Default, |
lwd |
line width for the thresholds and their corresponding confidence intervals. Default, 1. |
... |
further arguments to be passed to |
Value
With a plot.thres3
open, this function adds lines for the required threshold estimates.
References
Skaltsa K, Jover L, Fuster D, Carrasco JL. (2012). Optimum threshold estimation based on cost function in a multistate diagnostic setting. Statistics in Medicine, 31:1098-1109.
See Also
Examples
set.seed(1234)
n <- 100
k1 <- rlnorm(n)
k2 <- rnorm(n, 3, 1)
k3 <- rnorm(n, 5, 1)
rho <- c(1/3, 1/3, 1/3)
# assuming trinormality
start <- c(mean(k1), mean(k3))
thres1 <- thres3(k1, k2, k3, rho, dist1="norm", dist2="norm",
dist3="norm", start=start, ci.method="param")
# not assuming trinormality
start2 <- c(0.05, 0.6, 0.5, 0.95)
set.seed(2014)
thres2 <- thres3(k1, k2, k3, rho, start=start2, B=1000,
ci.method="boot", dist1="lnorm", dist2="norm",
dist3="norm")
plot(thres2, leg.pos="topright", leg.cex=0.8, col=1:4)
lines(thres1, col=5)