I have a binary outcome "Y," and I'm running Stata 16's Lasso regression commands (linear and logit). Specifically, I'm estimating two Lasso models and would like to compare their ROC curves (sample code below).
Can I use roctab and roccomp after Lasso regressions? The manual for roctab and roccomp only gives examples for logit and probit regressions, and it is unclear to me whether I can use roctab and roccomp after Lasso linear/logit regressions.
I'm new to both Lasso regressions and ROC curves, so your help would be very helpful! Thank you!
Can I use roctab and roccomp after Lasso regressions? The manual for roctab and roccomp only gives examples for logit and probit regressions, and it is unclear to me whether I can use roctab and roccomp after Lasso linear/logit regressions.
I'm new to both Lasso regressions and ROC curves, so your help would be very helpful! Thank you!
Code:
*Model 1 lasso linear y x1 if training_sample==1, selection(cv, folds(10)) rseed(621) predict predicted_y1 roctab y predicted_y1 *Model 2 lasso linear y x1 x2 if training_sample==1, selection(cv, folds(10)) rseed(621) predict predicted_y2 roctab y predicted_y2 *Compare ROC curves of Model 1 and Model 2 roccomp y predicted_y1 predicted_y2
Comment