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]

From |
Richard Williams <[email protected]> |

To |
[email protected], [email protected] |

Subject |
Re: st: RES: generating a variable with pre-specified correlations with other two (given) variables |

Date |
Wed, 31 Aug 2011 13:59:05 -0500 |

At 07:41 AM 8/31/2011, fjc wrote:

Thanks, Tirthankar. This answers my question as originally posted. Now, something I didn't say in my earlier post (and I think I should have) is that after I generate the new variable (z) I would like to run a regression of y on x and z. But if I generate z in the way you propose, I will get perfect collinearity. ¿Is there any other way to generate z without getting this collinearity?

Slightly tweaking the earlier example, does this do what you want? mat mCorr = (1, .6, .4\ .6, 1, .5 \ .4, .5, 1) corr2data x y z, cstorage(full) corr(mCorr) n(100000) clear corr reg z x y

------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 HOME: (574)289-5227 EMAIL: [email protected] WWW: http://www.nd.edu/~rwilliam * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:

**References**:**st: generating a variable with pre-specified correlations with other two (given) variables***From:*fjc <[email protected]>

**st: RES: generating a variable with pre-specified correlations with other two (given) variables***From:*"Henrique Neder" <[email protected]>

**Re: st: RES: generating a variable with pre-specified correlations with other two (given) variables***From:*Tirthankar Chakravarty <[email protected]>

**Re: st: RES: generating a variable with pre-specified correlations with other two (given) variables***From:*fjc <[email protected]>

- Prev by Date:
**Re: Re: st: Overidentification Tests** - Next by Date:
**Re: Re: st: atrho0() in mvprobit** - Previous by thread:
**Re: st: RES: generating a variable with pre-specified correlations with other two (given) variables** - Next by thread:
**Re: st: RES: generating a variable with pre-specified correlations with other two (given) variables** - Index(es):