# cond_sim: Conditional Simulation using Vecchia's approximation In GpGp: Fast Gaussian Process Computation 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

 ```1 2 3 4``` ```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.

GpGp documentation built on July 9, 2019, 5:02 p.m.