Generating correlated binary variables is doable. Simple algorithms are
available for a few common correlation structures; see A. D. Lunn and S. J.
Davies, A note on generating correlated binary variables. _Biometrika_ 85:487-
90, 1998. These are easily programed in Stata. The article also cites the
limited prior work in the area.
I don't know about generating binary random numbers having a specified
correlation with normally distributed random numbers.
Joseph Coveney
--------------------------------------------------------------------------------
Timothy W. Victor wrote:
Consider the correlation matrix below. Y is a continuous normally
distributed outcome variable, T1/T2 are indicator variables (0/1) for a
3-level independent variable, and X1 - Xp are covariates. Say X1 and X2
are dummy variables while the remaining X variables are continuous and
normally distributed.
-------------------------------------------------------------------
| Y T1 T2 X1 X2 X3 … Xp
-------------------------------------------------------------------
Y | 1
T1 | 1
T2 | 1
X1 | 1
X2 | 1
X3 | 1
… | 1
Xp | 1
-------------------------------------------------------------------
I want to generate data based on specified/arbitrary Pearson correlation
matrices just like drawnorm does. However drawnorm will only generate a
multivariate normal distribution. Can anyone provide some direction for
me as to where to go from here? It's been a long week and I'm fresh out
of ideas for this one.
Thanks
*
* 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/