An internal function to gmrfdpgrow
gmrfdpcountPost(
y,
E,
ksi,
ipr,
C,
D,
q_order,
q_type,
n.iter,
n.burn,
n.thin,
M_init,
w_star,
q_shape,
q_rate,
tau_shape,
tau_rate,
dp_shape,
dp_rate,
nu,
Rep,
progress,
jitter,
kappa_fast,
stable_launch
)
res A list object containing MCMC runs for all model parameters.
An N x T matrix of N observations of T x 1 functions
A multivariate offset variable, specified as an N x T matrix, in the case
that y
is of type count data. The offset will be used to model the y
as under a poisson lognormal where y ~ Pois(E*exp(Psi))
. Defaults to NULL
,
in which case the response type is assumed continuous.
An N x P matrix of N observations of P predictors to be used
in prior probability of co-clustering of set of N, T x 1 observations.
Defaults to ksi = NULL
such that predictors are not used to a priori
determine co-clustering probabilities.
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. Defaults to
ipr = rep(1,nrow(y))
indicating an iid sample.
A list object of length, K
, the number of iGMRF precision terms.
Each entry contains a T x T normalized adjacency matrix. The diagonal entries are
0
and row i
contains the weight for each entry !=i
divided by the sum
of the weights.
A K x T matrix, where K
denotes the number of iGMRF terms.
Row k
contains the T
elements of the diagonal of the term-k
precision matrix, Q_k
.
Will increase with order and be equal, except for boundary corrections.
An integer vector where each entry contains the order of the associated K
iGMRF precision terms
matrix of Euclidean distances associated to each seasonal covariance term.
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.
The number of MCMC sampling iterations
The number of warm-up iterations to discard
The interval or step size of post-burn-in samples to return
Starting value of number of clusters for sampling cluster assignments.
Integer value denoting the number of cluster locations to sample ahead of
observations in the auxiliary Gibbs sampler used to sample the number of clusters
and associated cluster assignments. A higher value reduces samplin auto-correlation,
but increases computational burden. Defaults to w_star = 2
.
The shape parameter of the Gamma base distribution for the kappa_star
locations used to sample the DP prior on the P
GP covariance parameters,
kappa
, for each experimental unit.
The rate parameter of the Gamma base distribution for the kappa_star
locations used to sample the DP prior on the P
GP covariance parameters,
kappa
, for each experimental unit.
The value (in (0,infty)) for the shape hyperparameter for the Gamma prior on the error
precision parameter. Defaults to tau_shape = 1.0
.
The rate parameter of the Gamma prior distribution on tau_e
.
Defaults to tau_rate = 1
.
The shape parameter for the \(\Gamma\) prior on the DP concentration parameter.
The rate parameter is set of 1
.
The rate parameter for the \(\Gamma\) prior on the DP concentration parameter.
Default value is 1
.
The degree of freedom parameter for the Huang and Wand prior on precision
matrix locations, Lambda_star
, in the case that predictors, ksi
,
are entered to instantiate a predictor-dependent prior for co-clustering.
Default value is 4
The number of times to draw samples of the N x T
log-mean
parameters, Psi
, for each MCMC iteration
under a Poisson-lognormal model when the response
type for y
is count (not continuous)
Default value is 1
.
An indicator in {0,1}
denoting whether to display a progress bar during model execution.
progress = 1
displays a progress bar. Defaults to progress = 1
.
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
.
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
.
A boolean indicator on whether to generate initial values for
N x T
log-mean, Psi
, when y
are count data from a Gaussian
prior distribution, which can induce numerical launch instabilities, or whether
to initialize as y/E
(where missing values in y
are imputed).
Defaults to stable_launch = TRUE
.
Terrance Savitsky tds151@gmail.com
gpdpgrow