krige_new() extends an estimated MCGF model to spatial
locations that were not used for fitting. This is useful when:
There are two ways to describe the new sites:
locations_new, ordists_new.This vignette demonstrates the coordinate workflow.
The built-in sim1 data contain both observations and
locations.
For a first new-location forecast, a separable base model is sufficient.
For illustration, place a new site near the centre of the existing network.
krige_new()pred <- krige_new(
x,
locations_new = new_location,
model = "base",
interval = TRUE
)
dim(pred$fit)
#> [1] 1000 11The output contains forecasts for the original sites and the appended new site. The new site is the last spatial column.
If you have a separate future period for the original locations,
supply it with newdata:
pred_future <- krige_new(
x,
newdata = future_data,
locations_new = new_location,
model = "base",
interval = TRUE
)future_data must have the same columns, in the same
order, as the fitted mcgf object.
You can also provide newdata_new. These observations are
then included in the lagged information used for forecasting.
pred_with_new_history <- krige_new(
x,
newdata = future_data,
locations_new = new_location,
newdata_new = future_new_site,
model = "base",
interval = TRUE
)The number of rows in newdata_new must match
newdata, and the number of columns must match the number of
new locations.
If the object does not contain coordinates, calculate the distances
yourself and pass them through dists_new.
d_new <- find_dists_new(
locations = observed_locations,
locations_new = new_location,
longlat = TRUE
)
pred <- krige_new(
x,
dists_new = d_new,
model = "base"
)Do not supply both locations_new and
dists_new.
Once a Lagrangian model has been fitted and added with
add_lagr(), switch to:
This extends both the base and directional Lagrangian covariance to the new location.
krige_new() also has an mcgf_rs method. Use
dists_new_ls and sds_new_ls when distance or
marginal-variance assumptions differ by regime. For soft regime
forecasts, supply regime probabilities using prob.
See vignette("mcgf_rs", package = "mcgf") for a complete
RS-MCGF fit.