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 computationSat, 12 Dec 2009 02:45:03 -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/2009/Dec/12/t12606111437nflhs6bff082d6.htm/, Retrieved Mon, 29 Apr 2024 10:01:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66855, Retrieved Mon, 29 Apr 2024 10:01:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact188
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD  [ARIMA Forecasting] [ws 10 deel 2 prblm] [2009-12-09 19:29:01] [134dc66689e3d457a82860db6471d419]
-   P       [ARIMA Forecasting] [ws 10 deel 2 arim...] [2009-12-12 09:45:03] [4f297b039e1043ebee7ff7a83b1eaaaa] [Current]
-    D        [ARIMA Forecasting] [WS 10 ] [2009-12-12 11:53:20] [3425351e86519d261a643e224a0c8ee1]
-   PD          [ARIMA Forecasting] [] [2009-12-19 16:24:22] [3425351e86519d261a643e224a0c8ee1]
-   P             [ARIMA Forecasting] [] [2009-12-20 10:24:37] [3425351e86519d261a643e224a0c8ee1]
-   PD              [ARIMA Forecasting] [ARIMA forecasting] [2009-12-21 15:59:35] [76ab39dc7a55316678260825bd5ad46c]
-   PD        [ARIMA Forecasting] [Forecasting] [2009-12-14 15:18:19] [24c4941ee50deadff4640c9c09cc70cb]
-   P         [ARIMA Forecasting] [Paper ARIMA F IGP] [2009-12-14 21:07:10] [134dc66689e3d457a82860db6471d419]
-   PD          [ARIMA Forecasting] [Paper ARIMA F ICP] [2009-12-15 20:21:11] [134dc66689e3d457a82860db6471d419]
-   P           [ARIMA Forecasting] [Paper ARIMA F IGP 12] [2009-12-15 20:24:19] [134dc66689e3d457a82860db6471d419]
- R PD            [ARIMA Forecasting] [Paper arima forec...] [2009-12-23 22:37:42] [62d3ced7fb1c10c35a82e9cb1d0d0e2b]
- R PD            [ARIMA Forecasting] [Paper arima forec...] [2009-12-23 23:25:41] [62d3ced7fb1c10c35a82e9cb1d0d0e2b]
-   P         [ARIMA Forecasting] [workshop 10] [2009-12-18 17:50:14] [28d531aeb5ea2ff1b676cbab66947a19]
Feedback Forum

Post a new message
Dataseries X:
100.01
103.84
104.48
95.43
104.80
108.64
105.65
108.42
115.35
113.64
115.24
100.33
101.29
104.48
99.26
100.11
103.52
101.18
96.39
97.56
96.39
85.10
79.77
79.13
80.84
82.75
92.55
96.60
96.92
95.32
98.52
100.22
104.91
103.10
97.13
103.42
111.72
118.11
111.62
100.22
102.03
105.76
107.68
110.77
105.44
112.26
114.07
117.90
124.72
126.42
134.73
135.79
143.36
140.37
144.74
151.98
150.92
163.38
154.43
146.66
157.95
162.10
180.42
179.57
171.58
185.43
190.64
203.00
202.36
193.41
186.17
192.24
209.60
206.41
209.82
230.37
235.80
232.07
244.64
242.19
217.48
209.39
211.73
221.00
203.11
214.71
224.19
238.04
238.36
246.24
259.87
249.97
266.48
282.98
306.31
301.73
314.62
332.62
355.51
370.32
408.13
433.58
440.51
386.29
342.84
254.97
203.42
170.09
174.03
167.85
177.01
188.19
211.20
240.91
230.26
251.25
241.66




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66855&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66855&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66855&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'Gwilym Jenkins' @ 72.249.127.135







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[105])
93266.48-------
94282.98-------
95306.31-------
96301.73-------
97314.62-------
98332.62-------
99355.51-------
100370.32-------
101408.13-------
102433.58-------
103440.51-------
104386.29-------
105342.84-------
106254.97299.39273.8088324.97123e-044e-040.89574e-04
107203.42255.94198.7386313.14140.0360.51330.04220.0015
108170.09212.49116.7738308.20620.19260.57370.03380.0038
109174.03169.0428.9258309.15420.47220.49410.02090.0075
110167.85125.59-64.1256315.30560.33120.30840.01620.0124
111177.0182.14-161.8895326.16950.2230.24560.01410.0181
112188.1938.69-263.9913341.37130.16650.18520.01590.0244
113211.2-4.76-370.1332360.61320.12330.15030.01340.0311
114240.91-48.21-480.0711383.65110.09470.11950.01440.038
115230.26-91.66-593.6002410.28020.10440.0970.01890.0449
116251.25-135.11-710.5458440.32580.09410.10670.03790.0518
117241.66-178.56-830.7562473.63620.10330.09820.05860.0586

