Skip to content

Generating a binomial random variable correlated with a normal random variable

3 messages · Ashraf Chaudhary, (Ted Harding), Dimitris Rizopoulos

#
Hi All:
I would like to generate a binomial random variable that correlates with a
normal random variables with a specified correlation. Off course, the
correlation coefficient would not be same at each run because of randomness.
I greatly appreciate your input.
Ashraf
#
On 03-Apr-05 Ashraf Chaudhary wrote:
It's not at all clear what you mean by this. For example,
are you seeking:

A) X (continuous) and R (discrete, distributed on (0,n))
   are such that the marginal distribution of X is normal,
   the marginal distribution of R is binomial, and the
   correlation coefficient between X and R is specified?

B) Given X, R on (0,n) has a binomial distribution with
   probability parameter p which depends on X?

C) For each of n values of X, R is binary (0,1) with
   P[R=1] depending on X, such that sum(R from 1 to n)
   has a binomial distribution, and the correlation
   between X and R is specified?

And so on.

Also, it is not obvious what interpretation to put on
the correlation coefficient between a discrete variable
and a continuous variable.

How large is the "n" parameter in the binomial distribution
intended to be?

It would help if you described what you are really looking
for in much more explicit detail!

Bestg wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 04-Apr-05                                       Time: 09:03:29
------------------------------ XFMail ------------------------------
#
one idea is to consider that the underlying (for ease normally 
distributed) latent variables that produce the Bernoulli trials are 
correlated with your original normal random variable.

I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Ashraf Chaudhary" <mchaudha at jhsph.edu>
To: <r-help at stat.math.ethz.ch>
Sent: Monday, April 04, 2005 12:41 AM
Subject: [R] Generating a binomial random variable correlated with a 
normalrandom variable