R: Mixed Poisson Distribution

dmixpois {spatstat.core} | R Documentation

## Mixed Poisson Distribution

### Description

Density, distribution function, quantile function and random generation for a mixture of Poisson distributions.

### Usage

    dmixpois(x, mu, sd, invlink = exp, GHorder = 5)
    pmixpois(q, mu, sd, invlink = exp, lower.tail = TRUE, GHorder = 5)
    qmixpois(p, mu, sd, invlink = exp, lower.tail = TRUE, GHorder = 5)
    rmixpois(n, mu, sd, invlink = exp)

### Arguments

`x` | vector of (non-negative integer) quantiles.
`q` | vector of quantiles.
`p` | vector of probabilities.
`n` | number of random values to return.
`mu` | Mean of the linear predictor. A single numeric value.
`sd` | Standard deviation of the linear predictor. A single numeric value.
`invlink` | Inverse link function. A function in the R language, used to transform the linear predictor into the parameter `lambda` of the Poisson distribution.
`lower.tail` | Logical. If `TRUE` (the default), probabilities are P[X ≤ x], otherwise, P[X > x].
`GHorder` | Number of quadrature points in the Gauss-Hermite quadrature approximation. A small positive integer.

### Details

These functions are analogous to `dpois` `ppois`, `qpois` and `rpois` except that they apply to a mixture of Poisson distributions.

In effect, the Poisson mean parameter `lambda` is randomised by setting `lambda = invlink(Z)` where `Z` has a Gaussian N(μ, σ^2) distribution. The default is `invlink=exp` which means that `lambda` is lognormal. Set `invlink=I` to assume that `lambda` is approximately Normal.

For `dmixpois`, `pmixpois` and `qmixpois`, the probability distribution is approximated using Gauss-Hermite quadrature. For `rmixpois`, the deviates are simulated exactly.

### Value

Numeric vector: `dmixpois` gives probability masses, `ppois` gives cumulative probabilities, `qpois` gives (non-negative integer) quantiles, and `rpois` generates (non-negative integer) random deviates.

### Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

, Rolf Turner r.turner@auckland.ac.nz

and Ege Rubak rubak@math.aau.dk

### See Also

`dpois`, `gauss.hermite`.

### Examples

      dmixpois(7, 10, 1, invlink = I)
      dpois(7, 10)

      pmixpois(7, log(10), 0.2)
      ppois(7, 10)

      qmixpois(0.95, log(10), 0.2)
      qpois(0.95, 10)

      x <- rmixpois(100, log(10), log(1.2))
      mean(x)
      var(x)

[Package spatstat.core version 1.65-5 Index]