RE: [R] Generating a binomial random variable correlated with a

From: Ted Harding <Ted.Harding_at_nessie.mcc.ac.uk>
Date: Mon 04 Apr 2005 - 18:03:29 EST


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:

  1. 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?
  2. Given X, R on (0,n) has a binomial distribution with probability parameter p which depends on X?
  3. 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@nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861
Date: 04-Apr-05                                       Time: 09:03:29
------------------------------ XFMail ------------------------------

______________________________________________
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 Mon Apr 04 18:22:33 2005

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