graph_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 graph_lme
augment(
x,
newdata = NULL,
which_repl = NULL,
sd_post_re = FALSE,
se_fit = FALSE,
conf_int = FALSE,
pred_int = FALSE,
level = 0.95,
edge_number = "edge_number",
distance_on_edge = "distance_on_edge",
coord_x = "coord_x",
coord_y = "coord_y",
data_coords = c("PtE", "spatial"),
normalized = FALSE,
no_nugget = FALSE,
check_euclidean = FALSE,
...
)
A tidyr::tibble()
with columns:
.fitted
Fitted or predicted value.
.relwrconf
Lower bound of the confidence interval of the random effects, if conf_int = TRUE
.reuprconf
Upper bound of the confidence interval of the random effects, if conf_int = TRUE
.fittedlwrpred
Lower bound of the prediction interval, if conf_int = TRUE
.fitteduprpred
Upper bound of the prediction interval, if conf_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.
.std_resid
The standardized residuals, that is, the ordinary residuals divided by the standard error of the fitted values (by the prediction standard error), if se_fit = TRUE or pred_int = TRUE.
.se_fit
Standard errors of fitted values, if se_fit = TRUE.
.sd_post_re
Standard deviation of the posterior mean of the random effects, if se_fit = TRUE.
A graph_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.
Which replicates to obtain the prediction. If NULL
predictions
will be obtained for all replicates. Default is NULL
.
Logical indicating whether or not a .sd_post_re column should be added to the augmented output containing the posterior standard deviations of the random effects.
Logical indicating whether or not a .se_fit column should be added to the augmented output containing the standard errors of the fitted values. If TRUE
, the posterior standard deviations of the random effects will also be returned.
Logical indicating whether or not confidence intervals for the posterior mean of the random effects should be built.
Logical indicating whether or not prediction intervals for the fitted values should be built. If TRUE
, the confidence intervals for the posterior random effects will also be built.
Level of confidence and prediction intervals if they are constructed.
Name of the variable that contains the edge number, the
default is edge_number
.
Name of the variable that contains the distance on
edge, the default is distance_on_edge
.
Column (or entry on the list) of the data
that contains
the x coordinate. If not supplied, the column with name "coord_x" will be
chosen. Will not be used if Spoints
is not NULL
or if data_coords
is
PtE
.
Column (or entry on the list) of the data
that contains
the y coordinate. If not supplied, the column with name "coord_x" will be
chosen. Will not be used if Spoints
is not NULL
or if data_coords
is
PtE
.
To be used only if Spoints
is NULL
. It decides which
coordinate system to use. If PtE
, the user must provide edge_number
and
distance_on_edge
, otherwise if spatial
, the user must provide
coord_x
and coord_y
.
Are the distances on edges normalized?
Should the prediction be done without nugget?
Check if the graph used to compute the resistance distance has Euclidean edges? The graph used to compute the resistance distance has the observation locations as vertices.
Additional arguments.
glance.graph_lme