bootstrapping and predictive logistic model

#1
Hello members.

I don't have experience with programming in Stata, then, please, I need help with this:

I am developing a predictive logistic model.

The regression coefficients were selected using the stepwise method:

. xi: sw, lr pe(.05 ) pr(.051) lockterm1: logistic depvar (var1 i.var2) var3 (i.var4) var5
. lroc, nograph

depvar is the outcome
var1, var2, var3, var4, var5 are predictors
va2 and var4 are dummy variables, and I want to evaluate each as a whole, so I use the parentheses.
I want to force the inclusion of the variables var1 and var2, one of them is dummy.

The commands in Stata are: bootstrap or vce(bootstrap)

I would like to performed internal validation of the model by using a bootstrapping procedure and to study the stability of the stepwise selected model.

I am interested in determining which variables are consistently selected and to know the value of ROC curve within each sample using bootstrapping, and then correct the regression coefficients and ROC curve for optimism.

I found some post related on the web:

http://www.stata.com/statalist/archive/2011-05/msg01431.html
http://fmwww.bc.edu/repec/bocode/s/swboot.ado

The "swboot" command is great, almost, but don't work for dummy variables. So, somebody can modify that or generate a new .do using these two examples as a guide to what I need.

I am hoping somebody can help me.

Thx in advance.
 

bukharin

RoboStataRaptor
#2
The easiest thing would be to forget about the i. factor variable notation and create your own dummy variables. Then you should be able to use -swboot- (assuming that's the only limitation).
 
#3
The easiest thing would be to forget about the i. factor variable notation and create your own dummy variables. Then you should be able to use -swboot- (assuming that's the only limitation).
Thx bukharin.

I already unsuccesfully tried creating my own dummy variables: (var2_dummy1 var2_dummy2 var2_dummy3) and (var4_dummy1 var4_dummy2 var4_dummy3) and dont work. And also how do I force the inclusion of some variables? because the command "lockterm" does not work with swboot.

So, if anyone can help me, I appreciate it.

Thanks in advance.