# [R] Modeling Dependent Bernoulli Trials?

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Fri 23 Jul 2004 - 12:55:09 EST

Is there any software to estimate dependence between Bernoulli trials?

I have N observations on k-vectors of 0s and 1s, and I need to model the dependence. Consider the simple case with k = 2. There are 4 possible outcomes: (0, 0), (0, 1), (1, 0), and (1, 1). I assume 0 = "failure" and 1 = "success". I assume further that there are 3 independent failure mechanisms, one that makes the first outcome 0 with probability (1-q1), another that makes the second outcome 0 with probability (1-q2), and a third that make them both 0 with probability (1-q12). I compute the probabilities of these 4 outcomes as follows:

P00 = Pr(0, 0) = q1*q2*q12 = probability of no failures.

P01 = Pr(0, 1) = q1*(1-q2)*q12 = probability of a failure from the second mechanism and none from the other 2.

P10 = Pr(1, 0) = (1-q1)*q2*q12 = probability of a failure from the first mechanism and none from the other 2.

P11 = Pr(1, 1) = 1-Pr(0,0)-Pr(0,1)-Pr(1,0).

With this setup, I can write a likelihood function, parameterize it appropriately, and estimate what I need. However, I wonder if something already exists.

```      Best Wishes,
Spencer Graves

______________________________________________
```
R-help@stat.math.ethz.ch mailing list