Learn R Programming

smooth (version 4.3.1)

sim.ssarima: Simulate SSARIMA

Description

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

Usage

sim.ssarima(orders = list(ar = 0, i = 1, ma = 1), lags = 1, obs = 10,
  nsim = 1, frequency = 1, AR = NULL, MA = NULL, constant = FALSE,
  initial = NULL, bounds = c("admissible", "none"),
  randomizer = c("rnorm", "rt", "rlaplace", "rs"), probability = 1, ...)

Arguments

Value

List of the following values is returned:

  • model - Name of SSARIMA model.

  • AR - Value of AR parameters. If nsim>1, then this is a matrix.

  • MA - Value of MA parameters. If nsim>1, then this is a matrix.

  • constant - Value of constant term. If nsim>1, then this is a vector.

  • initial - Initial values of SSARIMA. If nsim>1, then this is a matrix.

  • 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., 2023. Smooth Forecasting with the Smooth Package in R. arXiv. tools:::Rd_expr_doi("10.48550/arXiv.2301.01790")

  • Snyder, R. D., 1985. Recursive Estimation of Dynamic Linear Models. Journal of the Royal Statistical Society, Series B (Methodological) 47 (2), 272-276.

  • Hyndman, R.J., Koehler, A.B., Ord, J.K., and Snyder, R.D. (2008) Forecasting with exponential smoothing: the state space approach, Springer-Verlag. tools:::Rd_expr_doi("10.1007/978-3-540-71918-2").

  • Svetunkov, I., & Boylan, J. E. (2019). State-space ARIMA for supply-chain forecasting. International Journal of Production Research, 0(0), 1–10. tools:::Rd_expr_doi("10.1080/00207543.2019.1600764")

See Also

sim.es, ssarima, Distributions, orders

Examples

Run this code

# Create 120 observations from ARIMA(1,1,1) with drift. Generate 100 time series of this kind.
x <- sim.ssarima(ar.orders=1,i.orders=1,ma.orders=1,obs=120,nsim=100,constant=TRUE)

# Generate similar thing for seasonal series of SARIMA(1,1,1)(0,0,2)_4
x <- sim.ssarima(ar.orders=c(1,0),i.orders=c(1,0),ma.orders=c(1,2),lags=c(1,4),
                 frequency=4,obs=80,nsim=100,constant=FALSE)

# Generate 10 series of high frequency data from SARIMA(1,0,2)_1(0,1,1)_7(1,0,1)_30
x <- sim.ssarima(ar.orders=c(1,0,1),i.orders=c(0,1,0),ma.orders=c(2,1,1),lags=c(1,7,30),
                 obs=360,nsim=10)


Run the code above in your browser using DataLab