Learn R Programming

brr (version 1.0.0)

Posterior_mu: Posterior distribution on the rate in the control group

Description

Density and random generation for the posterior distribution on the rate in the control group. The distribution function and the quantile function are not available.

Usage

dpost_mu(mu, a, b, c, d, T, x, y, ...)
rpost_mu(n, a, b, c, d, T, x, y)
spost_mu(a, b, c, d, T, x, y, ...)

Arguments

mu
vector of quantiles
a,b
non-negative shape and rate parameter of the Gamma prior distribution on $\mu$
c,d
non-negative shape parameters of the prior distribution on $\phi$
T
sample size in control group
x,y
counts in the treated group and control group
...
other arguments passed to GIBDist
n
number of observations to be simulated

Value

dpost_mu gives the density, rpost_mu samples from the distribution, and spost_mu gives a summary of the distribution.

Details

The pdf of the posterior distribution of the incidence rate $\mu$ involves the Kummer confluent hypergeometric function of the second kind.

Examples

Run this code
curve(dpost_mu(x, 2, 2, 2, 2, 10, 3, 8), from=0, to=2)
spost_mu(2, 2, 2, 2, 10, 3, 8, output="pandoc")

Run the code above in your browser using DataLab