Adds posterior mean and credible interval columns to data. The user must
supply pred_formula because inlabru prediction expressions are arbitrary R
and cannot be recovered from the fit object alone.
Usage
# S3 method for class 'bru'
augment(x, data, pred_formula, n_samples = 500L, seed = NULL, ...)Arguments
- x
A fitted
bruobject.- data
A data frame of covariate values.
- pred_formula
A formula passed to
inlabru::predict().- n_samples
Number of posterior samples (default 500).
- seed
Optional integer. If non-
NULL, the session RNG is reset to this value beforeinlabru::predict()is called so that two identical calls return identical posterior summaries.NULLleaves the session RNG state unchanged (predictions then vary run-to-run becauseinlabru::predict()samples from the posterior).- ...
Passed to
inlabru::predict().