rspde_lme
objectAugment accepts a model object and a dataset and adds information about each observation in the dataset. It includes
predicted values in the .fitted
column, residuals in the .resid
column, and standard errors for the fitted values in a .se.fit
column.
It also contains the New columns always begin with a . prefix to avoid overwriting columns in the original dataset.
# S3 method for rspde_lme
augment(
x,
newdata = NULL,
loc = NULL,
mesh = FALSE,
which_repl = NULL,
se_fit = FALSE,
conf_int = FALSE,
pred_int = FALSE,
level = 0.95,
n_samples = 100,
...
)
A tidyr::tibble()
with columns:
.fitted
Fitted or predicted value.
.fittedlwrconf
Lower bound of the confidence interval, if conf_int = TRUE
.fitteduprconf
Upper bound of the confidence interval, if conf_int = TRUE
.fittedlwrpred
Lower bound of the prediction interval, if pred_int = TRUE
.fitteduprpred
Upper bound of the prediction interval, if pred_int = TRUE
.fixed
Prediction of the fixed effects.
.random
Prediction of the random effects.
.resid
The ordinary residuals, that is, the difference between observed and fitted values.
.se_fit
Standard errors of fitted values, if se_fit = TRUE.
A rspde_lme
object.
A data.frame
or a list
containing the covariates, the edge
number and the distance on edge for the locations to obtain the prediction. If NULL
, the fitted values will be given for the original locations where the model was fitted.
Prediction locations. Can either be a data.frame
, a matrix
or a character vector, that contains the names of the columns of the coordinates of the locations. For models using metric_graph
objects, plase use edge_number
and distance_on_edge
instead.
Obtain predictions for mesh nodes? The graph must have a mesh, and either only_latent
is set to TRUE or the model does not have covariates.
Which replicates to obtain the prediction. If NULL
predictions
will be obtained for all replicates. Default is NULL
.
Logical indicating whether or not a .se.fit column should be added to the augmented output. If TRUE, it only returns a non-NA value if type of prediction is 'link'.
Logical indicating whether or not confidence intervals for the fitted variable should be built.
Logical indicating whether or not prediction intervals for future observations should be built.
Level of confidence and prediction intervals if they are constructed.
Number of samples when computing prediction intervals.
Additional arguments. Expert use only.
glance.rspde_lme