gmrfdpPost: Run a Bayesian functional data model under an instrinsic GMRF...

Description Usage Arguments Value Note Author(s) See Also

Description

An internal function to gmrfdpgrow

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
gmrfdpPost(
  y,
  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,
  progress,
  jitter,
  kappa_fast
)

Arguments

y

An N x T matrix of N observations of T x 1 functions

ksi

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.

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. Defaults to ipr = rep(1,nrow(y)) indicating an iid sample.

C

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.

D

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.

q_order

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.

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.

n.iter

The number of MCMC sampling iterations

n.burn

The number of warm-up iterations to discard

n.thin

The interval or step size of post-burn-in samples to return

M_init

Starting value of number of clusters for sampling cluster assignments.

w_star

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.

q_shape

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.

q_rate

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.

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 Γ prior on the DP concentration parameter. The rate parameter is set of 1.

dp_rate

The rate parameter for the Γ prior on the DP concentration parameter. Default value is 1.

nu

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

progress

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.

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.

Value

res A list object containing MCMC runs for all model parameters.

Note

Intended as an internal function for gmrfdpgrow

Author(s)

Terrance Savitsky tds151@gmail.com

See Also

gpdpgrow


growfunctions documentation built on July 17, 2021, 1:08 a.m.