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 computationSun, 14 Dec 2008 03:57:38 -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/14/t12292524194hzed7w3tdfw8xv.htm/, Retrieved Wed, 15 May 2024 11:04:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33280, Retrieved Wed, 15 May 2024 11:04:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact199
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-14 10:57:38] [1fa440a634ec541bd583650ead0404df] [Current]
Feedback Forum

Post a new message
Dataseries X:
100
100
100
100,1
100
100
99,8
100
99,9
99,2
98,7
98,7
98,9
99,2
99,8
100,5
100,1
100,5
98,4
98,6
99
99,1
98,9
98,5
96,9
96,8
97
97
96,9
97,1
97,2
97,9
98,9
99,2
99,5
99,3
99,9
100
100,3
100,5
100,7
100,9
100,8
100,9
101
100,3
100,1
99,8
99,9
99,9
100,2
99,7
100,4
100,9
101,3
101,4
101,3
100,9
100,9
100,9
101,1
101,1
101,3
101,8
102,9
103,2
103,3
104,5
105
104,9
104,9
105,4
106
105,7
105,9
106,2
106,4
106,9
107,3
107,9
109,2
110,2
110,2
110,5
110,6
110,8
111,3
111,1
111,2
111,2
111,1
111,5
112,1
111,4




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33280&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33280&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33280&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 time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[82])
70104.9-------
71104.9-------
72105.4-------
73106-------
74105.7-------
75105.9-------
76106.2-------
77106.4-------
78106.9-------
79107.3-------
80107.9-------
81109.2-------
82110.2-------
83110.2110.4978109.5416111.4540.27080.729210.7292
84110.5110.6655109.1024112.22850.41780.720310.7203
85110.6110.7874108.7425112.83240.42870.608510.7133
86110.8110.7467108.3004113.19310.4830.546810.6693
87111.3110.7811107.9871113.57510.35790.49470.99970.6582
88111.1110.8299107.7261113.93380.43230.38330.99830.6546
89111.2110.8622107.4766114.24790.42250.44530.99510.6493
90111.2110.9426107.2968114.58850.4450.4450.98510.6551
91111.1111.0069107.1182114.89560.48130.46120.96910.6579
92111.5111.1033106.9861115.22060.42510.50060.93640.6664
93112.1111.3122106.9785115.6460.36080.46620.83030.6925
94111.4111.4729106.9329116.01280.48750.39330.70870.7087

