These functions are intended for use in the family
argument of create_sampler
.
In future versions these functions may gain additional arguments, but currently the corresponding
functions gaussian
and binomial
can be used as well.
f_gaussian(link = "identity")f_binomial(link = c("logit", "probit"))
f_negbinomial(link = "logit")
f_poisson(link = "log")
f_multinomial(link = "logit", K = NULL)
f_gamma(
link = "log",
shape.vec = ~1,
shape.prior = pr_gamma(1, 1),
shape.MH.type = c("RW", "gamma")
)
A family object.
the name of a link function. Currently the only allowed link functions are:
"identity"
for (log-)Gaussian sampling distributions, "logit"
(default) and "probit"
for binomial distributions and "log"
for negative binomial sampling distributions.
number of categories for multinomial model; this must be specified for prior predictive sampling.
optional formula specification of unequal shape parameter for gamma family
prior for gamma shape parameter. Supported prior distributions:
pr_fixed
with a default value of 1, pr_exp
and
pr_gamma
. The current default is that of a fixed shape
equal to 1, i.e. pr_fixed(value=1)
.
the type of Metropolis-Hastings algorithm employed in case the shape parameter is to be inferred. The two choices currently supported are "RW" for a random walk proposal on the log-shape scale and "gamma" for an approximating gamma proposal, found using an iterative algorithm. In the latter case, a Metropolis-Hastings accept-reject step is currently omitted, so the sampling algorithm is an approximate one, though one that is usually quite accurate and efficient.
J.W. Miller (2019). Fast and Accurate Approximation of the Full Conditional for Gamma Shape Parameters. Journal of Computational and Graphical Statistics 28(2), 476-480.