Hello All
I am trying to run some sampling simulation and found an option in PROC SURVEYSELECT rep=nrep that would let me round repeated samples of a universe.
If my seed is fixed how does PROC SURVEYSELECT get the "seed" for the replicates. My example below compares the REP option vs a MACRO loop. For the proc surveyselect with replicate=1 has the same sample output as the macro loop 1 (just as expected).
I used to have a macro loop through proc surveyselect for repeated samples, but with the REP option PROC SURVEYSELECT is much faster.
Any advice?
proc surveyselect data=sashelp.shoes sampsize=300 method=srs
out=sample_data_rep seed=8 rep=100;
run;
** vs;
%macro loopit;
%do i=1 %to 100;
%let seed=%eval(7+&i);
proc surveyselect data=sashelp.shoes sampsize=300 method=srs
out=sample_data&i seed=&SEED;
run;
proc append base=sample_data_macro data=sample_data&i;
run;
%end;
%mend loopit;
%loopit;
proc compare data=sample_data_rep compare=sample_data_macro;
run;
Darryl