Class ARMAModel

    • Constructor Detail

      • ARMAModel

        public ARMAModel​(double mu,
                         double[] AR,
                         double[] MA,
                         double sigma)
        Construct a univariate ARMA model.
        Parameters:
        mu - the intercept (constant) term
        AR - the AR coefficients (excluding the initial 1); null if no AR coefficients
        MA - the MA coefficients (excluding the initial 1); null if no MA coefficients
        sigma - the white noise variance
      • ARMAModel

        public ARMAModel​(double mu,
                         double[] AR,
                         double[] MA)
        Construct a univariate ARMA model with unit variance.
        Parameters:
        mu - the intercept (constant) term
        AR - the AR coefficients (excluding the initial 1); null if no AR coefficients
        MA - the MA coefficients (excluding the initial 1); null if no MA coefficients
      • ARMAModel

        public ARMAModel​(double[] AR,
                         double[] MA,
                         double sigma)
        Construct a univariate ARMA model with zero-intercept (mu).
        Parameters:
        AR - the AR coefficients (excluding the initial 1); null if no AR coefficients
        MA - the MA coefficients (excluding the initial 1); null if no MA coefficients
        sigma - the white noise variance
      • ARMAModel

        public ARMAModel​(double[] AR,
                         double[] MA)
        Construct a univariate ARMA model with unit variance and zero-intercept (mu).
        Parameters:
        AR - the AR coefficients (excluding the initial 1); null if no AR coefficients
        MA - the MA coefficients (excluding the initial 1); null if no MA coefficients
      • ARMAModel

        public ARMAModel​(ARMAModel that)
        Copy constructor.
        Parameters:
        that - a univariate ARMA model
    • Method Detail

      • conditionalMean

        public double conditionalMean​(double[] arLags,
                                      double[] maLags)
        Compute the univariate ARMA conditional mean, given all the lags.
        Parameters:
        arLags - the AR lags
        maLags - the MA lags
        Returns:
        the conditional mean
      • unconditionalMean

        public double unconditionalMean()
        Compute the multivariate ARMA unconditional mean.
        Returns:
        the unconditional mean
      • getDemeanedModel

        public ARMAModel getDemeanedModel()
        Get the demeaned version of the time series model. \[ Y_t = (X_t - \mu) = \sum_{i=1}^p \phi_i (X_{t-i} - \mu) + \sum_{i=1}^q \theta_j \epsilon_{t-j} + \epsilon_t \] μ is the unconditional mean.
        Returns:
        the demeaned time series