thres2: Threshold point estimation and confidence intervals... In ThresholdROC: Optimum Threshold Estimation

Description

This function calculates the threshold estimate and its corresponding confidence interval in a two-state setting.

Usage

 1 2 3 4 5 6 thres2(k1, k2, rho, costs = matrix(c(0, 0, 1, (1 - rho)/rho), 2, 2, byrow = TRUE), R=NULL, method = c("equal", "unequal", "empirical", "smooth", "parametric"), dist1 = NULL, dist2 = NULL, ci = TRUE, ci.method = c("delta", "boot"), B = 1000, alpha = 0.05, extra.info = FALSE, na.rm = FALSE, q1=0.05, q2=0.95)

Details

For parameter method the user can choose between "equal" (assumes binormality and equal variances), "unequal" (assumes binormality and unequal variances), "empirical" (leaves out any distributional assumption), "smooth" (leaves out any distributional assumption, but uses a kernel to estimate the densities) or "parametric" (based on the distribution assumed for the two populations).

Parameters dist1 and dist2 can be chosen between the following 2-parameter distributions: "beta", "cauchy", "chisq" (chi-squared), "gamma", "lnorm" (lognormal), "logis" (logistic), "norm" (normal) and "weibull". Notice that dist1 and dist2 are only needed when method = "parametric".

For parameter ci.method the user can choose between "delta" (delta method is used to estimate the threshold standard error assuming a binormal underlying model) or "boot" (the confidence interval is calculated by bootstrap).

Value

An object of class thres2, which is a list with two components:

 T a list of at least seven components: thres threshold estimate. prev disease prevalence provided by the user. costs cost matrix provided by the user. R R term, the product of the non-disease odds and the cost ratio (for further details about this concept, see References). method method used in the estimation. k1 vector containing the healthy sample values provided by the user. k2 vector containing the diseased sample values provided by the user. When method = "empirical", T also contains: sens sensitivity obtained. spec specificity obtained. cost the minimum cost associated with T\$thres. tot.thres vector of possible thresholds. Only if extra.info = TRUE. tot.cost vector of empirical costs. Only if extra.info = TRUE. tot.spec.c complementary of the vector of empirical specificities (1-spec). Only if extra.info = T. tot.sens vector of empirical sensitivities. Only if extra.info = TRUE. When method = "parametric", T also contains: dist1 distribution assumed for the healthy population. dist2 distribution assumed for the diseased population. pars1 a numeric vector containing the estimation of the parameters of dist1. pars2 a numeric vector containing the estimation of the parameters of dist2. CI When ci.method = "delta", a list of five components: lower the lower limit of the confidence interval. upper the upper limit of the confidence interval. se the standard error used in the calculation of the confidence interval. alpha significance level provided by the user. ci.method method used for the confidence intervals calculation. When ci.method = "boot", a list of eight components: low.norm the lower limit of the bootstrap confidence interval based on the normal distribution. up.norm the upper limit of the bootstrap confidence interval based on the normal distribution. se the bootstrap standard error used in the calculation of the confidence interval based on the normal distribution. low.perc the lower limit of the bootstrap confidence interval based on percentiles. up.perc the upper limit of the bootstrap confidence interval based on percentiles. alpha significance level provided by the user. B number of bootstrap resamples used. ci.method method used for the confidence intervals calculation. When ci = FALSE, NULL.

Note

It is assumed that k1 is the sample with lower values. If that is not the case, k1 and k2 (and the corresponding parameters) are exchanged.

References

Efron B, Tibshirani RJ. (1993). An introduction to the bootstrap, Chapman & Hall.

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.