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

From |
"Carlo Lazzaro" <carlo.lazzaro@tin.it> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: R: generating random correlated variables |

Date |
Sun, 30 Mar 2008 22:02:06 +0200 |

Dear Adrian, as far as the second part of your question is concerned (Then...Stata??), I would suggest you to take a look at -help corr2data- (please, consider that I work with Stata 9.2/SE). Kind Regards, Carlo -----Messaggio originale----- Da: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Adrian de la Garza Inviato: domenica 30 marzo 2008 20.30 A: statalist Oggetto: st: generating random correlated variables I would like to simulate some data and I'd like to know if I can do this with Stata. For instance, suppose I have the following equations: y = 5x + u x = 2z + e and I randomly generate u and y and solve for x in the first equation. Then I'd like to create e such that the correlation between u and e is 0.5, and generate z such that u and z are uncorrelated. Can I do this in Stata? Thank you!! Adrian _________________________________________________________________ How well do you know your celebrity gossip? http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A * * 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/ * * 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/

**Follow-Ups**:**RE: st: R: generating random correlated variables***From:*Adrian de la Garza <kokootchke@hotmail.com>

**References**:**st: generating random correlated variables***From:*Adrian de la Garza <kokootchke@hotmail.com>

- Prev by Date:
**st: generating random correlated variables** - Next by Date:
**RE: st: R: generating random correlated variables** - Previous by thread:
**st: generating random correlated variables** - Next by thread:
**RE: st: R: generating random correlated variables** - Index(es):

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