# Bayesian Inference on the Ratio of Two Poisson Rates

Implementation of the Bayesian inference for the two independent Poisson samples model, using the semi-conjugate family of prior distributions.

Bayesian inference on the ratio of two Poisson rates.

### What does it do ?

Suppose you have two counts of events and, assuming each count follows a Poisson distribution with an unknown incidence rate, you are interested in the ratio of the two rates (or relative risk). The `brr` package allows to perform the Bayesian analysis of the relative risk using the natural semi-conjugate family of prior distributions, with a default non-informative prior (see references).

### Install

You can install:

• the latest released version from CRAN with
• the latest development version from `github` using the `devtools` package:

### Basic usage

Create a `brr` object with the `Brr` function to set the prior parameters `a`, `b`, `c`, `d`, the two Poisson counts `x` and `y` and the samples sizes (times at risk) `S` and `T` in the two groups. Simply do not set the prior parameters to use the non-informative prior:

Plot the posterior distribution of the rate ratio `phi`:

Get credibility intervals about `phi`:

Get the posterior probability that `phi>1`:

Update the `brr` object to include new sample sizes and get a summary of the posterior predictive distribution of `x`:

Look at the vignettes:

### References

S. Laurent, C. Legrand: A Bayesian framework for the ratio of two Poisson rates in the context of vaccine efficacy trials. ESAIM, Probability & Statistics 16 (2012), 375--398.

S. Laurent: Some Poisson mixtures distributions with a hyperscale parameter. Brazilian Journal of Probability and Statistics 26 (2012), 265--278.

S. Laurent: Intrinsic Bayesian inference on a Poisson rate and on the ratio of two Poisson rates. Journal of Statistical Planning and Inference 142 (2012), 2656--2671.

# Reference manual

install.packages("brr")

1.0.0 by Stéphane Laurent, 6 years ago

Browse source code at https://github.com/cran/brr

Authors: Stéphane Laurent

Documentation:   PDF Manual