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 the conditional expectation.
predictions(
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
)
GpGp_fit object, the result of fit_model
prediction locations
Design matrix for predictions
Observations associated with locs_obs
observation locations
Design matrix for observations
Linear mean parameters
Covariance parameters
Name of covariance function
Number of nearest neighbors to use
TRUE/FALSE for whether reordering should be done. This should generally be kept at TRUE, unless testing out the effect of reordering.
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).
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.