Class ARMAModel
- java.lang.Object
-
- dev.nm.stat.timeseries.linear.univariate.arima.ARIMAXModel
-
- dev.nm.stat.timeseries.linear.univariate.arima.ARIMAModel
-
- dev.nm.stat.timeseries.linear.univariate.stationaryprocess.arma.ARMAModel
-
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 \]
-
-
Constructor Summary
Constructors Constructor Description 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.ARMAModel(ARMAModel that)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 dev.nm.stat.timeseries.linear.univariate.arima.ARIMAModel
getARMA
-
-
-
-
Constructor Detail
-
ARMAModel
public ARMAModel(double mu, double[] AR, double[] MA, double sigma)
Construct a univariate ARMA model.- Parameters:
mu
- the intercept (constant) termAR
- the AR coefficients (excluding the initial 1);null
if no AR coefficientsMA
- the MA coefficients (excluding the initial 1);null
if no MA coefficientssigma
- 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) termAR
- the AR coefficients (excluding the initial 1);null
if no AR coefficientsMA
- 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 coefficientsMA
- the MA coefficients (excluding the initial 1);null
if no MA coefficientssigma
- 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 coefficientsMA
- 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 lagsmaLags
- 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
-
-