lmcGP: MCMC sampler for multivariate Gaussian process model using...

Description Usage Arguments Details Value Author(s) References

View source: R/MCMC_lmcGP.R

Description

lmcGP is a Markov chain Monte Carlo (MCMC) sampler for a Gaussian process model using the Bayesian hierarchical framework.

Usage

1
2
lmcGP(Y, Time, Kernel = "sqexp", Hypers = NULL, Starting = NULL,
  Tuning = NULL, MCMC = NULL, Seed = 54, Verbose = TRUE)

Arguments

Y

An N dimensional vector containing the observed outcome data. Here, N = K * T, where T represents the number of temporal observations and K the number of latent dimensions. The observations in Y must be first ordered temporally and then by latent dimension, meaning the first T observations in Y should come from the first latent dimension.

Time

A T dimensional vector containing the observed time points for each vector of outcomes in increasing order.

Kernel

Character string indicating the kernel of the Gaussian process. Options include: "sqexp", "exp", "ar1".

Hypers

Either NULL or a list containing hyperparameter values to be specified for the MCMC sampler. If NULL is not chosen then none, some or all of the hyperparameter values may be specified.

When NULL is chosen then default hyperparameter values are automatically generated. These default hyperparameters are described in detail in (Berchuck et al.). Otherwise a list must be provided with names Phi, Sigma2 or T containing further hyperparameter information. These objects are themselves lists and may be constructed as follows.

Sigma2 is a list with two objects, Alpha and Beta. Alpha represents the shape of the inverse gamma hyperprior and must be a scalar, while Beta represents the rate of the hyperprior and must be a scalar.

T is a list with two objects, Xi and Psi. Xi represents the degrees of freedom parameter for the inverse-Wishart hyperprior and must be a real number scalar, while Psi represents the scale matrix and must be a K x K dimensional positive definite matrix.

Phi is a list with two objects, APhi and BPhi. APhi represents the lower bound for the uniform hyperprior, while BPhi represents the upper bound. The bounds must be specified carefully. For example, if the exponential temporal correlation structure is chosen both bounds must be restricted to be non-negative. If a scalar is give for these values they will populate the entire vector, otherwise these must be K dimensional.

Starting

Either NULL or a list containing starting values to be specified for the MCMC sampler. If NULL is not chosen then none, some or all of the starting values may be specified.

When NULL is chosen then default starting values are automatically generated. Otherwise a list must be provided with names Gamma, Sigma2, Phi, or T containing appropriate objects. Gamma must be a N dimensional vector or a scalar that populates the entire vector, Phi and Sigma2 K dimensional vectors, or a scalar populating each entire vector, and T a K x K dimensional matrix.

Tuning

Either NULL or a list containing tuning values to be specified for the MCMC Metropolis steps. If NULL is not chosen then all of the tuning values must be specified.

When NULL is chosen then default tuning values are automatically generated to 1. Otherwise a list must be provided with names Phi, and T. Phi must be a K dimensional vector and T a ((K * (K + 1)) / 2) vector. Each containing tuning variances for their corresponding Metropolis updates.

MCMC

Either NULL or a list containing input values to be used for implementing the MCMC sampler. If NULL is not chosen then all of the MCMC input values must be specified.

NBurn: The number of sampler scans included in the burn-in phase. (default = 10,000)

NSims: The number of post-burn-in scans for which to perform the sampler. (default = 100,000)

NThin: Value such that during the post-burn-in phase, only every NThin-th scan is recorded for use in posterior inference (For return values we define, NKeep = NSims / NThin (default = 10).

NPilot: The number of times during the burn-in phase that pilot adaptation is performed (default = 20)

Seed

An integer value used to set the seed for the random number generator (default = 54).

Verbose

A logical indicating whether MCMC sampler progress should be printed.

Details

Details of the underlying statistical model can be found in the upcoming paper.

Value

lmcGP returns a list containing the following objects

gamma

NKeep x N matrix of posterior samples for gamma.

theta

NKeep x N matrix of posterior samples for theta.

sigma2

NKeep x K matrix of posterior samples for sigma2.

phi

NKeep x K matrix of posterior samples for phi.

a

NKeep x ((K * (K + 1)) / 2) matrix of posterior samples for A. The columns have names that describe the samples within them. The row is listed first.

t

NKeep x ((K * (K + 1)) / 2) matrix of posterior samples for T. The columns have names that describe the samples within them. The row is listed first.

metropolis

(K + ((K * (K + 1)) / 2)) x 3 matrix of metropolis acceptance rates, tuners, a nd original tuners that result from the pilot adaptation. The first K correspond to the phi parameters.

runtime

A character string giving the runtime of the MCMC sampler.

datobj

A list of data objects that are used in future lmcGP functions and should be ignored by the user.

Author(s)

Samuel I. Berchuck

References

VAE paper forthcoming.


berchuck/dependentGP documentation built on May 14, 2019, 5 a.m.