Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Putting a multivariate normal draw into a matrix?


From   Nick Chandler-Klein <[email protected]>
To   statalist <[email protected]>
Subject   Re: st: Putting a multivariate normal draw into a matrix?
Date   Tue, 7 May 2013 03:02:05 -0700

This looks like it will work. Thank you!

On Tue, 7 May 2013 09:29:01, Maarten Buis wrote:

>What about this:
>
>*------------------ begin example ------------------
>mata:
>
>V = 1, .2 \ .2, 1
>
>A = cholesky(V)
>draw= rnormal(10000,2,0,1)
>draw = (A*draw')'
>
>end
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index