This function is intended to be used on the right hand side of the formula.V
argument to
create_sampler
or generate_data
.
vreg(
formula = NULL,
remove.redundant = FALSE,
sparse = NULL,
X = NULL,
Q0 = NULL,
b0 = NULL,
name = "",
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.
a formula for the regression effects explaining the log-variance.
Variable names are looked up in the data frame passed as data
argument to
create_sampler
or generate_data
, or in environment(formula)
.
whether redundant columns should be removed from the design matrix.
Default is FALSE
.
whether the model matrix associated with formula
should be sparse.
The default is determined by a simple heuristic based on storage size.
a (possibly sparse) design matrix can be specified directly, as an alternative to the
creation of one based on formula
. If X
is specified formula
is ignored.
prior precision matrix for the regression effects. The default is a zero matrix corresponding to a noninformative improper prior.
prior mean for the regression effect. Defaults to a zero vector.
the name of the model component. This name is used in the output of the
MCMC simulation function MCMCsim
. By default the name will be 'vreg'
with the number of the variance model term attached.
for internal use only.
E. Cepeda and D. Gamerman (2000). Bayesian modeling of variance heterogeneity in normal regression models. Brazilian Journal of Probability and Statistics, 207-221.
T.I. Lin and W.L. Wang (2011). Bayesian inference in joint modelling of location and scale parameters of the t distribution for longitudinal data. Journal of Statistical Planning and Inference 141(4), 1543-1553.