View source: R/ThresholdROC-3states.R
secondDer3 | R Documentation |
This function calculates the second partial derivatives of the cost function at a given pair of thresholds.
secondDer3(x)
x |
an object of class |
This function evaluates the second partial derivatives of the cost function at the threshold estimates so that the user can assess if these are positive (meaning that the estimation of the thresholds leads to a minimum in the cost function) or close to zero and hence the minimum of the cost function does not exist. A closed formula is given when assuming trinormality, otherwise the second derivatives are evaluated numerically in the threshold estimates using functions from the package numDeriv
.
The value of the second derivative of the cost function at the given thresholds.
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.
thres3
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)
start <- c(mean(k1), mean(k3))
x <- thres3(k1, k2, k3, rho, dist1="norm", dist2="norm",
dist3="norm", start=start, ci.method="param")
secondDer3(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.