java.lang.Object
dev.nm.stat.timeseries.linear.univariate.arima.ARIMASim
All Implemented Interfaces:
RandomNumberGenerator, Seedable

public class ARIMASim extends Object implements RandomNumberGenerator
This class simulates an ARIMA (AutoRegressive Integrated Moving Average) process. It a generalization of an AutoRegressive Moving Average (ARMA) model. It is applied in some cases where data show evidence of non-stationarity, where an initial differencing step (corresponding to the "integrated" part of the model) can remove the non-stationarity.

An ARMA model is a tool for understanding and, perhaps, predicting future values in this series. The model consists of two parts, an autoregressive (AR) part and a moving average (MA) part. It is usually denoted as ARMA(p, q) where p is the order of the autoregressive part and q the order of the moving average part. The notation AR(p) refers to the autoregressive model of order p. It is defined as the weighted sum of the lagged values, a constant, and a white noise. The notation MA(q) refers to the autoregressive model of order q. It is defined as the weighted sum of the lagged white noises and a drift. That is, a moving average model is conceptually a linear regression of the current value of the series against previous (unobserved) white noise error terms or random shocks. The random shocks are supposed to propagate to future values of the time series.

See Also:
  • Constructor Details

    • ARIMASim

      public ARIMASim(ARIMAModel arima, double[] lags, double[] innovations, RandomNumberGenerator rng)
      Construct an ARIMA model.
      Parameters:
      arima - an ARIMA model
      lags - the lags of AR length; lags[0] is \(x_{t-1}\)
      innovations - the innovations of MA length; innovations[0] is \(e_{t-1}\)
      rng - a random number generator to generate innovations
    • ARIMASim

      public ARIMASim(ARIMAModel arima, RandomNumberGenerator rng)
      Construct an ARIMA model. The lags and innovations are initialized to 0.
      Parameters:
      arima - an ARIMA model
      rng - a random number generator to generate innovations
    • ARIMASim

      public ARIMASim(ARIMAModel arima)
      Construct an ARIMA model, using random standard Gaussian innovations.
      Parameters:
      arima - an ARIMA model
  • Method Details

    • seed

      public void seed(long... seeds)
      Description copied from interface: Seedable
      Seed the random number/vector/scenario generator to produce repeatable experiments.
      Specified by:
      seed in interface Seedable
      Parameters:
      seeds - the seeds
    • nextDouble

      public double nextDouble()
      Description copied from interface: RandomNumberGenerator
      Get the next random double.
      Specified by:
      nextDouble in interface RandomNumberGenerator
      Returns:
      the next random number