Learn R Programming

BayesNSGP (version 0.2.0)

Bayesian Analysis of Non-Stationary Gaussian Process Models

Description

Enables off-the-shelf functionality for fully Bayesian, nonstationary Gaussian process modeling. The approach to nonstationary modeling involves a closed-form, convolution-based covariance function with spatially-varying parameters; these parameter processes can be specified either deterministically (using covariates or basis functions) or stochastically (using approximate Gaussian processes). Stationary Gaussian processes are a special case of our methodology, and we furthermore implement approximate Gaussian process inference to account for very large spatial data sets (Finley, et al (2017) ). Bayesian inference is carried out using Markov chain Monte Carlo methods via the "nimble" package, and posterior prediction for the Gaussian process at unobserved locations is provided as a post-processing step.

Copy Link

Version

Install

install.packages('BayesNSGP')

Monthly Downloads

234

Version

0.2.0

License

GPL-3

Maintainer

Daniel Turek

Last Published

December 11th, 2025

Functions in BayesNSGP (0.2.0)

nimble_sparse_crossprod

nimble_sparse_crossprod
nimble_sparse_solve

nimble_sparse_solve
nsDist

Calculate coordinate-specific distance matrices
rmnorm_sgv

Function for the evaluating the SGV approximate density.
rmnorm_nngp

Function for the evaluating the NNGP approximate density.
nsgpPredict

Posterior prediction for the NSGP
nsgpModel

NIMBLE code for a generic nonstationary GP model
matern_corr

Calculate a stationary Matern correlation matrix
nsCrossdist

Calculate coordinate-specific cross-distance matrices
nsCrossdist3d

Calculate coordinate-specific cross-distance matrices, only for nearest neighbors and store in an array
inverseEigen

Calculate covariance elements based on eigendecomposition components
rmnorm_gp2Scale

Function for the evaluating the SGV approximate density.
orderCoordinatesMMD

Order coordinates according to a maximum-minimum distance criterion.
nsDist3d

Calculate coordinate-specific distance matrices, only for nearest neighbors and store in an array
R_sparse_cholesky

R_sparse_chol
R_sparse_crossprod

nimble_sparse_crossprod
nimble_sparse_chol

nimble_sparse_chol
nsCorr

Calculate a nonstationary Matern correlation matrix
nimble_sparse_cholesky

nimble_sparse_chol
nsCrosscorr

Calculate a nonstationary Matern cross-correlation matrix
sgvSetup

One-time setup wrapper function for the SGV approximation
Cy_sm

Calculate sparse kernel, core kernel, and determine nonzero entries
calculateAD_ns

Calculate A and D matrices for the NNGP approximation
R_sparse_chol

R_sparse_chol
R_sparse_tcrossprod

nimble_sparse_tcrossprod
R_sparse_solve

nimble_sparse_solve
calculateU_ns

Calculate the (sparse) matrix U
R_sparse_solveMat

nimble_sparse_crossprod
calcQF

Calculate the Gaussian quadratic form for the NNGP approximation
dmnorm_nngp

Function for the evaluating the NNGP approximate density.
dmnorm_sgv

Function for the evaluating the SGV approximate density.
crossCy_sm

Calculate sparse kernel, core kernel, and determine nonzero entries
conditionLatentObs

Assign conditioning sets for the SGV approximation
determineNeighbors

Determine the k-nearest neighbors for each spatial coordinate.
dmnorm_gp2Scale

Function for the evaluating the Gaussian likelihood with gp2Scale sparse covariance.
nimble_sparse_tcrossprod

nimble_sparse_tcrossprod
nimble_sparse_solveMat

nimble_sparse_crossprod