Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Problem with Cholesky matrix function?


From   Kaleb Michaud <kaleb@stanford.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Problem with Cholesky matrix function?
Date   Mon, 24 Nov 2003 09:30:31 -0800

But now, since I can't use -drawnorm- to create random Normal distributed vectors with S covariance matrix (listed below), is there an alternative?

May, thanks for your help!

Kaleb...

At 08:59 AM 11/24/2003 -0600, you wrote:

> symmetric S[10,10]
>        r1   r2   r3   r4   r5   r6   r7   r8   r9  r10
>   c1    1
>   c2    2    2
>   c3    3    3    3
>   c4    4    4    4    4
>   c5    5    5    5    5    5
>   c6    6    6    6    6    6    6
>   c7    7    7    7    7    7    7    7
>   c8    8    8    8    8    8    8    8    8
>   c9    9    9    9    9    9    9    9    9    9
> c10   10   10   10   10   10   10   10   10   10   10
matrix S=[1,2,3,4,5,6,7,8,9,10\2,2,3,4,5,6,7,8,9,10\3,3,3,4,5,6,7,8,9,10\ /*
  */4,4,4,4,5,6,7,8,9,10\5,5,5,5,5,6,7,8,9,10\6,6,6,6,6,6,7,8,9,10\ /*
  */ 7,7,7,7,7,7,7,8,9,10\8,8,8,8,8,8,8,8,9,10\9,9,9,9,9,9,9,9,9,10\ /*
   */10,10,10,10,10,10,10,10,10,10]
mat list S
mat symeigen X v = S
mat list v


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index