IDEAS home Printed from https://ideas.repec.org/a/tsj/stataj/v19y2019i3p615-625.html
   My bibliography  Save this article

cvauroc: Command to compute cross-validated area under the curve for ROC analysis after predictive modeling for binary outcomes

Author

Listed:
  • Miguel Angel Luque-Fernandez

    (London School of Hygiene and Tropical Medicine)

  • Daniel Redondo-Sánchez

    (Biomedical Research Institute of Granada)

  • Camille Maringe

    (London School of Hygiene and Tropical Medicine)

Abstract

Receiver operating characteristic (ROC) analysis is used for comparing predictive models in both model selection and model evaluation. ROC analysis is often applied in clinical medicine and social science to assess the tradeoff be- tween model sensitivity and specificity. After fitting a binary logistic or probit regression model with a set of independent variables, the predictive performance of this set of variables can be assessed by the area under the curve (AUC) from an ROC curve. An important aspect of predictive modeling (regardless of model type) is the ability of a model to generalize to new cases. Evaluating the predic- tive performance (AUC) of a set of independent variables using all cases from the original analysis sample often results in an overly optimistic estimate of predictive performance. One can use K-fold cross-validation to generate a more realistic esti- mate of predictive performance in situations with a small number of observations. AUC is estimated iteratively for k samples (the “test” samples) that are indepen- dent of the sample used to predict the dependent variable (the “training” sample). cvauroc implements k-fold cross-validation for the AUC for a binary outcome af- ter fitting a logit or probit regression model, averaging the AUCs corresponding to each fold, and bootstrapping the cross-validated AUC to obtain statistical in- ference and 95% confidence intervals. Furthermore, cvauroc optionally provides the cross-validated fitted probabilities for the dependent variable or outcome, con- tained in a new variable named fit; the sensitivity and specificity for each of the levels of the predicted outcome, contained in two new variables named sen and spe; and the plot of the mean cross-validated AUC and k-fold ROC curves.

Suggested Citation

  • Miguel Angel Luque-Fernandez & Daniel Redondo-Sánchez & Camille Maringe, 2019. "cvauroc: Command to compute cross-validated area under the curve for ROC analysis after predictive modeling for binary outcomes," Stata Journal, StataCorp LP, vol. 19(3), pages 615-625, September.
  • Handle: RePEc:tsj:stataj:v:19:y:2019:i:3:p:615-625
    DOI: 10.1177/1536867X19874237
    Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-3/st0569/
    as

    Download full text from publisher

    File URL: http://www.stata-journal.com/article.html?article=st0569
    File Function: link to article purchase
    Download Restriction: no

    File URL: https://libkey.io/10.1177/1536867X19874237?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:tsj:stataj:v:19:y:2019:i:3:p:615-625. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum or Lisa Gilmore (email available below). General contact details of provider: http://www.stata-journal.com/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.