Learn R Programming

smooth (version 4.3.0)

sim.ces: Simulate Complex Exponential Smoothing

Description

Function generates data using CES with Single Source of Error as a data generating process.

Usage

sim.ces(seasonality = c("none", "simple", "partial", "full"), obs = 10,
  nsim = 1, frequency = 1, a = NULL, b = NULL, initial = NULL,
  randomizer = c("rnorm", "rt", "rlaplace", "rs"), probability = 1, ...)

Arguments

Value

List of the following values is returned:

  • model - Name of CES model.

  • a - Value of complex smoothing parameter a. If nsim>1, then this is a vector.

  • b - Value of complex smoothing parameter b. If seasonality="n" or seasonality="s", then this is equal to NULL. If nsim>1, then this is a vector.

  • initial - Initial values of CES in a form of matrix. If nsim>1, then this is an array.

  • data - Time series vector (or matrix if nsim>1) of the generated series.

  • states - Matrix (or array if nsim>1) of states. States are in columns, time is in rows.

  • residuals - Error terms used in the simulation. Either vector or matrix, depending on nsim.

  • occurrence - Values of occurrence variable. Once again, can be either a vector or a matrix...

  • logLik - Log-likelihood of the constructed model.

Details

For the information about the function, see the vignette: vignette("simulate","smooth")

References

  • Svetunkov, I., Kourentzes, N., & Ord, J. K. (2022). Complex exponential smoothing. Naval Research Logistics, 69(8), 1108–1123. https://doi.org/10.1002/nav.22074

See Also

sim.es, sim.ssarima, ces, Distributions

Examples

Run this code

# Create 120 observations from CES(n). Generate 100 time series of this kind.
x <- sim.ces("n",obs=120,nsim=100)

# Generate similar thing for seasonal series of CES(s)_4
x <- sim.ces("s",frequency=4,obs=80,nsim=100)

# Estimate model and then generate 10 time series from it
ourModel <- ces(rnorm(100,100,5))
simulate(ourModel,nsim=10)

Run the code above in your browser using DataLab