xv != xi: Cross-validation in Stata
Steven Brownell and
Billy Buchanan
Additional contact information
Steven Brownell: SAG Corporation
Billy Buchanan: SAG Corporation
2024 Stata Conference from Stata Users Group
Abstract:
Evaluating the out-of-sample properties of statistical models is important, especially for predictive modeling/analytics. Although Stata currently implements cross-validation methods natively for some model-fitting commands—dslogit, dspoisson, dsregress, elasticnet, lasso, poivregress, pologit, popoisson, poregress, sqrtlasso, xpoivregress, xpologit, xpopoisson, and xporegress—broader use of cross-validation is not natively supported. At last year’s conference, a user explained the challenges that students and new users face when trying to use cross-validation procedures in Stata. While it is possible to implement the four-step process of splitting the sample, fitting the model to the training sample, predicting outcomes on the validation/test sample, and computing metrics related to the fit, doing so is tedious and time consuming. Developing a program that implements the four-step process above is not a trivial task, despite what one of the authors initially thought. In this talk, we present xv, an extensible prefix command implementing cross-validation for Stata estimation commands.
Date: 2024-08-04
References: Add references at CitEc
Citations:
Downloads: (external link)
http://repec.org/usug2024/US24_Buchanan.html
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:boc:usug24:02
Access Statistics for this paper
More papers in 2024 Stata Conference from Stata Users Group Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().