Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 22 Dec 2008 11:39:54 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/22/t1229971246uker054jpj36vis.htm/, Retrieved Sun, 12 May 2024 21:54:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36164, Retrieved Sun, 12 May 2024 21:54:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact154
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [ARIMA Backward Se...] [2008-12-18 18:50:42] [b47fceb71c9525e79a89b5fc6d023d0e]
- RMP   [ARIMA Forecasting] [Paper Arima forec...] [2008-12-21 19:09:06] [491a70d26f8c977398d8a0c1c87d3dd4]
-           [ARIMA Forecasting] [ARIMA Forecasting] [2008-12-22 18:39:54] [541f63fa3157af9df10fc4d202b2a90b] [Current]
Feedback Forum

Post a new message
Dataseries X:
91.2
99.2
108.2
101.5
106.9
104.4
77.9
60
99.5
95
105.6
102.5
93.3
97.3
127
111.7
96.4
133
72.2
95.8
124.1
127.6
110.7
104.6
112.7
115.3
139.4
119
97.4
154
81.5
88.8
127.7
105.1
114.9
106.4
104.5
121.6
141.4
99
126.7
134.1
81.3
88.6
132.7
132.9
134.4
103.7
119.7
115
132.9
108.5
113.9
142
97.7
92.2
128.8
134.9
128.2
114.8




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36164&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36164&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36164&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132







Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[48])
36106.4-------
37104.5-------
38121.6-------
39141.4-------
4099-------
41126.7-------
42134.1-------
4381.3-------
4488.6-------
45132.7-------
46132.9-------
47134.4-------
48103.7-------
49119.7115.588993.0028138.17490.36060.84890.8320.8489
50115121.806199.0713144.54090.27870.5720.50710.9407
51132.9147.5059124.6246170.38730.10540.99730.69950.9999
52108.5124.7752101.7494147.80110.0830.24460.98590.9636
53113.9116.307393.1391139.47560.41930.74550.18960.8569
54142153.442130.1334176.75060.1680.99960.94811
5597.790.344766.8977113.79180.269300.77520.1321
5692.2105.024181.4406128.60770.14330.72860.91390.5438
57128.8140.1257116.4075163.84380.174710.73030.9987
58134.9134.1437110.2927157.99460.47520.66970.54070.9938
59128.2129.9802105.9983153.96220.44220.34380.3590.9841
60114.8117.878393.7671141.98950.40120.20070.87550.8755

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast \tabularnewline
time & Y[t] & F[t] & 95% LB & 95% UB & p-value(H0: Y[t] = F[t]) & P(F[t]>Y[t-1]) & P(F[t]>Y[t-s]) & P(F[t]>Y[48]) \tabularnewline
36 & 106.4 & - & - & - & - & - & - & - \tabularnewline
37 & 104.5 & - & - & - & - & - & - & - \tabularnewline
38 & 121.6 & - & - & - & - & - & - & - \tabularnewline
39 & 141.4 & - & - & - & - & - & - & - \tabularnewline
40 & 99 & - & - & - & - & - & - & - \tabularnewline
41 & 126.7 & - & - & - & - & - & - & - \tabularnewline
42 & 134.1 & - & - & - & - & - & - & - \tabularnewline
43 & 81.3 & - & - & - & - & - & - & - \tabularnewline
44 & 88.6 & - & - & - & - & - & - & - \tabularnewline
45 & 132.7 & - & - & - & - & - & - & - \tabularnewline
46 & 132.9 & - & - & - & - & - & - & - \tabularnewline
47 & 134.4 & - & - & - & - & - & - & - \tabularnewline
48 & 103.7 & - & - & - & - & - & - & - \tabularnewline
49 & 119.7 & 115.5889 & 93.0028 & 138.1749 & 0.3606 & 0.8489 & 0.832 & 0.8489 \tabularnewline
50 & 115 & 121.8061 & 99.0713 & 144.5409 & 0.2787 & 0.572 & 0.5071 & 0.9407 \tabularnewline
51 & 132.9 & 147.5059 & 124.6246 & 170.3873 & 0.1054 & 0.9973 & 0.6995 & 0.9999 \tabularnewline
52 & 108.5 & 124.7752 & 101.7494 & 147.8011 & 0.083 & 0.2446 & 0.9859 & 0.9636 \tabularnewline
53 & 113.9 & 116.3073 & 93.1391 & 139.4756 & 0.4193 & 0.7455 & 0.1896 & 0.8569 \tabularnewline
54 & 142 & 153.442 & 130.1334 & 176.7506 & 0.168 & 0.9996 & 0.9481 & 1 \tabularnewline
55 & 97.7 & 90.3447 & 66.8977 & 113.7918 & 0.2693 & 0 & 0.7752 & 0.1321 \tabularnewline
56 & 92.2 & 105.0241 & 81.4406 & 128.6077 & 0.1433 & 0.7286 & 0.9139 & 0.5438 \tabularnewline
57 & 128.8 & 140.1257 & 116.4075 & 163.8438 & 0.1747 & 1 & 0.7303 & 0.9987 \tabularnewline
58 & 134.9 & 134.1437 & 110.2927 & 157.9946 & 0.4752 & 0.6697 & 0.5407 & 0.9938 \tabularnewline
59 & 128.2 & 129.9802 & 105.9983 & 153.9622 & 0.4422 & 0.3438 & 0.359 & 0.9841 \tabularnewline
60 & 114.8 & 117.8783 & 93.7671 & 141.9895 & 0.4012 & 0.2007 & 0.8755 & 0.8755 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36164&T=1

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast[/C][/ROW]
[ROW][C]time[/C][C]Y[t][/C][C]F[t][/C][C]95% LB[/C][C]95% UB[/C][C]p-value(H0: Y[t] = F[t])[/C][C]P(F[t]>Y[t-1])[/C][C]P(F[t]>Y[t-s])[/C][C]P(F[t]>Y[48])[/C][/ROW]
[ROW][C]36[/C][C]106.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]104.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]121.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]141.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]126.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]134.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]81.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]88.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]132.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]132.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]134.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]103.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]119.7[/C][C]115.5889[/C][C]93.0028[/C][C]138.1749[/C][C]0.3606[/C][C]0.8489[/C][C]0.832[/C][C]0.8489[/C][/ROW]
[ROW][C]50[/C][C]115[/C][C]121.8061[/C][C]99.0713[/C][C]144.5409[/C][C]0.2787[/C][C]0.572[/C][C]0.5071[/C][C]0.9407[/C][/ROW]
[ROW][C]51[/C][C]132.9[/C][C]147.5059[/C][C]124.6246[/C][C]170.3873[/C][C]0.1054[/C][C]0.9973[/C][C]0.6995[/C][C]0.9999[/C][/ROW]
[ROW][C]52[/C][C]108.5[/C][C]124.7752[/C][C]101.7494[/C][C]147.8011[/C][C]0.083[/C][C]0.2446[/C][C]0.9859[/C][C]0.9636[/C][/ROW]
[ROW][C]53[/C][C]113.9[/C][C]116.3073[/C][C]93.1391[/C][C]139.4756[/C][C]0.4193[/C][C]0.7455[/C][C]0.1896[/C][C]0.8569[/C][/ROW]
[ROW][C]54[/C][C]142[/C][C]153.442[/C][C]130.1334[/C][C]176.7506[/C][C]0.168[/C][C]0.9996[/C][C]0.9481[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]97.7[/C][C]90.3447[/C][C]66.8977[/C][C]113.7918[/C][C]0.2693[/C][C]0[/C][C]0.7752[/C][C]0.1321[/C][/ROW]
[ROW][C]56[/C][C]92.2[/C][C]105.0241[/C][C]81.4406[/C][C]128.6077[/C][C]0.1433[/C][C]0.7286[/C][C]0.9139[/C][C]0.5438[/C][/ROW]
[ROW][C]57[/C][C]128.8[/C][C]140.1257[/C][C]116.4075[/C][C]163.8438[/C][C]0.1747[/C][C]1[/C][C]0.7303[/C][C]0.9987[/C][/ROW]
[ROW][C]58[/C][C]134.9[/C][C]134.1437[/C][C]110.2927[/C][C]157.9946[/C][C]0.4752[/C][C]0.6697[/C][C]0.5407[/C][C]0.9938[/C][/ROW]
[ROW][C]59[/C][C]128.2[/C][C]129.9802[/C][C]105.9983[/C][C]153.9622[/C][C]0.4422[/C][C]0.3438[/C][C]0.359[/C][C]0.9841[/C][/ROW]
[ROW][C]60[/C][C]114.8[/C][C]117.8783[/C][C]93.7671[/C][C]141.9895[/C][C]0.4012[/C][C]0.2007[/C][C]0.8755[/C][C]0.8755[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36164&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36164&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[48])
36106.4-------
37104.5-------
38121.6-------
39141.4-------
4099-------
41126.7-------
42134.1-------
4381.3-------
4488.6-------
45132.7-------
46132.9-------
47134.4-------
48103.7-------
49119.7115.588993.0028138.17490.36060.84890.8320.8489
50115121.806199.0713144.54090.27870.5720.50710.9407
51132.9147.5059124.6246170.38730.10540.99730.69950.9999
52108.5124.7752101.7494147.80110.0830.24460.98590.9636
53113.9116.307393.1391139.47560.41930.74550.18960.8569
54142153.442130.1334176.75060.1680.99960.94811
5597.790.344766.8977113.79180.269300.77520.1321
5692.2105.024181.4406128.60770.14330.72860.91390.5438
57128.8140.1257116.4075163.84380.174710.73030.9987
58134.9134.1437110.2927157.99460.47520.66970.54070.9938
59128.2129.9802105.9983153.96220.44220.34380.3590.9841
60114.8117.878393.7671141.98950.40120.20070.87550.8755







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.09970.03560.00316.90151.40851.1868
500.0952-0.05590.004746.32333.86031.9648
510.0791-0.0990.0083213.332817.77774.2164
520.0942-0.13040.0109264.883622.07364.6983
530.1016-0.02070.00175.79530.48290.6949
540.0775-0.07460.0062130.918710.90993.303
550.13240.08140.006854.10014.50832.1233
560.1146-0.12210.0102164.458213.70483.702
570.0864-0.08080.0067128.270410.68923.2694
580.09070.00565e-040.5720.04770.2183
590.0941-0.01370.00113.16930.26410.5139
600.1044-0.02610.00229.47590.78970.8886

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0997 & 0.0356 & 0.003 & 16.9015 & 1.4085 & 1.1868 \tabularnewline
50 & 0.0952 & -0.0559 & 0.0047 & 46.3233 & 3.8603 & 1.9648 \tabularnewline
51 & 0.0791 & -0.099 & 0.0083 & 213.3328 & 17.7777 & 4.2164 \tabularnewline
52 & 0.0942 & -0.1304 & 0.0109 & 264.8836 & 22.0736 & 4.6983 \tabularnewline
53 & 0.1016 & -0.0207 & 0.0017 & 5.7953 & 0.4829 & 0.6949 \tabularnewline
54 & 0.0775 & -0.0746 & 0.0062 & 130.9187 & 10.9099 & 3.303 \tabularnewline
55 & 0.1324 & 0.0814 & 0.0068 & 54.1001 & 4.5083 & 2.1233 \tabularnewline
56 & 0.1146 & -0.1221 & 0.0102 & 164.4582 & 13.7048 & 3.702 \tabularnewline
57 & 0.0864 & -0.0808 & 0.0067 & 128.2704 & 10.6892 & 3.2694 \tabularnewline
58 & 0.0907 & 0.0056 & 5e-04 & 0.572 & 0.0477 & 0.2183 \tabularnewline
59 & 0.0941 & -0.0137 & 0.0011 & 3.1693 & 0.2641 & 0.5139 \tabularnewline
60 & 0.1044 & -0.0261 & 0.0022 & 9.4759 & 0.7897 & 0.8886 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36164&T=2

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast Performance[/C][/ROW]
[ROW][C]time[/C][C]% S.E.[/C][C]PE[/C][C]MAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]49[/C][C]0.0997[/C][C]0.0356[/C][C]0.003[/C][C]16.9015[/C][C]1.4085[/C][C]1.1868[/C][/ROW]
[ROW][C]50[/C][C]0.0952[/C][C]-0.0559[/C][C]0.0047[/C][C]46.3233[/C][C]3.8603[/C][C]1.9648[/C][/ROW]
[ROW][C]51[/C][C]0.0791[/C][C]-0.099[/C][C]0.0083[/C][C]213.3328[/C][C]17.7777[/C][C]4.2164[/C][/ROW]
[ROW][C]52[/C][C]0.0942[/C][C]-0.1304[/C][C]0.0109[/C][C]264.8836[/C][C]22.0736[/C][C]4.6983[/C][/ROW]
[ROW][C]53[/C][C]0.1016[/C][C]-0.0207[/C][C]0.0017[/C][C]5.7953[/C][C]0.4829[/C][C]0.6949[/C][/ROW]
[ROW][C]54[/C][C]0.0775[/C][C]-0.0746[/C][C]0.0062[/C][C]130.9187[/C][C]10.9099[/C][C]3.303[/C][/ROW]
[ROW][C]55[/C][C]0.1324[/C][C]0.0814[/C][C]0.0068[/C][C]54.1001[/C][C]4.5083[/C][C]2.1233[/C][/ROW]
[ROW][C]56[/C][C]0.1146[/C][C]-0.1221[/C][C]0.0102[/C][C]164.4582[/C][C]13.7048[/C][C]3.702[/C][/ROW]
[ROW][C]57[/C][C]0.0864[/C][C]-0.0808[/C][C]0.0067[/C][C]128.2704[/C][C]10.6892[/C][C]3.2694[/C][/ROW]
[ROW][C]58[/C][C]0.0907[/C][C]0.0056[/C][C]5e-04[/C][C]0.572[/C][C]0.0477[/C][C]0.2183[/C][/ROW]
[ROW][C]59[/C][C]0.0941[/C][C]-0.0137[/C][C]0.0011[/C][C]3.1693[/C][C]0.2641[/C][C]0.5139[/C][/ROW]
[ROW][C]60[/C][C]0.1044[/C][C]-0.0261[/C][C]0.0022[/C][C]9.4759[/C][C]0.7897[/C][C]0.8886[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36164&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36164&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.09970.03560.00316.90151.40851.1868
500.0952-0.05590.004746.32333.86031.9648
510.0791-0.0990.0083213.332817.77774.2164
520.0942-0.13040.0109264.883622.07364.6983
530.1016-0.02070.00175.79530.48290.6949
540.0775-0.07460.0062130.918710.90993.303
550.13240.08140.006854.10014.50832.1233
560.1146-0.12210.0102164.458213.70483.702
570.0864-0.08080.0067128.270410.68923.2694
580.09070.00565e-040.5720.04770.2183
590.0941-0.01370.00113.16930.26410.5139
600.1044-0.02610.00229.47590.78970.8886



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 2 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 2 ; par9 = 0 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
R code (references can be found in the software module):
par1 <- as.numeric(par1) #cut off periods
par2 <- as.numeric(par2) #lambda
par3 <- as.numeric(par3) #degree of non-seasonal differencing
par4 <- as.numeric(par4) #degree of seasonal differencing
par5 <- as.numeric(par5) #seasonal period
par6 <- as.numeric(par6) #p
par7 <- as.numeric(par7) #q
par8 <- as.numeric(par8) #P
par9 <- as.numeric(par9) #Q
if (par10 == 'TRUE') par10 <- TRUE
if (par10 == 'FALSE') par10 <- FALSE
if (par2 == 0) x <- log(x)
if (par2 != 0) x <- x^par2
lx <- length(x)
first <- lx - 2*par1
nx <- lx - par1
nx1 <- nx + 1
fx <- lx - nx
if (fx < 1) {
fx <- par5
nx1 <- lx + fx - 1
first <- lx - 2*fx
}
first <- 1
if (fx < 3) fx <- round(lx/10,0)
(arima.out <- arima(x[1:nx], order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5), include.mean=par10, method='ML'))
(forecast <- predict(arima.out,fx))
(lb <- forecast$pred - 1.96 * forecast$se)
(ub <- forecast$pred + 1.96 * forecast$se)
if (par2 == 0) {
x <- exp(x)
forecast$pred <- exp(forecast$pred)
lb <- exp(lb)
ub <- exp(ub)
}
if (par2 != 0) {
x <- x^(1/par2)
forecast$pred <- forecast$pred^(1/par2)
lb <- lb^(1/par2)
ub <- ub^(1/par2)
}
if (par2 < 0) {
olb <- lb
lb <- ub
ub <- olb
}
(actandfor <- c(x[1:nx], forecast$pred))
(perc.se <- (ub-forecast$pred)/1.96/forecast$pred)
bitmap(file='test1.png')
opar <- par(mar=c(4,4,2,2),las=1)
ylim <- c( min(x[first:nx],lb), max(x[first:nx],ub))
plot(x,ylim=ylim,type='n',xlim=c(first,lx))
usr <- par('usr')
rect(usr[1],usr[3],nx+1,usr[4],border=NA,col='lemonchiffon')
rect(nx1,usr[3],usr[2],usr[4],border=NA,col='lavender')
abline(h= (-3:3)*2 , col ='gray', lty =3)
polygon( c(nx1:lx,lx:nx1), c(lb,rev(ub)), col = 'orange', lty=2,border=NA)
lines(nx1:lx, lb , lty=2)
lines(nx1:lx, ub , lty=2)
lines(x, lwd=2)
lines(nx1:lx, forecast$pred , lwd=2 , col ='white')
box()
par(opar)
dev.off()
prob.dec <- array(NA, dim=fx)
prob.sdec <- array(NA, dim=fx)
prob.ldec <- array(NA, dim=fx)
prob.pval <- array(NA, dim=fx)
perf.pe <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.rmse <- array(0, dim=fx)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / forecast$pred[i]
perf.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
prob.dec[i] = pnorm((x[nx+i-1] - forecast$pred[i]) / locSD)
prob.sdec[i] = pnorm((x[nx+i-par5] - forecast$pred[i]) / locSD)
prob.ldec[i] = pnorm((x[nx] - forecast$pred[i]) / locSD)
prob.pval[i] = pnorm(abs(x[nx+i] - forecast$pred[i]) / locSD)
}
perf.mape = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
bitmap(file='test2.png')
plot(forecast$pred, pch=19, type='b',main='ARIMA Extrapolation Forecast', ylab='Forecast and 95% CI', xlab='time',ylim=c(min(lb),max(ub)))
dum <- forecast$pred
dum[1:12] <- x[(nx+1):lx]
lines(dum, lty=1)
lines(ub,lty=3)
lines(lb,lty=3)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast',9,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'Y[t]',1,header=TRUE)
a<-table.element(a,'F[t]',1,header=TRUE)
a<-table.element(a,'95% LB',1,header=TRUE)
a<-table.element(a,'95% UB',1,header=TRUE)
a<-table.element(a,'p-value
(H0: Y[t] = F[t])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-1])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-s])',1,header=TRUE)
mylab <- paste('P(F[t]>Y[',nx,sep='')
mylab <- paste(mylab,'])',sep='')
a<-table.element(a,mylab,1,header=TRUE)
a<-table.row.end(a)
for (i in (nx-par5):nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.row.end(a)
}
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(x[nx+i],4))
a<-table.element(a,round(forecast$pred[i],4))
a<-table.element(a,round(lb[i],4))
a<-table.element(a,round(ub[i],4))
a<-table.element(a,round((1-prob.pval[i]),4))
a<-table.element(a,round((1-prob.dec[i]),4))
a<-table.element(a,round((1-prob.sdec[i]),4))
a<-table.element(a,round((1-prob.ldec[i]),4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast Performance',7,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'% S.E.',1,header=TRUE)
a<-table.element(a,'PE',1,header=TRUE)
a<-table.element(a,'MAPE',1,header=TRUE)
a<-table.element(a,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',1,header=TRUE)
a<-table.row.end(a)
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(perc.se[i],4))
a<-table.element(a,round(perf.pe[i],4))
a<-table.element(a,round(perf.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')