Last data update: 2014.03.03

R: Second partial derivative of the cost function (three-state...
secondDer3R Documentation

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

Description

This function calculates the second partial derivatives of the cost function at a given pair of thresholds.

Usage

secondDer3(x)

Arguments

x

an object of class thres3.

Details

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.

Value

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

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

thres3

Examples

## Not run: 
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)

## End(Not run)

Results