Prediction of the linear predictor at newdata, on the link or response
scale. The fixed-effect part is X beta with credible bounds from the
fixed-effect covariance (vcov()). For a fit carrying a continuous spatial
field, the posterior-mean field is interpolated (kriged) to the newdata
coordinates and added to the linear predictor by default, so predict()
gives the conditional (location-specific) prediction. Three continuous field
families are supported: an SPDE Matern field (spatial_spde()), projected
through the mesh; a Hilbert-space GP field (spatial_gp(approx = "hsgp")),
where the Laplacian basis is re-evaluated at the new coordinates (with the
training centring / boundary); and a GP / NNGP field (spatial_gp()),
interpolated by the NNGP conditional mean at each new location's nearest
training locations. The HSGP and GP/NNGP fields are marginalised over the
hyperparameter grid (not plugged in at the posterior mean). Ordinary random
effects are held at zero (population level); add group effects from ranef()
when needed.
Arguments
- object
A
tulpa_fitobject.- newdata
Data frame of covariates (and, for an SPDE fit, the coordinate columns named in the spec's coordinate formula). If
NULL, predicts at the training design (requires$model_matrix).- type
"link"(linear predictor) or"response"(mean scale). For a binomial fit the"response"scale here is the per-trial success probabilityg^{-1}(eta)(there is non_trialsatnewdata); this differs fromfitted(), which returns the trial-scaled expected count at the training design.- se.fit
If
TRUE, also return the link-scale standard error and credible bounds. With an included SPDE field the SE propagates the joint (fixed-effect, field) posterior precision at the fitted hyperparameters – including the cross term – conditional on(range, sigma)(a nested fit's hyperparameter-grid spread is not propagated, so the bound is mildly optimistic when that posterior is wide). Integer-nu, no-RE SPDE fits only; other layouts decline with an explanation.- level
Credible-interval level (default 0.95).
- include_field
For a continuous-spatial fit (SPDE, HSGP, or GP/NNGP), add the kriged field to the prediction (default
TRUE).FALSEgives the fixed-effect (population) prediction. Ignored for fits with no continuous field. For an HSGP or GP/NNGP fit the field is added to the point prediction but its uncertainty is not yet propagated intose.fit(the interval reflects the fixed-effect covariance only).- ...
Ignored.