Usage
gmrfdpgrow(y, ipr, q_order, q_type, q_shape, q_rate, tau_shape, tau_rate,
dp_shape, dp_rate, M_init, n.iter, n.burn, n.thin, progress, jitter,
kappa_fast)
Arguments
y
A multivariate continuous response, specified as an N x T matrix, where N
denotes the number of functions and T, the number of time points per function. Intermittent
missing-at-random values are allowed and will be est
ipr
An optional input vector of inclusion probabilities for each observation unit in the case
the observed data were acquired through an informative sampling design, so that unbiased
inference about the population requires adjustments to the observed sample
q_order
An integer vector of length K to select the order for each iGMRF precision term.
e.g. If the first term is a RW2 and there is a second is a 3-month seasonality term, where the time
points are indexed by month, then q_order = c(2,3)
q_type
A vector of length K, the number of iGMRF precision terms, with each entry
indicating whether the associated term is a trend ("tr") or seasonality ("sn") term.
So all entries must be one of c("tr","sn")
q_shape
The value (in (0,infty)) for the shape hyperparameter for the Gamma base distribution for
the iGMRF scale parameters, kappa_star(k,m), where k denotes the term
and m, the cluster. Defaults to q_shape = 0.3
q_rate
The rate parameter of the Gamma base distribution on kappa_star.
Defaults to q_rate = 0.0005.
tau_shape
The value (in (0,infty)) for the shape hyperparameter for the Gamma prior on the error
precision parameter. Defaults to tau_shape = 1.0.
tau_rate
The rate parameter of the Gamma prior distribution on tau_e.
Defaults to tau_rate = 1.
dp_shape
The shape parameter for the Gamma prior on the DP concentration parameter,
conc. Defaults to dp_shape = 1.
dp_rate
The rate parameter for the Gamma prior on the DP concentration parameter,
conc. Defaults to dp_rate = 1.
M_init
Starting number of clusters of nrow(y) units to initialize sampler.
Defaults to M_init = nrow(y).
n.iter
Total number of MCMC iterations.
n.burn
Number of MCMC iterations to discard.
gmrfdpgrow will return (n.iter - n.burn) posterior samples.
n.thin
Gap between successive sampling iterations to save.
progress
A boolean value denoting whether to display a progress bar during model execution.
Defaults to progress = true.
jitter
A scalar double indicating amount of jitter to subract from the posterior
rate and shape hyperparameters of tau_e to stabilize computation.
Defaults to jitter = 0.0.
kappa_fast
Boolean for whether to generate rate hyperparameter from full conditionals
versus joint Gaussian (on random effects, bb, given kappa. The
former is faster, but numerically less stable.
Defaults to kappa_fast = FALSE