Learn R Programming

brr (version 1.0.0)

Prior_x: Prior predictive distribution of the count in the treated group

Description

Density, distribution function, quantile function and random generation for the prior predictive distribution of the count in the treated group.

Usage

dprior_x(x, a, b, c, d, T)
pprior_x(q, a, b, c, d, T)
qprior_x(p, a, b, c, d, T)
rprior_x(n, a, b, c, d, T)
sprior_x(a, b, c, d, T, ...)

Arguments

x,q
vector of non-negative integer quantiles
a,b
non-negative shape parameter and rate parameter of the Gamma prior distribution on the rate $\mu$
c,d
non-negative shape parameters of the prior distribution on $\phi$
T
sample size of the control group
p
vector of probabilities
n
number of observations to be simulated
...
passed to summary_PGB2

Value

dprior_x gives the density, pprior_x the distribution function, qprior_x the quantile function, rprior_x samples from the distribution, and sprior_x gives a summary of the distribution.

Details

The prior predictive distribution of the count $x$ is the Poisson-Gamma-Beta2 distribution with shape parameters $a$, $d$, $c$, and hyperrate parameter $b/(b+T)$.

Examples

Run this code
barplot(dprior_x(0:30, 2, 3, 4, 5, 10))
sprior_x(2, 3, 4, 5, 10, output="pandoc")

Run the code above in your browser using DataLab