simulate: Simulation of a spatiotemporal partially-observed Markov...

Description Usage Arguments Value Examples

Description

simulate generates simulations of the latent and measurement processes.

Usage

1
2
3
4
5
6
7
8
9
## S4 method for signature 'spatPomp'
simulate(
  object,
  nsim = 1,
  seed = NULL,
  format = c("spatPomps", "data.frame"),
  include.data = FALSE,
  ...
)

Arguments

object

optional; if present, it should be a data frame or a ‘pomp’ object.

nsim

number of simulations.

seed

optional; if set, the pseudorandom number generator (RNG) will be initialized with seed. the random seed to use. The RNG will be restored to its original state afterward.

format

the format of the simulated results. If the argument is set to 'spatPomps', the default behavior, then the output is a list of spatPomp objects. Options are 'spatPomps' and 'data.frame'.

include.data

if TRUE, the original data and covariates (if any) are included (with .id = "data"). This option is ignored unless format = "data.frame".

...

additional arguments supply new or modify existing model characteristics or components. See pomp for a full list of recognized arguments.

When named arguments not recognized by pomp are provided, these are made available to all basic components via the so-called userdata facility. This allows the user to pass information to the basic components outside of the usual routes of covariates (covar) and model parameters (params). See userdata for information on how to use this facility.

Value

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.

Examples

1
2
3
4
# Get a spatPomp object
b <- bm(U=5, N=10)
# Get 10 simulations from same model as data.frame
sims <- simulate(b, nsim=10, format='data.frame')

spatPomp documentation built on Sept. 5, 2021, 5:35 p.m.