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]
st: RES: generating a variable with pre-specified correlations with other two (given) variables
From
"Henrique Neder" <[email protected]>
To
<[email protected]>
Subject
st: RES: generating a variable with pre-specified correlations with other two (given) variables
Date
Wed, 31 Aug 2011 07:53:36 -0300
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/