Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Drawing multiple variables with fixed correlations to an existing variable and to each other


From   Michael Hanson <mshanson@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Drawing multiple variables with fixed correlations to an existing variable and to each other
Date   Wed, 15 Aug 2007 17:23:49 -0400

On Aug 15, 2007, at 5:01 PM, Rachel wrote:

Is there a way to generate several variables with a given correlation
matrix given a single variable.  Again I have an existing variable x1,
which is distributed as a
standard normal.  I'd like to generate x2 and x3 such that
corr(x1,x2)=p1 and corr(x1,x3)=p2 and corr(x2,x3)=p3.
If I understand your question correctly, -drawnorm ..., corr()- should do what you are looking for. Hope this helps.

-- Mike


*
* 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