predict.rspde_lme {rSPDE} | R Documentation |
Prediction of a mixed effects regression model on a metric graph.
Description
Prediction of a mixed effects regression model on a metric graph.
Usage
## S3 method for class 'rspde_lme'
predict(
object,
newdata = NULL,
loc = NULL,
mesh = FALSE,
which_repl = NULL,
compute_variances = FALSE,
posterior_samples = FALSE,
n_samples = 100,
sample_latent = FALSE,
edge_number = "edge_number",
distance_on_edge = "distance_on_edge",
normalized = FALSE,
return_as_list = FALSE,
return_original_order = TRUE,
...,
data = deprecated()
)
Arguments
object |
The fitted object with the |
newdata |
A |
loc |
Prediction locations. Can either be a |
mesh |
Obtain predictions for mesh nodes? The graph must have a mesh, and either |
which_repl |
Which replicates to use? If |
compute_variances |
Set to also TRUE to compute the kriging variances. |
posterior_samples |
If |
n_samples |
Number of samples to be returned. Will only be used if |
sample_latent |
Do posterior samples only for the random effects? |
edge_number |
Name of the variable that contains the edge number, the default is |
distance_on_edge |
Name of the variable that contains the distance on edge, the default is |
normalized |
Are the distances on edges normalized? |
return_as_list |
Should the means of the predictions and the posterior samples be returned as a list, with each replicate being an element? |
return_original_order |
Should the results be return in the original (input) order or in the order inside the graph? |
... |
Not used. |
data |
Value
A list with elements mean
, which contains the means of the
predictions, fe_mean
, which is the prediction for the fixed effects, re_mean
, which is the prediction for the random effects, variance
(if compute_variance
is TRUE
), which contains the
variances of the predictions, samples
(if posterior_samples
is TRUE
),
which contains the posterior samples.