\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[105]) \tabularnewline
93 & 266.48 & - & - & - & - & - & - & - \tabularnewline
94 & 282.98 & - & - & - & - & - & - & - \tabularnewline
95 & 306.31 & - & - & - & - & - & - & - \tabularnewline
96 & 301.73 & - & - & - & - & - & - & - \tabularnewline
97 & 314.62 & - & - & - & - & - & - & - \tabularnewline
98 & 332.62 & - & - & - & - & - & - & - \tabularnewline
99 & 355.51 & - & - & - & - & - & - & - \tabularnewline
100 & 370.32 & - & - & - & - & - & - & - \tabularnewline
101 & 408.13 & - & - & - & - & - & - & - \tabularnewline
102 & 433.58 & - & - & - & - & - & - & - \tabularnewline
103 & 440.51 & - & - & - & - & - & - & - \tabularnewline
104 & 386.29 & - & - & - & - & - & - & - \tabularnewline
105 & 342.84 & - & - & - & - & - & - & - \tabularnewline
106 & 254.97 & 299.39 & 273.8088 & 324.9712 & 3e-04 & 4e-04 & 0.8957 & 4e-04 \tabularnewline
107 & 203.42 & 255.94 & 198.7386 & 313.1414 & 0.036 & 0.5133 & 0.0422 & 0.0015 \tabularnewline
108 & 170.09 & 212.49 & 116.7738 & 308.2062 & 0.1926 & 0.5737 & 0.0338 & 0.0038 \tabularnewline
109 & 174.03 & 169.04 & 28.9258 & 309.1542 & 0.4722 & 0.4941 & 0.0209 & 0.0075 \tabularnewline
110 & 167.85 & 125.59 & -64.1256 & 315.3056 & 0.3312 & 0.3084 & 0.0162 & 0.0124 \tabularnewline
111 & 177.01 & 82.14 & -161.8895 & 326.1695 & 0.223 & 0.2456 & 0.0141 & 0.0181 \tabularnewline
112 & 188.19 & 38.69 & -263.9913 & 341.3713 & 0.1665 & 0.1852 & 0.0159 & 0.0244 \tabularnewline
113 & 211.2 & -4.76 & -370.1332 & 360.6132 & 0.1233 & 0.1503 & 0.0134 & 0.0311 \tabularnewline
114 & 240.91 & -48.21 & -480.0711 & 383.6511 & 0.0947 & 0.1195 & 0.0144 & 0.038 \tabularnewline
115 & 230.26 & -91.66 & -593.6002 & 410.2802 & 0.1044 & 0.097 & 0.0189 & 0.0449 \tabularnewline
116 & 251.25 & -135.11 & -710.5458 & 440.3258 & 0.0941 & 0.1067 & 0.0379 & 0.0518 \tabularnewline
117 & 241.66 & -178.56 & -830.7562 & 473.6362 & 0.1033 & 0.0982 & 0.0586 & 0.0586 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66855&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[105])[/C][/ROW]
[ROW][C]93[/C][C]266.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]282.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]306.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]301.73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]314.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]332.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]355.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]370.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]408.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]433.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]440.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]386.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]342.84[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]254.97[/C][C]299.39[/C][C]273.8088[/C][C]324.9712[/C][C]3e-04[/C][C]4e-04[/C][C]0.8957[/C][C]4e-04[/C][/ROW]
[ROW][C]107[/C][C]203.42[/C][C]255.94[/C][C]198.7386[/C][C]313.1414[/C][C]0.036[/C][C]0.5133[/C][C]0.0422[/C][C]0.0015[/C][/ROW]
[ROW][C]108[/C][C]170.09[/C][C]212.49[/C][C]116.7738[/C][C]308.2062[/C][C]0.1926[/C][C]0.5737[/C][C]0.0338[/C][C]0.0038[/C][/ROW]
[ROW][C]109[/C][C]174.03[/C][C]169.04[/C][C]28.9258[/C][C]309.1542[/C][C]0.4722[/C][C]0.4941[/C][C]0.0209[/C][C]0.0075[/C][/ROW]
[ROW][C]110[/C][C]167.85[/C][C]125.59[/C][C]-64.1256[/C][C]315.3056[/C][C]0.3312[/C][C]0.3084[/C][C]0.0162[/C][C]0.0124[/C][/ROW]
[ROW][C]111[/C][C]177.01[/C][C]82.14[/C][C]-161.8895[/C][C]326.1695[/C][C]0.223[/C][C]0.2456[/C][C]0.0141[/C][C]0.0181[/C][/ROW]
[ROW][C]112[/C][C]188.19[/C][C]38.69[/C][C]-263.9913[/C][C]341.3713[/C][C]0.1665[/C][C]0.1852[/C][C]0.0159[/C][C]0.0244[/C][/ROW]
[ROW][C]113[/C][C]211.2[/C][C]-4.76[/C][C]-370.1332[/C][C]360.6132[/C][C]0.1233[/C][C]0.1503[/C][C]0.0134[/C][C]0.0311[/C][/ROW]
[ROW][C]114[/C][C]240.91[/C][C]-48.21[/C][C]-480.0711[/C][C]383.6511[/C][C]0.0947[/C][C]0.1195[/C][C]0.0144[/C][C]0.038[/C][/ROW]
[ROW][C]115[/C][C]230.26[/C][C]-91.66[/C][C]-593.6002[/C][C]410.2802[/C][C]0.1044[/C][C]0.097[/C][C]0.0189[/C][C]0.0449[/C][/ROW]
[ROW][C]116[/C][C]251.25[/C][C]-135.11[/C][C]-710.5458[/C][C]440.3258[/C][C]0.0941[/C][C]0.1067[/C][C]0.0379[/C][C]0.0518[/C][/ROW]
[ROW][C]117[/C][C]241.66[/C][C]-178.56[/C][C]-830.7562[/C][C]473.6362[/C][C]0.1033[/C][C]0.0982[/C][C]0.0586[/C][C]0.0586[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66855&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66855&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[105])
93266.48-------
94282.98-------
95306.31-------
96301.73-------
97314.62-------
98332.62-------
99355.51-------
100370.32-------
101408.13-------
102433.58-------
103440.51-------
104386.29-------
105342.84-------
106254.97299.39273.8088324.97123e-044e-040.89574e-04
107203.42255.94198.7386313.14140.0360.51330.04220.0015
108170.09212.49116.7738308.20620.19260.57370.03380.0038
109174.03169.0428.9258309.15420.47220.49410.02090.0075
110167.85125.59-64.1256315.30560.33120.30840.01620.0124
111177.0182.14-161.8895326.16950.2230.24560.01410.0181
112188.1938.69-263.9913341.37130.16650.18520.01590.0244
113211.2-4.76-370.1332360.61320.12330.15030.01340.0311
114240.91-48.21-480.0711383.65110.09470.11950.01440.038
115230.26-91.66-593.6002410.28020.10440.0970.01890.0449
116251.25-135.11-710.5458440.32580.09410.10670.03790.0518
117241.66-178.56-830.7562473.63620.10330.09820.05860.0586







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1060.0436-0.14840.01241973.1364164.42812.8229
1070.114-0.20520.01712758.3504229.862515.1612
1080.2298-0.19950.01661797.76149.813312.2398
1090.42290.02950.002524.90012.0751.4405
1100.77070.33650.0281785.9076148.825612.1994
1111.51581.1550.09629000.3169750.026427.3866
1123.99153.8640.32222350.251862.520843.1569
113-39.1628-45.36973.780846638.72163886.560162.3423
114-4.5704-5.99710.499883590.37446965.864583.4618
115-2.7939-3.51210.2927103632.48648636.040592.9303
116-2.173-2.85960.2383149274.049612439.5041111.5325
117-1.8635-2.35340.1961176584.848414715.404121.3071

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
106 & 0.0436 & -0.1484 & 0.0124 & 1973.1364 & 164.428 & 12.8229 \tabularnewline
107 & 0.114 & -0.2052 & 0.0171 & 2758.3504 & 229.8625 & 15.1612 \tabularnewline
108 & 0.2298 & -0.1995 & 0.0166 & 1797.76 & 149.8133 & 12.2398 \tabularnewline
109 & 0.4229 & 0.0295 & 0.0025 & 24.9001 & 2.075 & 1.4405 \tabularnewline
110 & 0.7707 & 0.3365 & 0.028 & 1785.9076 & 148.8256 & 12.1994 \tabularnewline
111 & 1.5158 & 1.155 & 0.0962 & 9000.3169 & 750.0264 & 27.3866 \tabularnewline
112 & 3.9915 & 3.864 & 0.322 & 22350.25 & 1862.5208 & 43.1569 \tabularnewline
113 & -39.1628 & -45.3697 & 3.7808 & 46638.7216 & 3886.5601 & 62.3423 \tabularnewline
114 & -4.5704 & -5.9971 & 0.4998 & 83590.3744 & 6965.8645 & 83.4618 \tabularnewline
115 & -2.7939 & -3.5121 & 0.2927 & 103632.4864 & 8636.0405 & 92.9303 \tabularnewline
116 & -2.173 & -2.8596 & 0.2383 & 149274.0496 & 12439.5041 & 111.5325 \tabularnewline
117 & -1.8635 & -2.3534 & 0.1961 & 176584.8484 & 14715.404 & 121.3071 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66855&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]106[/C][C]0.0436[/C][C]-0.1484[/C][C]0.0124[/C][C]1973.1364[/C][C]164.428[/C][C]12.8229[/C][/ROW]
[ROW][C]107[/C][C]0.114[/C][C]-0.2052[/C][C]0.0171[/C][C]2758.3504[/C][C]229.8625[/C][C]15.1612[/C][/ROW]
[ROW][C]108[/C][C]0.2298[/C][C]-0.1995[/C][C]0.0166[/C][C]1797.76[/C][C]149.8133[/C][C]12.2398[/C][/ROW]
[ROW][C]109[/C][C]0.4229[/C][C]0.0295[/C][C]0.0025[/C][C]24.9001[/C][C]2.075[/C][C]1.4405[/C][/ROW]
[ROW][C]110[/C][C]0.7707[/C][C]0.3365[/C][C]0.028[/C][C]1785.9076[/C][C]148.8256[/C][C]12.1994[/C][/ROW]
[ROW][C]111[/C][C]1.5158[/C][C]1.155[/C][C]0.0962[/C][C]9000.3169[/C][C]750.0264[/C][C]27.3866[/C][/ROW]
[ROW][C]112[/C][C]3.9915[/C][C]3.864[/C][C]0.322[/C][C]22350.25[/C][C]1862.5208[/C][C]43.1569[/C][/ROW]
[ROW][C]113[/C][C]-39.1628[/C][C]-45.3697[/C][C]3.7808[/C][C]46638.7216[/C][C]3886.5601[/C][C]62.3423[/C][/ROW]
[ROW][C]114[/C][C]-4.5704[/C][C]-5.9971[/C][C]0.4998[/C][C]83590.3744[/C][C]6965.8645[/C][C]83.4618[/C][/ROW]
[ROW][C]115[/C][C]-2.7939[/C][C]-3.5121[/C][C]0.2927[/C][C]103632.4864[/C][C]8636.0405[/C][C]92.9303[/C][/ROW]
[ROW][C]116[/C][C]-2.173[/C][C]-2.8596[/C][C]0.2383[/C][C]149274.0496[/C][C]12439.5041[/C][C]111.5325[/C][/ROW]
[ROW][C]117[/C][C]-1.8635[/C][C]-2.3534[/C][C]0.1961[/C][C]176584.8484[/C][C]14715.404[/C][C]121.3071[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66855&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66855&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
1060.0436-0.14840.01241973.1364164.42812.8229
1070.114-0.20520.01712758.3504229.862515.1612
1080.2298-0.19950.01661797.76149.813312.2398
1090.42290.02950.002524.90012.0751.4405
1100.77070.33650.0281785.9076148.825612.1994
1111.51581.1550.09629000.3169750.026427.3866
1123.99153.8640.32222350.251862.520843.1569
113-39.1628-45.36973.780846638.72163886.560162.3423
114-4.5704-5.99710.499883590.37446965.864583.4618
115-2.7939-3.51210.2927103632.48648636.040592.9303
116-2.173-2.85960.2383149274.049612439.5041111.5325
117-1.8635-2.35340.1961176584.848414715.404121.3071



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