First I create a 100 obs dataset with a DO...End loop with the variable x. And then I use another DO loop of 600 rounds to generate a total of 600 samples, 100 obs each. And then I use a proc means step to calculate the sample mean of x for each sample. So my goal is to have a total of 600 sample means (Each sample containing 100 obs) and then find out the mean of these sample means. Here is my code: data sample(keep=X);
call streaminit(123);
do j=1 to 600;
do i=1 to 100;
X = rand("Normal");
output;
end;
end;
run;
proc means data=sample;
run; I get a total of 60,000 observations but want 600 sample means. The proc means statement gives the mean for all 60,000 obs.
... View more