Introduction
The following is an example of implementing the sarimaSS
procedure for state space estimation of SARIMA models. This example reproduces the Box and Jenkins (1976) Series G dataset to estimate the SARIMA(0,1,1)(0,1,1) "airline model".
Step 1: Load data
This example loads the data using the GAUSS function loadd
.
new;
library tsmt;
// Create file name with full path
dataset = getGAUSSHome() $+ "pkgs/tsmt/examples/airline.dat";
// Load and transform data
y = loadd(dataset, "ln(airline)");
Step 2: Estimate the model
The GAUSS function sarimaSS
uses Kalman Filtering and State Space modelling to estimate the SARIMA(0,1,1)(0,1,1) model.
p = 0;
d = 1;
q = 1;
P_s = 0;
D_s = 1;
Q_s = 1;
s = 12;
trend = 0;
const = 0;
// Estimate model
call sarimaSS(y, p, d, q, P_s, D_s, Q_s, s, trend, const);
Step 3: Output
The output reads
SARIMA(0,1,1)(0,1,1) Results Number of Observations: 131.0000 Degrees of Freedom: 127 Mean of Y: 5.5422 Standard Deviation of Y : 0.4415 Sum of Squares of Y: 27.8684 COEFFICIENTS Coefficient Estimates ------------------------------------------------------------------------------------------ Variables Coefficient se tstat pval theta : e[t-1] -0.407 1 -0.407 0.684 theta : e[t-1] -0.551 1 -0.551 0.582 Sigma2 0.0014 1 0.0014 0.999 ------------------------------------------------------------------------------------------ *p-val<0.1 **p-val<0.05 ***p-val<0.001
Dep. Variable(s) : Y1 No. of Observations : 131 Degrees of Freedom : 127 Mean of Y : 0.0003 Std. Dev. of Y : 0.0458 Y Sum of Squares : 0.2733 SSE : 0.1835 MSE : 0.0459 sqrt(MSE) : 0.2142 Model Selection (Information) Criteria ...................................... Likelihood Function : 244.5181 Akaike AIC : -497.0362 Schwarz BIC : -469.5354 Likelihood Ratio : -489.0362