Package: BayesNSGP 0.3.1

BayesNSGP: Bayesian Analysis of Non-Stationary Gaussian Process Models

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) <doi:10.48550/arXiv.1702.00434>). 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. Also provided are nearest-neighbor Gaussian process components for use directly in user-written model code, where the spatial process is retained as a latent field: neighbor-structure construction, a latent-field density and matching simulation function, a purpose-built Metropolis-Hastings sampler that updates the field one node at a time, and posterior prediction at unobserved locations.

Authors:Daniel Turek [aut, cre], Mark Risser [aut], Fabian Ketwaroo [aut]

BayesNSGP_0.3.1.tar.gz
BayesNSGP_0.3.1.zip(r-4.7-any)BayesNSGP_0.3.1.zip(r-4.6-any)BayesNSGP_0.3.1.zip(r-4.5-any)
BayesNSGP_0.3.1.tgz(r-4.6-any)BayesNSGP_0.3.1.tgz(r-4.5-any)
BayesNSGP_0.3.1.tar.gz(r-4.7-any)BayesNSGP_0.3.1.tar.gz(r-4.6-any)
BayesNSGP_0.3.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
BayesNSGP/json (API)

# Install 'BayesNSGP' in R:
install.packages('BayesNSGP', repos = c('https://danielturek.r-universe.dev', 'https://cloud.r-project.org'))

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.39 score 2 stars 41 scripts 592 downloads 49 exports 51 dependencies

Last updated from:7d166335eb. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK204
source / vignettesOK187
linux-releaseOK201
macos-releaseOK153
macos-oldrelOK170
windows-develOK157
windows-releaseOK142
windows-oldrelOK110
wasm-releaseOK111

Exports:calcQFcalculateAD_nscalculateU_nscomputeADcomputeCcomputeNeighborscomputeQFconditionLatentObscrossCy_smCy_smdetermineNeighborsdisplayNeighborsdmnorm_gp2Scaledmnorm_NN_GPdmnorm_nngpdmnorm_sgvexpcovget_single_reverse_neighborsinverseEigenmatern_corrnimble_sparse_cholnimble_sparse_choleskynimble_sparse_crossprodnimble_sparse_solvenimble_sparse_solveMatnimble_sparse_tcrossprodNNGP.prednsCorrnsCrosscorrnsCrossdistnsCrossdist3dnsDistnsDist3dnsgpModelnsgpPredictorderCoordinatesMMDR_sparse_cholR_sparse_choleskyR_sparse_crossprodR_sparse_solveR_sparse_solveMatR_sparse_tcrossprodrmnorm_gp2Scalermnorm_NN_GPrmnorm_nngprmnorm_sgvRWNNGP_setupsampler_RW_NN_GPsgvSetup

Dependencies:classclassIntclicodacpp11DBIdplyre1071farverFNNgenericsggplot2gluegtableigraphisobandKernSmoothlabelinglatticelifecyclelpSolvemagrittrMatrixminqamitoolsnimblenumDerivpillarpkgconfigpracmaproxyR6RColorBrewerRcppRcppArmadillorlangs2S7scalessfStatMatchsurveysurvivaltibbletidyselectunitsutf8vctrsviridisLitewithrwk

Readme and manuals

Help Manual

Help pageTopics
Calculate the Gaussian quadratic form for the NNGP approximationcalcQF
Calculate A and D matrices for the NNGP approximationcalculateAD_ns
Calculate the (sparse) matrix UcalculateU_ns
Compute NNGP regression coefficients and conditional variancescomputeAD
Construct local covariance matrix for NNGP conditional distributionscomputeC
Compute neighbor sets for a Nearest-Neighbor Gaussian Process (NNGP)computeNeighbors
Compute quadratic form for NNGP log-likelihoodcomputeQF
Assign conditioning sets for the SGV approximationconditionLatentObs
Calculate sparse kernel, core kernel, and determine nonzero entriescrossCy_sm
Calculate sparse kernel, core kernel, and determine nonzero entriesCy_sm
Determine the k-nearest neighbors for each spatial coordinate.determineNeighbors
Plot neighbor sets for a Nearest-Neighbor Gaussian Process (NNGP)displayNeighbors
Function for the evaluating the Gaussian likelihood with gp2Scale sparse covariance.dmnorm_gp2Scale
Compute Nearest-Neighbor Gaussian Process (NNGP) log-densitydmnorm_NN_GP
Function for the evaluating the NNGP approximate density.dmnorm_nngp
Function for the evaluating the SGV approximate density.dmnorm_sgv
Exponential covariance function for Gaussian processesexpcov
Find reverse neighbors for a single NNGP nodeget_single_reverse_neighbors
Calculate covariance elements based on eigendecomposition componentsinverseEigen
Calculate a stationary Matern correlation matrixmatern_corr
nimble_sparse_cholnimble_sparse_chol
nimble_sparse_cholnimble_sparse_cholesky
nimble_sparse_crossprodnimble_sparse_crossprod
nimble_sparse_solvenimble_sparse_solve
nimble_sparse_crossprodnimble_sparse_solveMat
nimble_sparse_tcrossprodnimble_sparse_tcrossprod
Posterior predictive sampling for NNGPNNGP.pred
Calculate a nonstationary Matern correlation matrixnsCorr
Calculate a nonstationary Matern cross-correlation matrixnsCrosscorr
Calculate coordinate-specific cross-distance matricesnsCrossdist
Calculate coordinate-specific cross-distance matrices, only for nearest neighbors and store in an arraynsCrossdist3d
Calculate coordinate-specific distance matricesnsDist
Calculate coordinate-specific distance matrices, only for nearest neighbors and store in an arraynsDist3d
NIMBLE code for a generic nonstationary GP modelnsgpModel
Posterior prediction for the NSGPnsgpPredict
Order coordinates according to a maximum-minimum distance criterion.orderCoordinatesMMD
R_sparse_cholR_sparse_chol
R_sparse_cholR_sparse_cholesky
nimble_sparse_crossprodR_sparse_crossprod
nimble_sparse_solveR_sparse_solve
nimble_sparse_crossprodR_sparse_solveMat
nimble_sparse_tcrossprodR_sparse_tcrossprod
Function for the evaluating the SGV approximate density.rmnorm_gp2Scale
Simulate from a Nearest-Neighbor Gaussian Process (NNGP)rmnorm_NN_GP
Function for the evaluating the NNGP approximate density.rmnorm_nngp
Function for the evaluating the SGV approximate density.rmnorm_sgv
Helper to extract NNGP local neighborhood nodes for custom MCMC samplingRWNNGP_setup
NNGP-Specific Random Walk Metropolis-Hastings Samplersampler_RW_NN_GP
One-time setup wrapper function for the SGV approximationsgvSetup