Example 3.1: Nile Data
This example is discussed in de Jong and Penzer (1998). The data consist of readings of the annual
flow volume of the Nile River at Aswan from 1871 to 1970. These data have also been studied by
Cobb (1978). These studies indicate that levels in the years 1877 and 1913, that is, the 7th and 43rd
measurements, are strong candidates for additive outliers, and that there was a shift in the flow levels
starting from the year 1899.
The year 1899 corresponds to the 29th observation. This shift in 1899 is attributed partly to the weather
changes and partly to the start of construction work for a new dam at Aswan.
data nile;
input level @@;
datalines;
1120 1160 963 1210 1160 1160 813 1230 1370 1140
995 935 1110 994 1020 960 1180 799 958 1140
1100 1210 1150 1250 1260 1220 1030 1100 774 840
874 694 940 833 701 916 692 1020 1050 969
831 726 456 824 702 1120 1100 832 764 821
768 845 864 862 698 845 744 796 1040 759
781 865 845 944 984 897 822 1010 771 676
649 846 812 742 801 1040 860 874 848 890
744 749 838 1050 918 986 797 923 975 815
1020 906 901 1170 912 746 919 718 714 740
;
You can start the modeling process with the ARIMA(0, 1, 1) model, an ARIMA model close to the
Structural model suggested in de Jong and Penzer (1998), and
examine the parameter estimates, the residual autocorrelations, and the outliers.
proc arima data=nile;
identify var=level(1) noprint;
estimate q=1 noint method=ml plot;
outlier maxnum=5;
run;
A portion of the estimation and the outlier detection output is shown in Output 3.1.1.
Output 3.1.1: Output from Fitting ARIMA(0, 1, 1) Model
|
| Maximum Likelihood Estimation |
| Parameter |
Estimate |
Standard Error |
t Value |
Approx Pr > |t| |
Lag |
| MA1,1 |
0.73271 |
0.07132 |
10.27 |
<.0001 |
1 |
| Variance Estimate |
20810.22 |
| Std Error Estimate |
144.2575 |
| AIC |
1267.091 |
| SBC |
1269.686 |
| Number of Residuals |
99 |
| Model for variable level |
| Period(s) of Differencing |
1 |
| No mean term in this model. |
| Outlier Summary |
| Maximum number searched |
5 |
| Number found |
5 |
| Significance used |
0.05 |
| Outlier Table |
| Obs |
Type |
Estimate |
Chi-Square |
Approx Prob>ChiSq |
| 29 |
Shift |
-315.75346 |
13.13 |
0.0003 |
| 43 |
Additive |
-403.97105 |
11.83 |
0.0006 |
| 7 |
Additive |
-335.49351 |
7.69 |
0.0055 |
| 94 |
Additive |
305.03568 |
6.16 |
0.0131 |
| 18 |
Additive |
-287.81484 |
6.00 |
0.0143 |
|
Note that the first three outliers detected are indeed the ones discussed earlier.
You can include the shock signatures corresponding to these three outliers in the Nile data set.
data nile;
set nile;
if _n_ = 7 then AO7 = 1.0;
else AO7 = 0.0;
if _n_ = 43 then AO43 = 1.0;
else AO43 = 0.0;
if _n_ >= 29 then LS29 = 1.0;
else LS29 = 0.0;
run;
Now you can refine the earlier model by including these outliers. After examining the
parameter estimates and residuals (not shown) of the ARIMA(0, 1, 1) model with these regressors,
the following stationary MA1 model (with regressors) appears to fit the data well.
proc arima data=nile;
identify var=level crosscorr=( AO7 AO43 LS29 ) noprint;
estimate q=1 noint
input=(AO7 AO43 LS29) method=ml plot;
outlier maxnum=5 alpha=0.01;
run;
The relevant estimation output is shown in Output 3.1.2. No outliers, at significance
level 0.01, were detected.
Output 3.1.2: MA1 Model with Outliers
|
| Maximum Likelihood Estimation |
| Parameter |
Estimate |
Standard Error |
t Value |
Approx Pr > |t| |
Lag |
Variable |
Shift |
| MU |
1109.9 |
26.65625 |
41.64 |
<.0001 |
0 |
level |
0 |
| MA1,1 |
-0.19584 |
0.10148 |
-1.93 |
0.0536 |
1 |
level |
0 |
| NUM1 |
-319.63689 |
116.50628 |
-2.74 |
0.0061 |
0 |
AO7 |
0 |
| NUM2 |
-376.48708 |
116.11662 |
-3.24 |
0.0012 |
0 |
AO43 |
0 |
| NUM3 |
-255.20007 |
31.32609 |
-8.15 |
<.0001 |
0 |
LS29 |
0 |
| Constant Estimate |
1109.861 |
| Variance Estimate |
13761.25 |
| Std Error Estimate |
117.3083 |
| AIC |
1241.659 |
| SBC |
1254.685 |
| Number of Residuals |
100 |
| Autocorrelation Check of Residuals |
| To Lag |
Chi-Square |
DF |
Pr > ChiSq |
Autocorrelations |
| 6 |
3.43 |
5 |
0.6334 |
-0.000 |
0.007 |
0.074 |
-0.100 |
-0.068 |
-0.109 |
| 12 |
9.73 |
11 |
0.5552 |
-0.070 |
0.100 |
-0.107 |
-0.123 |
-0.083 |
-0.087 |
| 18 |
14.36 |
17 |
0.6417 |
0.079 |
-0.071 |
-0.025 |
0.132 |
-0.007 |
0.094 |
| 24 |
17.22 |
23 |
0.7983 |
0.008 |
-0.058 |
0.055 |
-0.049 |
-0.073 |
-0.087 |
| Outlier Summary |
| Maximum number searched |
5 |
| Number found |
0 |
| Significance used |
0.01 |
|
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.