Prior_x_given_y: Prior predictive distribution of the count x in the treated...

Description Usage Arguments Details Value Note Examples

Description

Density, distribution function, quantile function and random generation for the conditional prior predictive distribution of x given y.

Usage

1
2
3
4
5
6
7
8
9
dprior_x_given_y(x, y, a, c, d)

pprior_x_given_y(q, y, a, c, d)

qprior_x_given_y(p, y, a, c, d)

rprior_x_given_y(n, y, a, c, d)

sprior_x_given_y(y, a, c, d, ...)

Arguments

x,q

vector of non-negative integer quantiles

y

count (integer) in the control group

a

non-negative shape parameter of the Gamma prior distribution on the rate μ

c,d

non-negative shape parameters of the prior distribution on φ

p

vector of probabilities

n

number of observations to be simulated

...

arguments passed to summary_beta_nbinom

Details

The prior predictive distribution of the count x is the Beta-negative binomial distribution with shape parameters a+y, d, c.

Value

dprior_x_given_y gives the density, pprior_x_given_y the distribution function, qprior_x_given_y the quantile function, rprior_x_given_y samples from the distribution, and sprior_x_given_y gives a summary of the distribution.

Note

Prior_x_given_y is a generic name for the functions documented.

Examples

1
2
barplot(dprior_x_given_y(0:10, 5, 3, 10, 20))
sprior_x_given_y(5, 3, 10, 20, output="pandoc")

stla/brr documentation built on May 30, 2019, 5:46 p.m.