Description Usage Arguments Details Value
Predict method for MBM objects
1 2 |
x |
A previously-fit MBM object |
newdata |
Optional dataset for prediction. If present, it should be a new dataset in the same format used to fit the model (i.e., a site by covariate matrix). If missing, predictions will be for the original data. |
type |
Whether to return predictions on the link or response scale |
n_samples |
NA or integer; if NA, analytical predictions with standard deviation are returned, otherwise posterior samples are returned. |
Prediction to new data is possible after the fact for mbm models, however
there can be performance penalties for doing so with large models. Thus, it is
sometimes preferable to predict during model fitting via the predictX
argument to the mbm
function.
All prediction is done on the link scale.
This function caches to disk, thus it is important to ensure that adequate disk space is available when using large prediction datasets.
A data frame of predictions and standard deviations (on the link scale); use
x$y_rev_transform(x$rev_link(predictions$fit))
for the response scale.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.