simulate.graph_lme {MetricGraph} | R Documentation |
Simulation of models on metric graphs
Description
The function samples a Gaussian random field based on a
fitted model using graph_lme()
.
Usage
## S3 method for class 'graph_lme'
simulate(
object,
nsim = 1,
seed = NULL,
sample_latent = FALSE,
posterior = FALSE,
which_repl = NULL,
...
)
Arguments
object |
A |
nsim |
The number of simulations. |
seed |
an object specifying if and how the random number generator should be initialized (‘seeded’). |
sample_latent |
If |
posterior |
Should posterior samples be generated? If |
which_repl |
Which replicates to generate the samples. If |
... |
Currently not used. |
Value
A list containing elements samples
, edge_number
and distance_on_edge
. Each of them is a list, whose indexes are the replicates, and in samples
a matrix is given with nsim
columns, each one being a sample. edge_number
and distance_on_edges
contain the respective edge numbers and distances on edge for each sampled element. The locations of the samples are the location of the data in which the model was fitted.