Skip to contents

Calculate the optimal probability classification threshold using the minimum p-value method.

Usage

calc_minp(estimates, truth)

Arguments

estimates

A vector of classification probabilities. Values should represent the probability of 1 in the truth argument.

truth

An integer vector of 0 and 1 representing the true classifications.

Value

A numeric scalar representing the optimal probability threshold.

Details

The minimum p-value method (Miller & Siegmund, 1982; Rota & Antolini, 2014) attempts to identify the cut-point that best separates the two groups according to the maximum achievable Chi-square statistic. For each possible threshold, a 2x2 contingency table is created from the true status and the predicted status, given the current threshold. We then calculate a 1-degree of freedom Chi-square test on the association between the true and predicted statuses, where a large test statistic (and therefore small p-value) indicate there is an association.

The optimality criterion is then defined as the threshold that results in the maximum Chi-square statistic or, conversely, the minimum p-value.

References

Miller, R., & Siegmund, D. (1982). Maximally selected Chi square statistics. Biometrics, 38(4), 1011-1016. doi:10.2307/2529881

Rota, M., & Antolini, L. (2014). Finding the optimal cut-point for Gaussian and Gamma distributed biomarkers. Computational Statistics and Data Analysis, 69, 1-14. doi:10.1016/j.csda.2013.07.015

See also

Other optimal threshold methods: calc_cz(), calc_gmean(), calc_iu(), calc_topleft(), calc_youden()

Examples

calc_minp(
  estimates = dcm_probs$att1$estimate,
  truth = dcm_probs$att1$truth
)
#> [1] 0.2983071

calc_minp(
  estimates = dcm_probs$att2$estimate,
  truth = dcm_probs$att2$truth
)
#> [1] 0.7062065

calc_minp(
  estimates = dcm_probs$att3$estimate,
  truth = dcm_probs$att3$truth
)
#> [1] 0.3531443