[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Creating a loop for bsample

From   Farasat Bokhari <>
Subject   st: Creating a loop for bsample
Date   Fri, 24 Jul 2009 12:01:56 -0700 (PDT)

Hi -

I need to create replicas of bsample followed by probit and save the coefficients.  Can some one show me how to create the loop and save results? Specifically, i need to run the following command 500 time and save the coefficients of the probit:

use nschschlaws2003;
gen wt2 = weight;
gen myflag1 = 0;
replace myflag1 = 1 if sample1 == 1 & pubsch == 1;

/* the loop part beging below:*/

bsample 6700 if myflag1 == 1, weight(wt2);

probit adhd assistance rewards sanctions
       gender age black othrace hispanic family2 family3 family4
       poverty1-poverty7 edu1 edu2 conachive1 conachive2 schcalls1 schcalls2

replace wt2 = weight;

/* end of what i need to loop */

Thanks in advance.
farasat bokhari


*   For searches and help try:

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