secondDer2: Second partial derivative of the cost function (two-state...

View source: R/ThresholdROC-2states.R

secondDer2R Documentation

Second partial derivative of the cost function (two-state setting)

Description

This function calculates the second partial derivative of the cost function at a given threshold.

Usage

secondDer2(x)

Arguments

x

an object of class thres2.

Details

This function evaluates the second derivative of the cost function at the threshold estimate so that the user can assess if this is positive (meaning that the estimation of the threshold 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 binormality, otherwise the second derivative is evaluated numerically in the threshold estimate using functions from the package numDeriv.

Value

The value of the second derivative of the cost function at the given threshold.

References

Skaltsa K, Jover L, Carrasco JL. (2010). Estimation of the diagnostic threshold accounting for decision costs and sampling uncertainty. Biometrical Journal 52(5):676-697.

See Also

thres2

Examples

n1 <- 100
n2 <- 100
set.seed(1234)
par1.1 <- 0
par1.2 <- 1
par2.1 <- 2
par2.2 <- 1
rho <- 0.2
k1 <- rnorm(n1, par1.1, par1.2) # non-diseased
k2 <- rnorm(n2, par2.1, par2.2) # diseased
x <- thres2(k1, k2, rho, method="equal", ci.method="delta")
secondDer2(x)

ThresholdROC documentation built on Aug. 30, 2023, 1:08 a.m.