arimaSS#

Purpose#

Estimates ARIMA models using a state space representation, the Kalman filter, and maximum likelihood.

Format#

vOut = arimaSS(y, p, d, q, trend, const)#
Parameters:
  • y (Nx1 vector) – data.

  • p (Scalar) – the autoregressive order.

  • d (Scalar) – the order of differencing.

  • q (Scalar) – the moving average order.

  • trend (Scalar) – an indicator variable to include a trend in the model. Set to 1 to include trend, 0 otherwise.

  • const (Scalar) – an indicator variable to include a constant in the model. Set to 1 to include trend, 0 otherwise.

Returns:

vOut (struct) –

An instance of an arimamtOut structure containing the following members:

amo.aic

Scalar, value of the Akaike information criterion.

amo.b

Kx1 vector, estimated model coefficients.

amo.e

Nx1 vector, residual from fitted model.

amo.ll

Scalar, the value of the log likelihood function.

amo.sbc

Scalar, value of the Schwartz Bayesian criterion.

amo.lrs

Lx1 vector, the Likelihood Ratio Statistic.

amo.vcb

KxK matrix, the covariance matrix of estimated model coefficients.

amo.mse

Scalar, mean sum of squares for errors.

amo.sse

Scalar, the sum of squares for errors.

amo.ssy

Scalar, the sum of squares for Y data.

amo.rstl

an instance of the kalmanResult structure.

amo.tsmtDesc

An instance of the tsmtModelDesc structure containing the following members:

tsmtDesc.depvar

Kx1 string array, names of endogenous variables.

tsmtDesc.indvars

Mx1 string array, names of exogenous variables.

tsmtDesc.timepsan

2x1 string array, range of the time series. Available if date vector is passed as part of a dataframe input.

tsmtDesc.ncases

Scalar, number of observations.

tsmtDesc.df

Scalar, degrees of freedom.

tsmtDesc.model_name

String, model name.

amo.sumStats

An instance of the tsmtSummaryStats structure containing the following members:

sumStats.sse

Kx1 vector, sum of the squared errors of estimates for endogenous variables in the model.

sumStats.mse

Mx1 vector, mean squared errors of estimates for endogenous variables in the model.

sumStats.rmse

Mx1 vector, root mean squared errors of estimates for endogenous variables in the model.

sumStats.see

Mx1 vector, standard error of the estimates for endogenous variables in the model.

sumStats.rsq

Mx1 vector, r-squared of estimates for endogenous variables in the model.

sumStats.AdjRsq

String, adjusted r-squared of estimates for endogenous variables in the model.

sumStats.ssy

String, total sum of the squares for endogenous variables in the model.

sumStats.DW

String, Durbin-Watson statistic for residauls from the estimates for endogenous variables in the model.

Example#

new;
library tsmt;

// Create file name with full path
fname = getGAUSSHome("pkgs/tsmt/examples/wpi1.dat");

// Load variable 'wpi' from 'wpi1.dat'
y = loadd(fname, "wpi");

// Model settings
p = 1;
d = 1;
q = 1;
trend = 0;
const = 1;

// Declare 'amo' to be an arimamtOut structure
// to hold the estimation results and then
// estimate the model
struct arimamtOut amo;
amo = arimaSS(y, p, d, q, trend, const);

The example above prints the following results

================================================================================
Model:                 ARIMA(1,1,1)          Dependent variable:             wpi
Time Span:                  Unknown          Valid cases:                    124
SSE:                         68.406          Degrees of freedom:             119
Log Likelihood:             135.464          RMSE:                         0.746
AIC:                        262.928          SEE:                         17.102
SBC:                        290.177          Durbin-Watson:                1.768
R-squared:                    0.416          Rbar-squared:                 0.854
================================================================================
Coefficient                Estimate      Std. Err.        T-Ratio     Prob |>| t
--------------------------------------------------------------------------------

Constant                    0.80003            ---            ---            ---
wpi L(1)                    0.86813        0.06389       13.58860        0.00017
MA  L(1)                   -0.40594        0.12318       -3.29550        0.03006
Sigma wpi                   0.52382        0.29577        1.77104        0.15126
================================================================================

Library#

tsmt

Source#

sarima_ss.src

See also

Functions arimaFit(), sarimaSS()