Learn R Programming

brr (version 1.0.0)

Prior_mu: Prior distribution on the rate in the control group

Description

Density, distribution function, quantile function and random generation for the prior distribution on the rate in the control group.

Usage

dprior_mu(mu, a, b, ...)
pprior_mu(q, a, b, ...)
qprior_mu(p, a, b, ...)
rprior_mu(n, a, b, ...)
sprior_mu(a, b, ...)

Arguments

mu,q
vector of quantiles
a,b
non-negative shape parameter and rate parameter
...
other arguments passed to GammaDist or to summary_gamma
p
vector of probabilities
n
number of observations to be simulated

Value

dprior_mu gives the density, pprior_mu the distribution function, qprior_mu the quantile function, and rprior_mu samples from the distribution.

Details

The prior distribution on the rate $\mu$ is the Gamma distribution with shape parameter $a$ and rate parameter $b$

Examples

Run this code
curve(dprior_mu(x, 2, 2), from=0, to=3)
sprior_mu(2, 2, output="pandoc")

Run the code above in your browser using DataLab