[R] Generating a binomial random variable correlated with a

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Mon Apr 4 10:03:29 CEST 2005


On 03-Apr-05 Ashraf Chaudhary wrote:
> 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

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 ------------------------------




More information about the R-help mailing list