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: RES: generating a variable with pre-specified correlations with other two (given) variables
From
fjc <[email protected]>
To
[email protected]
Subject
Re: st: RES: generating a variable with pre-specified correlations with other two (given) variables
Date
Wed, 31 Aug 2011 08:49:05 -0300
Thanks Enrique.
The problem I have with corr2data is that it creates new variables
with a given correlation structure among them, while in my case two of
the variables are given, and I only want to add a new one with
pre-specified correlations with the original two. Am I missing
something?
Francisco.
On Wed, Aug 31, 2011 at 7:53 AM, Henrique Neder <[email protected]> wrote:
> Try corr2data:
>
> matrix C = (1,0,.80,-.80\0,1,0,0\.80,0,1,-.80\-.80,0,-.80,1)
> corr2data hsperc corzer1 corpos1 corneg1, n(4137) corr(C)
>
> Henrique Neder
>
>
> -----Mensagem original-----
> De: [email protected]
> [mailto:[email protected]] Em nome de fjc
> Enviada em: terça-feira, 30 de agosto de 2011 23:00
> Para: [email protected]
> Assunto: st: generating a variable with pre-specified correlations with
> other two (given) variables
>
> Dear Statalisters:
>
> I have a dataset with two variables, x and y.
>
> I would like to generate a new artificial variable, z, with
> pre-specified correlations with x and y (no particular distribution
> required).
>
> Any help would be greatly appreciated.
>
> Best,
>
> Francisco.
>
> P.D. I'm using Stata 11 (on Windows XP)
> *
> * 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/
>
> -----
> Nenhum vírus encontrado nessa mensagem.
> Verificado por AVG - www.avgbrasil.com.br
> Versão: 10.0.1392 / Banco de dados de vírus: 1520/3868 - Data de Lançamento:
> 08/30/11
>
>
> *
> * 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/
>
*
* 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/