vecchia_laplace_prediction: Wrapper for VL version of vecchia_prediction

View source: R/vecchia_laplace_NR.R

vecchia_laplace_predictionR Documentation

Wrapper for VL version of vecchia_prediction

Description

Wrapper for VL version of vecchia_prediction

Usage

vecchia_laplace_prediction(
  vl_posterior,
  vecchia.approx,
  covparms,
  pred.mean = 0,
  var.exact = FALSE,
  covmodel = "matern",
  return.values = "all"
)

Arguments

vl_posterior

a posterior estimate object produced by calculate_posterior_VL

vecchia.approx

a vecchia object as generated by vecchia_specify()

covparms

covariance parameters as a vector

pred.mean

provides the prior latent mean for the prediction locations

var.exact

should prediction variances be computed exactly, or is a (faster) approximation acceptable

covmodel

covariance model, 'matern' by default.

return.values

either 'mean' only, 'meanvar', 'meanmat', or 'all'

Value

(multivariate normal) loglikelihood implied by the Vecchia approximation

Examples

z=rnorm(10); locs=matrix(1:10,ncol=1); vecchia.approx=vecchia_specify(locs,m=5)
vl_posterior = calculate_posterior_VL(z,vecchia.approx,"gaussian",covparms=c(1,2,.5))
locs.pred=matrix(1:10+.5,ncol=1)
vecchia.approx.pred = vecchia_specify(locs, m=5, locs.pred=locs.pred )
vecchia_laplace_prediction(vl_posterior,vecchia.approx.pred,covparms=c(1,2,.5))

GPvecchia documentation built on June 22, 2024, 11:13 a.m.