Learn R Programming

brr (version 1.0.0)

PriorAndPosterior: Prior and posterior distributions

Description

Generic functions for prior and posterior distributions

Usage

dprior(model, parameter, ...)
pprior(model, parameter, ...)
qprior(model, parameter, ...)
rprior(model, parameter, ...)
sprior(model, parameter, ...)
dpost(model, parameter, ...)
ppost(model, parameter, ...)
qpost(model, parameter, ...)
rpost(model, parameter, ...)
spost(model, parameter, ...)

Arguments

model
an object of class brr (see Brr)
parameter
a character string among mu, phi, lambda, x, y
...
the first argument of the function called

Examples

Run this code
model <- Brr(a=2, b=4)
dprior(model, "mu", 1:3)
# the same:
dprior_mu(mu=1:3, a=2, b=4)
## Not run: 
# dprior(model, "lambda", 1:3)## End(Not run)
model <- model(c=4, d=5, S=10, T=10)
dprior(model, "lambda", 1:3)
model <- model(x=5, y=10)
ppost(model, "phi", 1)
model <- Brr()
## Not run: 
# ppost(model, "phi", 1)## End(Not run)
model <- model(x=5, y=10, S=3, T=10)
ppost(model, "phi", 1)

Run the code above in your browser using DataLab