# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.timeseries.linear.univariate.stationaryprocess.arma

## Class ARMAModel

• Direct Known Subclasses:
ARModel, MAModel

public class ARMAModel
extends ARIMAModel
A univariate ARMA model, Xt, takes this form. $X_t = \mu + \sum_{i=1}^p \phi_i X_{t-i} + \sum_{i=1}^q \theta_j \epsilon_{t-j} + \epsilon_t$
Wikipedia: Autoregressive moving average model
• ### Constructor Summary

Constructors
Constructor and Description
ARMAModel(ARMAModel that)
Copy constructor.
ARMAModel(double[] AR, double[] MA)
Construct a univariate ARMA model with unit variance and zero-intercept (mu).
ARMAModel(double[] AR, double[] MA, double sigma)
Construct a univariate ARMA model with zero-intercept (mu).
ARMAModel(double mu, double[] AR, double[] MA)
Construct a univariate ARMA model with unit variance.
ARMAModel(double mu, double[] AR, double[] MA, double sigma)
Construct a univariate ARMA model.
• ### Method Summary

All Methods
Modifier and Type Method and Description
double conditionalMean(double[] arLags, double[] maLags)
Compute the univariate ARMA conditional mean, given all the lags.
ARMAModel getDemeanedModel()
Get the demeaned version of the time series model.
double unconditionalMean()
Compute the multivariate ARMA unconditional mean.
• ### Methods inherited from class com.numericalmethod.suanshu.stats.timeseries.linear.univariate.arima.ARIMAModel

getARMA
• ### Methods inherited from class com.numericalmethod.suanshu.stats.timeseries.linear.univariate.arima.ARIMAXModel

AR, d, getARMAX, MA, maxPQ, mu, p, phi, phiPolynomial, psi, q, sigma, theta, thetaPolynomial, toString
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### 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