\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[82]) \tabularnewline
70 & 104.9 & - & - & - & - & - & - & - \tabularnewline
71 & 104.9 & - & - & - & - & - & - & - \tabularnewline
72 & 105.4 & - & - & - & - & - & - & - \tabularnewline
73 & 106 & - & - & - & - & - & - & - \tabularnewline
74 & 105.7 & - & - & - & - & - & - & - \tabularnewline
75 & 105.9 & - & - & - & - & - & - & - \tabularnewline
76 & 106.2 & - & - & - & - & - & - & - \tabularnewline
77 & 106.4 & - & - & - & - & - & - & - \tabularnewline
78 & 106.9 & - & - & - & - & - & - & - \tabularnewline
79 & 107.3 & - & - & - & - & - & - & - \tabularnewline
80 & 107.9 & - & - & - & - & - & - & - \tabularnewline
81 & 109.2 & - & - & - & - & - & - & - \tabularnewline
82 & 110.2 & - & - & - & - & - & - & - \tabularnewline
83 & 110.2 & 110.4978 & 109.5416 & 111.454 & 0.2708 & 0.7292 & 1 & 0.7292 \tabularnewline
84 & 110.5 & 110.6655 & 109.1024 & 112.2285 & 0.4178 & 0.7203 & 1 & 0.7203 \tabularnewline
85 & 110.6 & 110.7874 & 108.7425 & 112.8324 & 0.4287 & 0.6085 & 1 & 0.7133 \tabularnewline
86 & 110.8 & 110.7467 & 108.3004 & 113.1931 & 0.483 & 0.5468 & 1 & 0.6693 \tabularnewline
87 & 111.3 & 110.7811 & 107.9871 & 113.5751 & 0.3579 & 0.4947 & 0.9997 & 0.6582 \tabularnewline
88 & 111.1 & 110.8299 & 107.7261 & 113.9338 & 0.4323 & 0.3833 & 0.9983 & 0.6546 \tabularnewline
89 & 111.2 & 110.8622 & 107.4766 & 114.2479 & 0.4225 & 0.4453 & 0.9951 & 0.6493 \tabularnewline
90 & 111.2 & 110.9426 & 107.2968 & 114.5885 & 0.445 & 0.445 & 0.9851 & 0.6551 \tabularnewline
91 & 111.1 & 111.0069 & 107.1182 & 114.8956 & 0.4813 & 0.4612 & 0.9691 & 0.6579 \tabularnewline
92 & 111.5 & 111.1033 & 106.9861 & 115.2206 & 0.4251 & 0.5006 & 0.9364 & 0.6664 \tabularnewline
93 & 112.1 & 111.3122 & 106.9785 & 115.646 & 0.3608 & 0.4662 & 0.8303 & 0.6925 \tabularnewline
94 & 111.4 & 111.4729 & 106.9329 & 116.0128 & 0.4875 & 0.3933 & 0.7087 & 0.7087 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33280&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[82])[/C][/ROW]
[ROW][C]70[/C][C]104.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]104.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]105.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]105.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]105.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]106.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]106.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]106.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]107.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]107.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]109.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]110.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]110.2[/C][C]110.4978[/C][C]109.5416[/C][C]111.454[/C][C]0.2708[/C][C]0.7292[/C][C]1[/C][C]0.7292[/C][/ROW]
[ROW][C]84[/C][C]110.5[/C][C]110.6655[/C][C]109.1024[/C][C]112.2285[/C][C]0.4178[/C][C]0.7203[/C][C]1[/C][C]0.7203[/C][/ROW]
[ROW][C]85[/C][C]110.6[/C][C]110.7874[/C][C]108.7425[/C][C]112.8324[/C][C]0.4287[/C][C]0.6085[/C][C]1[/C][C]0.7133[/C][/ROW]
[ROW][C]86[/C][C]110.8[/C][C]110.7467[/C][C]108.3004[/C][C]113.1931[/C][C]0.483[/C][C]0.5468[/C][C]1[/C][C]0.6693[/C][/ROW]
[ROW][C]87[/C][C]111.3[/C][C]110.7811[/C][C]107.9871[/C][C]113.5751[/C][C]0.3579[/C][C]0.4947[/C][C]0.9997[/C][C]0.6582[/C][/ROW]
[ROW][C]88[/C][C]111.1[/C][C]110.8299[/C][C]107.7261[/C][C]113.9338[/C][C]0.4323[/C][C]0.3833[/C][C]0.9983[/C][C]0.6546[/C][/ROW]
[ROW][C]89[/C][C]111.2[/C][C]110.8622[/C][C]107.4766[/C][C]114.2479[/C][C]0.4225[/C][C]0.4453[/C][C]0.9951[/C][C]0.6493[/C][/ROW]
[ROW][C]90[/C][C]111.2[/C][C]110.9426[/C][C]107.2968[/C][C]114.5885[/C][C]0.445[/C][C]0.445[/C][C]0.9851[/C][C]0.6551[/C][/ROW]
[ROW][C]91[/C][C]111.1[/C][C]111.0069[/C][C]107.1182[/C][C]114.8956[/C][C]0.4813[/C][C]0.4612[/C][C]0.9691[/C][C]0.6579[/C][/ROW]
[ROW][C]92[/C][C]111.5[/C][C]111.1033[/C][C]106.9861[/C][C]115.2206[/C][C]0.4251[/C][C]0.5006[/C][C]0.9364[/C][C]0.6664[/C][/ROW]
[ROW][C]93[/C][C]112.1[/C][C]111.3122[/C][C]106.9785[/C][C]115.646[/C][C]0.3608[/C][C]0.4662[/C][C]0.8303[/C][C]0.6925[/C][/ROW]
[ROW][C]94[/C][C]111.4[/C][C]111.4729[/C][C]106.9329[/C][C]116.0128[/C][C]0.4875[/C][C]0.3933[/C][C]0.7087[/C][C]0.7087[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33280&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33280&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[82])
70104.9-------
71104.9-------
72105.4-------
73106-------
74105.7-------
75105.9-------
76106.2-------
77106.4-------
78106.9-------
79107.3-------
80107.9-------
81109.2-------
82110.2-------
83110.2110.4978109.5416111.4540.27080.729210.7292
84110.5110.6655109.1024112.22850.41780.720310.7203
85110.6110.7874108.7425112.83240.42870.608510.7133
86110.8110.7467108.3004113.19310.4830.546810.6693
87111.3110.7811107.9871113.57510.35790.49470.99970.6582
88111.1110.8299107.7261113.93380.43230.38330.99830.6546
89111.2110.8622107.4766114.24790.42250.44530.99510.6493
90111.2110.9426107.2968114.58850.4450.4450.98510.6551
91111.1111.0069107.1182114.89560.48130.46120.96910.6579
92111.5111.1033106.9861115.22060.42510.50060.93640.6664
93112.1111.3122106.9785115.6460.36080.46620.83030.6925
94111.4111.4729106.9329116.01280.48750.39330.70870.7087







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
830.0044-0.00272e-040.08870.00740.086
840.0072-0.00151e-040.02740.00230.0478
850.0094-0.00171e-040.03510.00290.0541
860.01135e-0400.00282e-040.0154
870.01290.00474e-040.26930.02240.1498
880.01430.00242e-040.07290.00610.078
890.01560.0033e-040.11410.00950.0975
900.01680.00232e-040.06620.00550.0743
910.01798e-041e-040.00877e-040.0269
920.01890.00363e-040.15730.01310.1145
930.01990.00716e-040.62060.05170.2274
940.0208-7e-041e-040.00534e-040.021

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
83 & 0.0044 & -0.0027 & 2e-04 & 0.0887 & 0.0074 & 0.086 \tabularnewline
84 & 0.0072 & -0.0015 & 1e-04 & 0.0274 & 0.0023 & 0.0478 \tabularnewline
85 & 0.0094 & -0.0017 & 1e-04 & 0.0351 & 0.0029 & 0.0541 \tabularnewline
86 & 0.0113 & 5e-04 & 0 & 0.0028 & 2e-04 & 0.0154 \tabularnewline
87 & 0.0129 & 0.0047 & 4e-04 & 0.2693 & 0.0224 & 0.1498 \tabularnewline
88 & 0.0143 & 0.0024 & 2e-04 & 0.0729 & 0.0061 & 0.078 \tabularnewline
89 & 0.0156 & 0.003 & 3e-04 & 0.1141 & 0.0095 & 0.0975 \tabularnewline
90 & 0.0168 & 0.0023 & 2e-04 & 0.0662 & 0.0055 & 0.0743 \tabularnewline
91 & 0.0179 & 8e-04 & 1e-04 & 0.0087 & 7e-04 & 0.0269 \tabularnewline
92 & 0.0189 & 0.0036 & 3e-04 & 0.1573 & 0.0131 & 0.1145 \tabularnewline
93 & 0.0199 & 0.0071 & 6e-04 & 0.6206 & 0.0517 & 0.2274 \tabularnewline
94 & 0.0208 & -7e-04 & 1e-04 & 0.0053 & 4e-04 & 0.021 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33280&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]83[/C][C]0.0044[/C][C]-0.0027[/C][C]2e-04[/C][C]0.0887[/C][C]0.0074[/C][C]0.086[/C][/ROW]
[ROW][C]84[/C][C]0.0072[/C][C]-0.0015[/C][C]1e-04[/C][C]0.0274[/C][C]0.0023[/C][C]0.0478[/C][/ROW]
[ROW][C]85[/C][C]0.0094[/C][C]-0.0017[/C][C]1e-04[/C][C]0.0351[/C][C]0.0029[/C][C]0.0541[/C][/ROW]
[ROW][C]86[/C][C]0.0113[/C][C]5e-04[/C][C]0[/C][C]0.0028[/C][C]2e-04[/C][C]0.0154[/C][/ROW]
[ROW][C]87[/C][C]0.0129[/C][C]0.0047[/C][C]4e-04[/C][C]0.2693[/C][C]0.0224[/C][C]0.1498[/C][/ROW]
[ROW][C]88[/C][C]0.0143[/C][C]0.0024[/C][C]2e-04[/C][C]0.0729[/C][C]0.0061[/C][C]0.078[/C][/ROW]
[ROW][C]89[/C][C]0.0156[/C][C]0.003[/C][C]3e-04[/C][C]0.1141[/C][C]0.0095[/C][C]0.0975[/C][/ROW]
[ROW][C]90[/C][C]0.0168[/C][C]0.0023[/C][C]2e-04[/C][C]0.0662[/C][C]0.0055[/C][C]0.0743[/C][/ROW]
[ROW][C]91[/C][C]0.0179[/C][C]8e-04[/C][C]1e-04[/C][C]0.0087[/C][C]7e-04[/C][C]0.0269[/C][/ROW]
[ROW][C]92[/C][C]0.0189[/C][C]0.0036[/C][C]3e-04[/C][C]0.1573[/C][C]0.0131[/C][C]0.1145[/C][/ROW]
[ROW][C]93[/C][C]0.0199[/C][C]0.0071[/C][C]6e-04[/C][C]0.6206[/C][C]0.0517[/C][C]0.2274[/C][/ROW]
[ROW][C]94[/C][C]0.0208[/C][C]-7e-04[/C][C]1e-04[/C][C]0.0053[/C][C]4e-04[/C][C]0.021[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33280&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33280&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
830.0044-0.00272e-040.08870.00740.086
840.0072-0.00151e-040.02740.00230.0478
850.0094-0.00171e-040.03510.00290.0541
860.01135e-0400.00282e-040.0154
870.01290.00474e-040.26930.02240.1498
880.01430.00242e-040.07290.00610.078
890.01560.0033e-040.11410.00950.0975
900.01680.00232e-040.06620.00550.0743
910.01798e-041e-040.00877e-040.0269
920.01890.00363e-040.15730.01310.1145
930.01990.00716e-040.62060.05170.2274
940.0208-7e-041e-040.00534e-040.021



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ;
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')