SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.timeseries.linear.univariate.stationaryprocess.arima
Class ArimaxModel

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.timeseries.linear.univariate.stationaryprocess.arima.ArimaxModel
Direct Known Subclasses:
ArimaModel, ArmaxModel

public class ArimaxModel
extends java.lang.Object

This class represents a univariate ARIMAX (ARIMA model with eXogenous inputs) model.

The ARIMAX model incorporates exogenous variables and it can be considered as a generalization of the ARIMA model. Letting L be lag operator, the d-th difference of an ARIMAX(p, d, q) process Y_t is

X_t = (1 - L) ^ d * Y_t,
where X_t is an ARMAX(p, q) process, for which
X_t = μ + Σ φ_i * X_{t-i} + Σ θ_j * ε_{t-j} + ψ' * D_t + ε_t,
where D_t is an (m * 1) vector which contains all exogenous variables at time t (excl. the intercept term), and its coefficients are represented by an m-dimensional vector ψ.


Field Summary
protected  double[] AR
          the AR coefficients
protected  double[] MA
          the MA coefficients
protected  double mu
          the intercept (constant) term
protected  double[] psi
          the coefficients of the deterministic terms (excluding the intercept term)
protected  double sigma
          the white noise variance
 
Constructor Summary
ArimaxModel(ArimaxModel that)
          Copy constructor.
ArimaxModel(double[] AR, int d, double[] MA, double[] psi)
          Construct a zero-intercept (mu) univariate ARIMAX model with unit variance.
ArimaxModel(double[] AR, int d, double[] MA, double[] psi, double sigma)
          Construct a zero-intercept (mu) univariate ARIMAX model.
ArimaxModel(double mu, double[] AR, int d, double[] MA, double[] psi)
          Construct a univariate ARIMAX model with unit variance.
ArimaxModel(double mu, double[] AR, int d, double[] MA, double[] psi, double sigma)
          Construct a univariate ARIMAX (ARIMA model with eXogenous inputs) model.
 
Method Summary
 double[] AR()
          Get the AR coefficients, excluding the initial 1.
 double AR(int i)
          Get the i-th AR coefficient; AR(0) = 1.
 int d()
          Get the order of integration.
 ArmaxModel getArmax()
          Get the ARMAX specification of this ARIMAX model, essentially ignoring the differencing.
 double[] MA()
          Get the MA coefficients, excluding the initial 1.
 double MA(int i)
          Get the i-th MA coefficient; MA(0) = 1.
 int maxPQ()
          Get the maximum of AR length or MA length.
 double mu()
          Get the intercept term.
 int p()
          Get the number of AR terms.
 double[] psi()
          Get the coefficients of the deterministic terms.
 int q()
          Get the number of MA terms.
 double sigma()
          Get the white noise variance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mu

protected final double mu
the intercept (constant) term


AR

protected final double[] AR
the AR coefficients


MA

protected final double[] MA
the MA coefficients


psi

protected final double[] psi
the coefficients of the deterministic terms (excluding the intercept term)


sigma

protected final double sigma
the white noise variance

Constructor Detail

ArimaxModel

public ArimaxModel(double mu,
                   double[] AR,
                   int d,
                   double[] MA,
                   double[] psi,
                   double sigma)
Construct a univariate ARIMAX (ARIMA model with eXogenous inputs) model.

Parameters:
mu - the intercept (constant) term
AR - the AR coefficients (excluding the initial 1); null if no AR coefficient
d - the order of integration
MA - the MA coefficients (excluding the initial 1); null if no MA coefficient
psi - the coefficients of the deterministic terms (excluding the intercept term)
sigma - the white noise variance

ArimaxModel

public ArimaxModel(double mu,
                   double[] AR,
                   int d,
                   double[] MA,
                   double[] psi)
Construct a univariate ARIMAX model with unit variance.

Parameters:
mu - the intercept (constant) term
AR - the AR coefficients (excluding the initial 1); null if no AR coefficient
d - the order of integration
MA - the MA coefficients (excluding the initial 1); null if no MA coefficient
psi - the coefficients of the deterministic terms (excluding the intercept term)

ArimaxModel

public ArimaxModel(double[] AR,
                   int d,
                   double[] MA,
                   double[] psi,
                   double sigma)
Construct a zero-intercept (mu) univariate ARIMAX model.

Parameters:
AR - the AR coefficients (excluding the initial 1); null if no AR coefficient
d - the order of integration
MA - the MA coefficients (excluding the initial 1); null if no MA coefficient
psi - the coefficients of the deterministic terms (excluding the intercept term)
sigma - the white noise variance

ArimaxModel

public ArimaxModel(double[] AR,
                   int d,
                   double[] MA,
                   double[] psi)
Construct a zero-intercept (mu) univariate ARIMAX model with unit variance.

Parameters:
AR - the AR coefficients (excluding the initial 1); null if no AR coefficient
d - the order of integration
MA - the MA coefficients (excluding the initial 1); null if no MA coefficient
psi - the coefficients of the deterministic terms (excluding the intercept term)

ArimaxModel

public ArimaxModel(ArimaxModel that)
Copy constructor.

Parameters:
that - a univariate ARIMAX model
Method Detail

mu

public double mu()
Get the intercept term.

Returns:
the intercept (constant) term

AR

public double AR(int i)
Get the i-th AR coefficient; AR(0) = 1.

Parameters:
i - an index
Returns:
the i-th AR coefficient

AR

public double[] AR()
Get the AR coefficients, excluding the initial 1.

Returns:
the AR coefficients; could be null

MA

public double MA(int i)
Get the i-th MA coefficient; MA(0) = 1.

Parameters:
i - an index
Returns:
the i-th MA coefficient

MA

public double[] MA()
Get the MA coefficients, excluding the initial 1.

Returns:
the MA coefficients; could be null

psi

public double[] psi()
Get the coefficients of the deterministic terms.

Returns:
the coefficients of the deterministic terms; could be null

d

public int d()
Get the order of integration.

Returns:
the order of integration

p

public int p()
Get the number of AR terms.

Returns:
the number of AR terms

q

public int q()
Get the number of MA terms.

Returns:
the number of MA terms

maxPQ

public int maxPQ()
Get the maximum of AR length or MA length.

Returns:
max(AR terms, MA terms)

sigma

public double sigma()
Get the white noise variance.

Returns:
the white noise variance

getArmax

public ArmaxModel getArmax()
Get the ARMAX specification of this ARIMAX model, essentially ignoring the differencing.

Returns:
the ARMAX specification

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.