This function is intended to be used on the right hand side of the formula.V
argument to
create_sampler
or generate_data
.
vfac(
factor = "local_",
prior = pr_invchisq(df = 1, scale = 1),
name = "",
debug = FALSE,
e = parent.frame()
)
An object with precomputed quantities and functions for sampling from prior or conditional posterior distributions for this model component. Intended for internal use by other package functions.
The name of a factor variable. The name "local_"
has a special meaning,
and assigns a different variance scale parameter to each data unit.
In case of inverse chi-squared priors this implies that the marginal sampling distribution
is a t distribution. In case of exponential priors the marginal sampling distribution
is a Laplace or double exponential distribution.
the prior assigned to the variance factors. Currently the prior can be inverse chi-squared
or exponential, specified by a call to pr_invchisq
or pr_exp
, respectively.
The default priors are inverse chi-squared with 1 degree of freedom. See the help pages of the
prior specification functions for details on how to set non-default priors.
The name of the variance model component. This name is used in the output of the MCMC simulation
function MCMCsim
. By default the name will be 'vfac' with the number of the variance model
term attached.
If TRUE
a breakpoint is set at the beginning of the posterior
draw function associated with this model component. Mainly intended for developers.
For internal use only.