simulate | R Documentation |
simulate
generates simulations of the latent and measurement
processes.
## S4 method for signature 'spatPomp'
simulate(
object,
nsim = 1,
seed = NULL,
format = c("spatPomps", "data.frame"),
include.data = FALSE,
...
)
object |
optional; if present, it should be a data frame or a ‘pomp’ object. |
nsim |
number of simulations. |
seed |
optional integer;
if set, the pseudorandom number generator (RNG) will be initialized with |
format |
the format of the simulated results. If the argument is
set to |
include.data |
if |
... |
additional arguments are passed to |
if format='spatPomps'
and nsim=1
an object of class ‘spatPomp’ representing a simulation from the model in object
is returned.
If format='spatPomps'
and nsim>1
a list of class ‘spatPomp’ objects is returned.
If format='data.frame'
then a class ‘data.frame’ object is returned.
Kidus Asfaw
2020
# Complete examples are provided in the package tests
## Not run:
# Get a spatPomp object
b <- bm(U=2, N=5)
# Get 2 simulations from same model as data.frame
sims <- simulate(b, nsim=2, format='data.frame')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.