| Date: | Fri, 26 Jun 2009 16:19:20 -0700 |
| Reply-To: | shiling99@YAHOO.COM |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Shiling Zhang <shiling99@YAHOO.COM> |
| Organization: | http://groups.google.com |
| Subject: | Re: how to generate correlated random variables with given |
|
| Content-Type: | text/plain; charset=ISO-8859-1 |
There is vnaormal call routine in SAS/IML which can generate random
normal with given a covariance structure.
Here is an example.
HTH
proc iml;
mu = { 1, 2,3 };
sigma= { 1.0 0.5 0.4,
0.5 1.25 0.7,
0.4 0.7 2};
call vnormal(et, mu, sigma, 100);
create norm_d from et;
append from et;
quit;
proc corr data=norm_d cov;
var col1 col2 col3;
run;
On Jun 26, 11:58 am, linpan1...@YAHOO.COM (Lin) wrote:
> Hi All,
>
> Could anybody give some references on how to generate correlated random
> variables with given correlation matrix in SAS? Thanks a lot in advance.
>
> Lin
|