You may get the MU using another array as:
%let ErrorVariance=3.0202;
%let BoxVariance=0.1511;
%let nsim=1;
%let Box=4;
%let Sample=5;
DATA SIM;
call streaminit(123);
array numBoxes[5] _temporary_ (4,5,6,7,8);
array numSamples[6] _temporary_ (5,6,7,8,9,10);
array t[6] _temporary_ (2.8994,2.6219,2.3222,2.7140,2.2615,3.0288);
do isim = 1 to ≁
do trt=1 to 6;
mu= t[trt];
do Box=1 to &Box;
rndBox=rand("Normal",0,sqrt(&BoxVariance)); /* create block specific deviates */
do sample=1 to &Sample;
rndSample=rand("Normal",0,sqrt(&ErrorVariance));
y=mu+rndBox+rndSample;
output;
end;
end;
end;
end;
run;
... View more