sgvSetup is a wrapper function that sets up the SGV approximation.
Three objects are required: (1) ordering the locations, (2) identify nearest
neighbors, and (3) determine the conditioning set. This function only needs
to be run once per SGV analysis.
sgvSetup(
coords,
coords_pred = NULL,
k = 15,
seed = NULL,
pred.seed = NULL,
order_coords = TRUE,
order_coords_pred = TRUE
)A list with the following components:
A vector of ordering position for the observed locations.
A vector of ordering position for the prediction
locations (if coords_pred is provided).
A concatenated vector of ord and ord_pred.
A matrix of ordered locations (observed and prediction), included for convenience.
A matrix of (ordered) neighbor indices.
A matrix indicating whether the conditioning
set for each (ordered) location is on the latent process (y, 1) or
the observed values (z, 0).
Matrix of observed locations.
Optional matrix of prediction locations.
Number of neighbors.
Setting the seed for reproducibility of the observed location ordering
Setting the seed for reproducibility of the prediction ordering.
Logical; should the coordinates be ordered.
Logical; should the coordinates be ordered.