0% found this document useful (0 votes)
6 views5 pages

Choosing the Best Time Series Model

The document discusses how to choose between multiple models that fit the same dataset, focusing on criteria such as the number of parameters, standard errors, and model comparison statistics like AIC and BIC. It provides an example using Lake Erie data to illustrate the identification and estimation of an AR(1) model, along with diagnostics to assess model fit. Additionally, it contrasts the performance of incorrect models, such as MA(1) and ARMA(1,1), highlighting the importance of selecting the appropriate model for accurate forecasting.

Uploaded by

Sand Rukshan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Choosing the Best Time Series Model

The document discusses how to choose between multiple models that fit the same dataset, focusing on criteria such as the number of parameters, standard errors, and model comparison statistics like AIC and BIC. It provides an example using Lake Erie data to illustrate the identification and estimation of an AR(1) model, along with diagnostics to assess model fit. Additionally, it contrasts the performance of incorrect models, such as MA(1) and ARMA(1,1), highlighting the importance of selecting the appropriate model for accurate forecasting.

Uploaded by

Sand Rukshan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIVERSITY OF RUHUNA

DEPARTMENT OF MATHEMATICS
[Link] in financial mathematics and industrial statistics
MFM3113: Financial Time Series (level III)

Assignment No.08 Semester I, 2024

What if More Than One Model Looks Okay?

Sometimes more than one model can seem to work for the same dataset. When that’s the case,
some things you can do to decide between the models are:

• Possibly choose the model with the fewest parameters.

• Examine standard errors of forecast values. Pick the model with the generally lowest
standard errors for predictions of the future.

• Compare models with regard to statistics such as the MSE (the estimate of the variance
of the wt), AIC, AICc, and SIC (also called BIC). Lower values of these statistics are
desirable.

Example

Consider the Lake Erie data (”[Link]”). The series is n = 40 consecutive annual mea-
surements of the level of Lake Erie in October.

Identifying the model


A time series plot of the data is the following:
There’s a possibility of some overall trend, but it might look that way just because there
seemed to be a big dip around the 15th time or so. We’ll go ahead without worrying about
trend.
The ACF and the PACF of the series are the following. (They start at lag 1).

The PACF shows a single spike at the first lag and the ACF shows a tapering pattern. An
AR(1) model is indicated.

Estimating the Model


Here’s part of the output to estimate the AR(1) model:
Coefficients :

ar1 xmean
Estimate 0.6909 14.6309
Std . E r r o r 0.1094 0.5840
sigma ˆ2 e s t i m a t e d as 1 . 4 4 7 : log l i k e l i h o o d = −64.47 ,
$AIC
[ 1 ] 3.373462
$AICc
[ 1 ] 3.38157
$BIC
[ 1 ] 3.500128
Where the coefficients are listed, notice the heading ”xmean.” This is giving the estimated
mean of the series based on this model, not the intercept. The model used in the software is
of the form

(xt − µ) = ϕ1 (xt−1 − µ) + wt

The estimated model can be written as (xt − 14.6309) = 0.6909(xt−1 − 14.6309) + wt .


The AR coefficient is statistically significant (z = 0.6909/0.1094 = 6.315). It’s not neces-
sary to test the mean coefficient. We know that it’s not 0.
The author’s routine also gives residual diagnostics in the form of several graphs. Here’s
that part of the output:

Interpretations of the Diagnostics


The time series plot of the standardized residuals mostly indicates that there’s no trend in
the residuals, no outliers, and in general, no changing variance across time.
The ACF of the residuals shows no significant autocorrelations – a good result.
The Q-Q plot is a normal probability plot. It doesn’t look too bad, so the assumption of
normally distributed residuals looks okay.
The bottom plot gives p-values for the Ljung-Box-Pierce statistics for each lag up to 20.
These statistics consider the accumulated residual autocorrelation from lag 1 up to and in-
cluding the lag on the horizontal axis. The dashed blue line is at .05. All p-values are above
it. That’s a good result. We want non-significant values for this statistic when looking at
residuals.
All in all, the fit looks good. There’s not much need to continue, but just to show you how
things looks when incorrect models are used, we will present another model.
Output for a Wrong Model
Suppose that we had misinterpreted the ACF and PACF of the data and had tried an MA(1)
model rather than the AR(1) model.

Coefficients :

ma1 xmean
Estimate 0.5570 14.5881
Std . E r r o r 0.1251 0.3337
sigma ˆ2 e s t i m a t e d as 1 . 8 7 0 : log l i k e l i h o o d = −69.46
$AIC
[ 1 ] 3.622905
$AICc
[ 1 ] 3.631013
$BIC
[ 1 ] 3.74957
The MA(1) coefficient is significant (you can check it), but mostly this looks worse than
the statistics for the right model. The estimate of the variance is 1.87, compared to 1.447 for
the AR(1) model. The AIC and BIC statistics are higher for the MA(1) than for the AR(1).
That’s not good.
The diagnostic graphs aren’t good for the MA(1). The ACF has a significant spike at lag
2 and several of the Ljung-Box-Pierce p-values are below 0.05. We don’t want them there. So,
the MA(1) isn’t a good model.
A Model with One Too Many Coefficients:

Suppose we try a model (still the Lake Erie Data) with one AR term and one MA term.
Here’s some of the output:

ar1 ma1 xmean


Estimate 0 . 7 3 6 2 −0.0909 14.6307
Std . E r r o r 0.1362 0.1969 0.6142
sigma ˆ2 e s t i m a t e d as 1 . 4 3 9 : log l i k e l i h o o d = −64.36 ,
$AIC
[ 1 ] 3.418224
$AICc
[ 1 ] 3.434891
$BIC
[ 1 ] 3.587112

Note : The MA(1) coefficient is not significant (z = -0.0909/.1969=-0.4617 is less than 1.96
in absolute value). The MA(1) term could be dropped so that takes us back to the AR(1).
Also, the estimate of the variance is barely better than the estimate for the AR(1) model and
the AIC and BIC statistics are higher for the ARMA(1,1) than for the AR(1).
R Code for Example
Here’s how we accomplished the work for the example in this lesson.
Use the command library(”astsa”). This makes the downloaded routines accessible.
The session for creating Example then proceeds as follows:
x e r i e = scan ( ” data1 . t x t ” ) #r e a d s t h e d a t a
x e r i e = t s ( x e r i e ) # makes s u r e x e r i e i s a time s e r i e s o b j e c t
plot ( x e r i e , type = ”b” ) # p l o t s x e r i e
a c f 2 ( x e r i e ) # a u t h o r s r o u t i n e f o r g r a p h i n g b o t h t h e ACF and t h e PACF
sa ri ma ( x e r i e , 1 , 0 , 0 ) # t h i s i s t h e AR( 1 ) model
sa ri ma ( x e r i e , 0 , 0 , 1 ) # t h i s i s t h e i n c o r r e c t MA( 1 ) model
sa ri ma ( x e r i e , 1 , 0 , 1 ) # t h i s i s t h e over −p a r a m e t e r i z e d ARMA( 1 , 1 ) model
we’ll discuss the use of ARIMA models for forecasting. Here’s how you would forecast for
the next 4 times past the end of the series using the author’s source code and the AR(1) model
for the Lake Erie data.
sa ri m a . f o r ( x e r i e , 4 , 1 , 0 , 0 ) # f o u r f o r e c a s t s from an AR( 1 ) model
You’ll get forecasts for the next four times, the standard errors for these forecasts, and a
graph of the time series along with the forecasts.
****************************************

You might also like