I want to simulate contaminates normal data for given covariance structure. I use the pro gramm from the book "simulating data with SAS" . It work. But I want run this 2000 times and get the output 2000 time. I'll try following way and several ways too. But not working and in log page no any error. Please can you anybody tell me what is the mistake of this. Thank you. it =2000 do sim=1 to it; %let N = 100; prociml; mu = {0 0 0}; Cov = {10 3 -2, 3 6 1, -2 1 2}; k2 = 100; p = 0.1; call randseed(1); call randgen(N1, "Binomial,1-p, &N); X = j(&N, ncol(mu)); X[1:N1,]= RandNormal(N1, mu, Cov); X[N1+1:&N,]= RandNormal(&N-N1, mu, k2*Cov); k=rowvec(X); E=k`; PRINT E; end; End;
... View more