gp_logPosterior: Compute a posterior density given likelihood and prior.

Description Usage Arguments Details Value See Also

View source: R/gp_functions.R

Description

gp_logPosterior compute posterior density for GP model.

Usage

1
2
gp_logPosterior(theta, acv.model = NULL, tau = NULL, dat = NULL,
  PDcheck = TRUE, chatter = 0, logPrior = NULL)

Arguments

theta

(vector) parameters for covariance function the first element is the mean value mu

acv.model

(name) name of the function to compute ACV(tau | theta)

tau

(matrix) N*N matrix of lags at which to compute ACF

dat

(matrix) an N * 3 matrix of data: 3 columns

PDcheck

(logical) use Matrix::nearPD to coerse the matrix

chatter

(integer) higher values give more run-time feedback

logPrior

(name) Name of the function returning the log Prior density.

Details

Calculate posterior density for a Gaussian Process (GP) model given some data (day) and functions for the AutoCovariance (ACV) of the GP, the log likelihood, and the log prior (both log densities).

Simply computes log(posterior) = log(likelihood) + log(prior), where log(likelihood) is a function of the data and a ACV (and its parameters), and log(prior) is a function of the ACV parameters only.

Value

log posterior density (scalar)

See Also

gp_logLikelihood


svdataman/gin documentation built on March 12, 2021, 7:37 a.m.