Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: obtaining AUC at each iteration when bootstrapping a logistic reg ression model


From   [email protected]
To   [email protected]
Subject   RE: st: obtaining AUC at each iteration when bootstrapping a logistic reg ression model
Date   Tue, 20 Jul 2004 16:58:47 +0200

Thanks, this works very well for me. I used this routine in a stepwise
regression analysis. I wonder whether it is possible to count how many times
a certain variable is selected out of the total number of bootstrap
repetitions. If so, does anyone know how to implement this in the rclass
program below?


-----Oorspronkelijk bericht-----
Van: May Boggess [mailto:[email protected]]
Verzonden: vrijdag 9 juli 2004 17:42
Aan: [email protected]
Onderwerp: Re: st: obtaining AUC at each iteration when bootstrapping a
logistic reg ression model


On Friday, Marieke asked:

> In order to validate internally and asses overfitting in a logistic
> regression model, I performed bootstrapping. However, I noticed that it is
> impossible to get the AUC (from lroc) for each repetition. Does anyone
know
> how I can solve this.
> 
We can write a small rclass program to save the area each time.
Here is an example:

 program drop myboot
 program myboot, rclass
 logit for rep
 lroc, nograph
 ret list
 return scalar area=r(area)
 end

 clear
 sysuse auto
 logit for rep
 lroc, nograph
 bootstrap "myboot" r(area), reps(5) saving(bootresults, replace)

 clear
 use bootresults
 list

--May
 [email protected]



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index