# [R] multivariate Poisson distribution

(Ted Harding) ted.harding at wlandres.net
Wed Nov 3 23:44:59 CET 2010

```On 03-Nov-10 21:06:53, Jourdan Gold wrote:
> Hello, from a search of the archives and functions, I am looking for
> information on creating random correlated counts from a multivariate
> Poisson distribution. I can not seem to find a function that does this.
> Perhaps, it has not yet been created. Has anyone created an R package
> that does this.
>
> thanks,
> Jourdan Gold

One of the problems with such a question is that your target is not
well defined.

For example, it is easy to set up correlated Possion variates in
much the same elementary way as you can for (say) Normal variates.
Let U, V, W be independent Poisson random variables with means
mu.U, mu.V, mu.W. Then (because of the independence) X = (U+V),
Y = (U+W) and Z = (U+Z) all have Poisson distributions (with means
equal to the sums of the respective means for U, V, W). However,
they are now correlated. The variances for X and Y are (mu.U+mu.V),
(mu.U+mu.W) respectively. The expectation of their product is

Exp((U+V)*(U+W)) = Exp(U^2) + Exp(U*W) + Exp(V*U) + Exp(V*W)
= Var(U) + Exp(U)^2 + mu.U*mu.W + mu.V*mu.U + mu.V*mu.W
= mu.U   + mu.U^2   + ....

while the product of their expectations is this expression without
the initial mu.U, so Cov(X,Y) = mu.U and then their correlation is
mu.U/sqrt((mu.U+mu.V)*(mu.U+mu.W). Thus you could set up X and Y
in this way with chosen positive correlations (though you can't
get negative correlations ion this sort of way and still have
Poisson-distributed X and Y).

As another example, you could have the distribution of Y conditional
on the outcome of X, e.g. X is Poisson with mean mu.X, and, given
that X=x, Y is Poisson with mean x. Then both are still Poisson
and have positive correlations. On the other hand, given X=x, you
could make Y Poisson with mean 1/(1+x). Then both are still Poisson
but this time are negatively correlated: the larger X=x, the smaller
Y is likely to be. (Working out the marginal mean of Y might be
a nasty little exercise ... ).

These two methods (and there are many others possible) will lead to
different forms for the joint distribution of (X,Y).

So "correlated counts from a multivariate Poisson distribution"
does not lead to a definite target!

So it would be useful if you could specify precisely what you
want that phrase to mean.

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.harding at wlandres.net>
Fax-to-email: +44 (0)870 094 0861
Date: 03-Nov-10                                       Time: 22:44:56
------------------------------ XFMail ------------------------------

```