forecast: Function for running a stepwise simulation.

Description Usage Arguments

View source: R/forecast.R

Description

Function for running a stepwise simulation.

Usage

1
2
3
4
forecast(functions = new.env(), data = new.env(),
  data_transformations = quote({ }), initial_states = new.env(),
  simulation = quote({ }), generated_quantities = quote({ }), n_steps = 1,
  sandbox = TRUE)

Arguments

functions

An enviornment (could be coerced from a list) with any additional functions needed by the simulation.

data

An environment (could be coerced from a list) with all immutable data for the simulation.

data_transformations

code snippet run once, created by quoting a bracketed expression, (e.g.-quote(a <- 3; b <- 3*a)), which will be used to transform data once prior to simulation.

initial_states

An environment (could be coerced from a list) with the initial state of simulation parameters.

simulation

A code snippet, run once per step, created by quoting a bracketed expression, (e.g.-quote(a <- 3; b <- -1*a), which will be used to transform the simulation state once per step. This code can not modify the data.

generated_quantities

A code snippet, run once per step, after simulation, which will be used to generate output dependent on the simulated state.

n_steps

total number of simulation iterations to run.

sandbox

if TRUE the parent.env where the call is made will not be available to the code. For full effects see ?create_sandbox.


sakrejda/simachine documentation built on May 29, 2019, 1 p.m.