Learn R Programming

GpGp

GpGp is an R package for fast approximate Gaussian process computation. The package includes implementations of the Vecchia's (1988) original approximation, as well as several updates to it, including the reordered and grouped versions of the approximation outlined in Guinness (2018).

Installing

The package can be installed from CRAN with the usual R command

install.packages("GpGp")

or directly from Github for the latest version

devtools::install_github("joeguinness/GpGp")

Basic Use

The main function for fitting models is called 'fit_model', and the main function for doing predictions is called 'predictions'.

See this youtube video for a tutorial: https://www.youtube.com/watch?v=phyB4n0CDWg&t=4s

Copy Link

Version

Install

install.packages('GpGp')

Monthly Downloads

609

Version

1.0.0

License

MIT + file LICENSE

Maintainer

Joseph Guinness

Last Published

December 18th, 2025

Functions in GpGp (1.0.0)

matern25_isotropic

Isotropic Matern covariance function, smoothness = 2.5
exponential_spheretime

Exponential covariance function on sphere x time
exponential_spheretime_warp

Deformed exponential covariance function on sphere
find_ordered_nn

Find ordered nearest neighbors.
find_ordered_nn_brute

Naive brute force nearest neighbor finder
jason3

Windspeed measurements from Jason-3 Satellite
matern45_isotropic

Isotropic Matern covariance function, smoothness = 4.5
matern15_isotropic

Isotropic Matern covariance function, smoothness = 1.5
matern_sphere_warp

Deformed Matern covariance function on sphere
matern_spheretime

Matern covariance function on sphere x time
L_mult

Multiply approximate Cholesky by a vector
GpGp

GpGp: Fast Gaussian Process Computing.
matern_spacetime_categorical_local

Space-Time Matern covariance function with local random effects for categories
expit

expit function and integral of expit function
sph_grad_xyz

compute gradient of spherical harmonics functions
exponential_anisotropic2D

Geometrically anisotropic exponential covariance function (two dimensions)
predictions

Compute Gaussian process predictions using Vecchia's approximations
summary.GpGp_fit

Print summary of GpGp fit
exponential_sphere

Isotropic exponential covariance function on sphere
exponential_sphere_warp

Deformed exponential covariance function on sphere
matern_sphere

Isotropic Matern covariance function on sphere
pen_hi

penalize large values of parameter: penalty, 1st deriative, 2nd derivative
order_middleout

Middle-out ordering
fisher_scoring

Fisher scoring algorithm
exponential_isotropic

Isotropic exponential covariance function
exponential_nonstat_var

Isotropic exponential covariance function, nonstationary variances
matern_nonstat_var

Isotropic Matern covariance function, nonstationary variances
matern_scaledim

Matern covariance function, different range parameter for each dimension
matern_anisotropic2D

Geometrically anisotropic Matern covariance function (two dimensions)
fit_model

Estimate mean and covariance parameters
matern45_scaledim

Matern covariance function, smoothess = 3.5, different range parameter for each dimension
test_likelihood_object

test likelihood object for NA or Inf values
vecchia_Linv

Entries of inverse Cholesky approximation
matern_isotropic

Isotropic Matern covariance function
matern35_isotropic

Isotropic Matern covariance function, smoothness = 3.5
matern25_scaledim

Matern covariance function, smoothess = 2.5, different range parameter for each dimension
matern_categorical

Isotropic Matern covariance function with random effects for categories
pen_lo

penalize small values of parameter: penalty, 1st deriative, 2nd derivative
Linv_t_mult

Multiply transpose of approximate inverse Cholesky by a vector
argo2016

Ocean temperatures from Argo profiling floats
vecchia_grouped_meanzero_loglik

Grouped Vecchia approximation to the Gaussian loglikelihood, zero mean
pen_loglo

penalize small values of log parameter: penalty, 1st deriative, 2nd derivative
vecchia_grouped_profbeta_loglik_grad_info

Grouped Vecchia loglikelihood, gradient, Fisher information
vecchia_grouped_profbeta_loglik

Grouped Vecchia approximation, profiled regression coefficients
matern_anisotropic3D

Geometrically anisotropic Matern covariance function (three dimensions)
vecchia_profbeta_loglik

Vecchia's approximation to the Gaussian loglikelihood, with profiled regression coefficients.
matern_spheretime_warp

Deformed Matern covariance function on sphere
order_coordinate

Sorted coordinate ordering
matern_anisotropic3D_alt

Geometrically anisotropic Matern covariance function (three dimensions, alternate parameterization)
vecchia_meanzero_loglik

Vecchia's approximation to the Gaussian loglikelihood, zero mean
exponential_anisotropic3D

Geometrically anisotropic exponential covariance function (three dimensions)
exponential_anisotropic3D_alt

Geometrically anisotropic exponential covariance function (three dimensions, alternate parameterization)
fast_Gp_sim

Approximate GP simulation
fast_Gp_sim_Linv

Approximate GP simulation with specified Linverse
matern_spacetime

Spatial-Temporal Matern covariance function
matern_spacetime_categorical

Space-Time Matern covariance function with random effects for categories
order_dist_to_point

Distance to specified point ordering
order_maxmin

Maximum minimum distance ordering
vecchia_profbeta_loglik_grad_info

Vecchia's loglikelihood, gradient, and Fisher information
cond_sim

Conditional Simulation using Vecchia's approximation
condition_number

compute condition number of matrix
Linv_mult

Multiply approximate inverse Cholesky by a vector
L_t_mult

Multiply transpose of approximate Cholesky by a vector
exponential_spacetime

Spatial-Temporal exponential covariance function
exponential_scaledim

Exponential covariance function, different range parameter for each dimension
matern35_scaledim

Matern covariance function, smoothess = 3.5, different range parameter for each dimension
group_obs

Automatic grouping (partitioning) of locations
get_start_parms

get default starting values of covariance parameters
get_linkfun

get link function, whether locations are lonlat and space time
get_penalty

get penalty function
matern15_scaledim

Matern covariance function, smoothess = 1.5, different range parameter for each dimension