cond_sim: Conditional Simulation using Vecchia's approximation

View source: R/predictions.R

cond_simR Documentation

Conditional Simulation using Vecchia's approximation

Description

With the prediction locations ordered after the observation locations, an approximation for the inverse Cholesky of the covariance matrix is computed, and standard formulas are applied to obtain a conditional simulation.

Usage

cond_sim(
  fit = NULL,
  locs_pred,
  X_pred,
  y_obs = fit$y,
  locs_obs = fit$locs,
  X_obs = fit$X,
  beta = fit$betahat,
  covparms = fit$covparms,
  covfun_name = fit$covfun_name,
  m = 60,
  reorder = TRUE,
  st_scale = NULL,
  nsims = 1
)

Arguments

fit

GpGp_fit object, the result of fit_model

locs_pred

prediction locations

X_pred

Design matrix for predictions

y_obs

Observations associated with locs_obs

locs_obs

observation locations

X_obs

Design matrix for observations

beta

Linear mean parameters

covparms

Covariance parameters

covfun_name

Name of covariance function

m

Number of nearest neighbors to use. Larger m gives better approximations.

reorder

TRUE/FALSE for whether reordering should be done. This should generally be kept at TRUE, unless testing out the effect of reordering.

st_scale

amount by which to scale the spatial and temporal dimensions for the purpose of selecting neighbors. We recommend setting this manually when using a spatial-temporal covariance function. When lonlat = TRUE, spatial scale is in radians (earth radius = 1).

nsims

Number of conditional simulations to return.

Details

We can specify either a GpGp_fit object (the result of fit_model), OR manually enter the covariance function and parameters, the observations, observation locations, and design matrix. We must specify the prediction locations and the prediction design matrix.


joeguinness/GpGp documentation built on Feb. 22, 2024, 9:43 a.m.