I am trying to create several data sets say N=100 samples each of size n=20 of correlated data variables using proc IML with your suggestion and it does not work for me could you or any one help. Check code below:
proc iml;
/** specify the mean and covariance of the population **/
Mean = {0, 0};
Cov = {1 -0.35,
-0.35 1};
N = 20; /* size of data */
do mm=1 to 100;
dsname="user.randEff" + strip(char(mm));
call randseed(44444);
X = RandNormal(N, Mean, Cov);
create dsname FROM X;
append from X;
close dsname;;
end;
quit;
I expect 100 data sets with names tagged as : user.randEff1, user.randEff2, ..., user.randEff100,
But it creates one data set user.dsname, it loops through the code alright but it looks like data is replaced after
every loop and thus only one dataset is created.
user is the libref