[R] Generating a binomial random variable correlated with a normal random variable

From: Ashraf Chaudhary <mchaudha_at_jhsph.edu>
Date: Sat 16 Apr 2005 - 06:39:05 EST


Hi,
I am posting this problem again (with some additional detail) as I am stuck and could not get it resolved as yet. I tried to look up in alternative sources but with no success. Here it is:

I need to generate a binomial (binary 0/1) random variable linearly correlated with a normal random variable with a specified correlation. Off course, the correlation coefficient would not be same at each run because of randomness.

If I generate two correlated normals with specified correlation and dichotomize one, the correlation of a normal and the binomial random variable would not be the same as specified.

I greatly appreciate your help.
Ashraf



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Apr 16 06:48:11 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:12 EST