This function is called by the pred_pred module and calls disaggregation::predict_model() and disaggregation::predict_uncertainty() and also generates predicted cases. SpatRasters are wrapped to enable asynchronous operation.

pred_pred(
  fit,
  aggregation,
  cases,
  predict_iid,
  uncertain = FALSE,
  N = NULL,
  CI = NULL,
  async = FALSE
)

Arguments

fit

disag_model. Object returned by disag_model function that contains all the necessary objects for generating predictions.

aggregation

SpatRaster. The aggregation raster

cases

logical. Whether to predictions of cases

predict_iid

logical. Whether to generate predictions including the iid effect

uncertain

logical. Whether or not to generate upper and lower credible intervals

N

numeric. The number of realisations to use when generating uncertainty predictions

CI

numeric. The credible interval to user when generating uncertainty predictions.

async

logical. Whether or not the function is being used asynchronously

Value

a list containing the predictions

Author

Simon Smart simon.smart@cantab.net