I have following data set from which I am running bootstrap samples data bio; infile datalines delimiter=','; input pat seq period trt Y C; logY=log(Y); logC=log(C); cards; 1,1,1,1,950.59,96.3 1,1,2,2,1637.71,194 1,1,3,2,2076.75,341 1,1,4,1,1485.93,316 2,1,1,1,774.44,87.6 2,1,2,2,585.89,56.2 2,1,3,2,801.26,89.1 2,1,4,1,773.51,84.6 . . .. . 38,2,1,2,2252.76,304 38,2,2,1,2262.88,255 38,2,3,1,1957.66,301 38,2,4,2,3084.05,685 ; Now I am using following cods for taking bootstrap sample from above data set and it works fine for a single bootstrap sample %let anz=19; proc datasets nolist; delete out1; run; data _boot_; do seq=1 to 2; do pat=(seq-1)*&anz+1 to seq*&anz; pat_old=(seq-1)*&anz+int(&anz*ranuni(0)+1); output; end; end; run; proc sql noprint; create table out1 as select _boot_.pat, bio.* from _boot_ left join bio(rename=(pat=pat_old)) on _boot_.pat_old=bio.pat_old order by _boot_.pat, seq, pat_old, period; quit; Proc print data=out1; run; But when I want to generate multiple bootstrap sample so I have to run this code multiple times using do loop. The problem is that I don't understand where should I put do loop for multiple samples pls guide me in this regard
... View more