Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc iml;
- Cov = {1 0.3,
- 0.3 1};
- X = RandNormal(&n*&nrep, {0,0}, Cov);
- ID = colvec(repeat(T(1:&nrep), 1, &n));
- n_id = repeat(&n, &n * &nrep);
- B = n_id|| ID || X;
- x = B[,3];
- z = B[,4];
- eta = 2 - 4 * x + 2 * z;
- mu = exp(eta);
- y = rand("Poisson", mu);
- B = B || eta || mu || y;
- d = {n, rep, x, z, eta, mu, y};
- mattrib B colname=d;
- create raw from B [colname=d];
- append from B;
- close raw;
- run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement