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 15:26:28 -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/t1229293682uynphrt3ljpb41v.htm/, Retrieved Thu, 16 May 2024 02:16:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33579, Retrieved Thu, 16 May 2024 02:16:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact190
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Central Tendency] [Central tendency:...] [2008-12-12 12:54:43] [73d6180dc45497329efd1b6934a84aba]
- RMPD  [ARIMA Backward Selection] [Arima Olieprijs] [2008-12-14 20:17:24] [73d6180dc45497329efd1b6934a84aba]
- RMP       [ARIMA Forecasting] [ARIMA forecast Ol...] [2008-12-14 22:26:28] [e81ac192d6ae6d77191d83851a692999] [Current]
Feedback Forum

Post a new message
Dataseries X:
32,68
31,54
32,43
26,54
25,85
27,6
25,71
25,38
28,57
27,64
25,36
25,9
26,29
21,74
19,2
19,32
19,82
20,36
24,31
25,97
25,61
24,67
25,59
26,09
28,37
27,34
24,46
27,46
30,23
32,33
29,87
24,87
25,48
27,28
28,24
29,58
26,95
29,08
28,76
29,59
30,7
30,52
32,67
33,19
37,13
35,54
37,75
41,84
42,94
49,14
44,61
40,22
44,23
45,85
53,38
53,26
51,8
55,3
57,81
63,96
63,77
59,15
56,12
57,42
63,52
61,71
63,01
68,18
72,03
69,75
74,41
74,33
64,24
60,03
59,44
62,5
55,04
58,34
61,92
67,65
67,68
70,3
75,26
71,44
76,36
81,71
92,6
90,6
92,23
94,09
102,79
109,65
124,05
132,69
135,81
116,07
101,42
75,73
55,48




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 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 & 4 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33579&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]4 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=33579&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33579&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 time4 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[87])
7559.44-------
7662.5-------
7755.04-------
7858.34-------
7961.92-------
8067.65-------
8167.68-------
8270.3-------
8375.26-------
8471.44-------
8576.36-------
8681.71-------
8792.6-------
8890.695.25188.7029101.79910.08190.786310.7863
8992.2394.670884.5291104.81240.31860.784310.6555
9094.0995.724283.1157108.33280.39970.706510.6864
91102.7996.088681.413110.76420.18540.605210.6794
92109.6597.356680.695114.01820.07410.26140.99980.7121
93124.0598.135179.511116.75920.00320.11280.99930.7199
94132.6999.930979.3713120.49059e-040.01070.99760.7577
95135.81100.27277.8007122.74340.0010.00230.98540.7483
96116.07100.795576.4262125.16480.10960.00240.99090.7451
97101.42103.958877.6919130.22580.42490.18310.98030.8017
9875.73106.461178.2783134.64390.01630.63710.95740.8325
9955.48109.390679.2841139.49712e-040.98580.86280.8628

\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[87]) \tabularnewline
75 & 59.44 & - & - & - & - & - & - & - \tabularnewline
76 & 62.5 & - & - & - & - & - & - & - \tabularnewline
77 & 55.04 & - & - & - & - & - & - & - \tabularnewline
78 & 58.34 & - & - & - & - & - & - & - \tabularnewline
79 & 61.92 & - & - & - & - & - & - & - \tabularnewline
80 & 67.65 & - & - & - & - & - & - & - \tabularnewline
81 & 67.68 & - & - & - & - & - & - & - \tabularnewline
82 & 70.3 & - & - & - & - & - & - & - \tabularnewline
83 & 75.26 & - & - & - & - & - & - & - \tabularnewline
84 & 71.44 & - & - & - & - & - & - & - \tabularnewline
85 & 76.36 & - & - & - & - & - & - & - \tabularnewline
86 & 81.71 & - & - & - & - & - & - & - \tabularnewline
87 & 92.6 & - & - & - & - & - & - & - \tabularnewline
88 & 90.6 & 95.251 & 88.7029 & 101.7991 & 0.0819 & 0.7863 & 1 & 0.7863 \tabularnewline
89 & 92.23 & 94.6708 & 84.5291 & 104.8124 & 0.3186 & 0.7843 & 1 & 0.6555 \tabularnewline
90 & 94.09 & 95.7242 & 83.1157 & 108.3328 & 0.3997 & 0.7065 & 1 & 0.6864 \tabularnewline
91 & 102.79 & 96.0886 & 81.413 & 110.7642 & 0.1854 & 0.6052 & 1 & 0.6794 \tabularnewline
92 & 109.65 & 97.3566 & 80.695 & 114.0182 & 0.0741 & 0.2614 & 0.9998 & 0.7121 \tabularnewline
93 & 124.05 & 98.1351 & 79.511 & 116.7592 & 0.0032 & 0.1128 & 0.9993 & 0.7199 \tabularnewline
94 & 132.69 & 99.9309 & 79.3713 & 120.4905 & 9e-04 & 0.0107 & 0.9976 & 0.7577 \tabularnewline
95 & 135.81 & 100.272 & 77.8007 & 122.7434 & 0.001 & 0.0023 & 0.9854 & 0.7483 \tabularnewline
96 & 116.07 & 100.7955 & 76.4262 & 125.1648 & 0.1096 & 0.0024 & 0.9909 & 0.7451 \tabularnewline
97 & 101.42 & 103.9588 & 77.6919 & 130.2258 & 0.4249 & 0.1831 & 0.9803 & 0.8017 \tabularnewline
98 & 75.73 & 106.4611 & 78.2783 & 134.6439 & 0.0163 & 0.6371 & 0.9574 & 0.8325 \tabularnewline
99 & 55.48 & 109.3906 & 79.2841 & 139.4971 & 2e-04 & 0.9858 & 0.8628 & 0.8628 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33579&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[87])[/C][/ROW]
[ROW][C]75[/C][C]59.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]62.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]55.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]58.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]61.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]67.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]67.68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]70.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]75.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]71.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]76.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]81.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]92.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]90.6[/C][C]95.251[/C][C]88.7029[/C][C]101.7991[/C][C]0.0819[/C][C]0.7863[/C][C]1[/C][C]0.7863[/C][/ROW]
[ROW][C]89[/C][C]92.23[/C][C]94.6708[/C][C]84.5291[/C][C]104.8124[/C][C]0.3186[/C][C]0.7843[/C][C]1[/C][C]0.6555[/C][/ROW]
[ROW][C]90[/C][C]94.09[/C][C]95.7242[/C][C]83.1157[/C][C]108.3328[/C][C]0.3997[/C][C]0.7065[/C][C]1[/C][C]0.6864[/C][/ROW]
[ROW][C]91[/C][C]102.79[/C][C]96.0886[/C][C]81.413[/C][C]110.7642[/C][C]0.1854[/C][C]0.6052[/C][C]1[/C][C]0.6794[/C][/ROW]
[ROW][C]92[/C][C]109.65[/C][C]97.3566[/C][C]80.695[/C][C]114.0182[/C][C]0.0741[/C][C]0.2614[/C][C]0.9998[/C][C]0.7121[/C][/ROW]
[ROW][C]93[/C][C]124.05[/C][C]98.1351[/C][C]79.511[/C][C]116.7592[/C][C]0.0032[/C][C]0.1128[/C][C]0.9993[/C][C]0.7199[/C][/ROW]
[ROW][C]94[/C][C]132.69[/C][C]99.9309[/C][C]79.3713[/C][C]120.4905[/C][C]9e-04[/C][C]0.0107[/C][C]0.9976[/C][C]0.7577[/C][/ROW]
[ROW][C]95[/C][C]135.81[/C][C]100.272[/C][C]77.8007[/C][C]122.7434[/C][C]0.001[/C][C]0.0023[/C][C]0.9854[/C][C]0.7483[/C][/ROW]
[ROW][C]96[/C][C]116.07[/C][C]100.7955[/C][C]76.4262[/C][C]125.1648[/C][C]0.1096[/C][C]0.0024[/C][C]0.9909[/C][C]0.7451[/C][/ROW]
[ROW][C]97[/C][C]101.42[/C][C]103.9588[/C][C]77.6919[/C][C]130.2258[/C][C]0.4249[/C][C]0.1831[/C][C]0.9803[/C][C]0.8017[/C][/ROW]
[ROW][C]98[/C][C]75.73[/C][C]106.4611[/C][C]78.2783[/C][C]134.6439[/C][C]0.0163[/C][C]0.6371[/C][C]0.9574[/C][C]0.8325[/C][/ROW]
[ROW][C]99[/C][C]55.48[/C][C]109.3906[/C][C]79.2841[/C][C]139.4971[/C][C]2e-04[/C][C]0.9858[/C][C]0.8628[/C][C]0.8628[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33579&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33579&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[87])
7559.44-------
7662.5-------
7755.04-------
7858.34-------
7961.92-------
8067.65-------
8167.68-------
8270.3-------
8375.26-------
8471.44-------
8576.36-------
8681.71-------
8792.6-------
8890.695.25188.7029101.79910.08190.786310.7863
8992.2394.670884.5291104.81240.31860.784310.6555
9094.0995.724283.1157108.33280.39970.706510.6864
91102.7996.088681.413110.76420.18540.605210.6794
92109.6597.356680.695114.01820.07410.26140.99980.7121
93124.0598.135179.511116.75920.00320.11280.99930.7199
94132.6999.930979.3713120.49059e-040.01070.99760.7577
95135.81100.27277.8007122.74340.0010.00230.98540.7483
96116.07100.795576.4262125.16480.10960.00240.99090.7451
97101.42103.958877.6919130.22580.42490.18310.98030.8017
9875.73106.461178.2783134.64390.01630.63710.95740.8325
9955.48109.390679.2841139.49712e-040.98580.86280.8628







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.0351-0.04880.004121.63161.80261.3426
890.0547-0.02580.00215.95740.49650.7046
900.0672-0.01710.00142.67070.22260.4718
910.07790.06970.005844.90933.74241.9345
920.08730.12630.0105151.128612.5943.5488
930.09680.26410.022671.581655.96517.481
940.1050.32780.02731073.155889.42969.4567
950.11430.35440.02951262.9482105.245710.2589
960.12340.15150.0126233.31119.44264.4094
970.1289-0.02440.0026.44570.53710.7329
980.1351-0.28870.0241944.400178.78.8713
990.1404-0.49280.04112906.3538242.196215.5627

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
88 & 0.0351 & -0.0488 & 0.0041 & 21.6316 & 1.8026 & 1.3426 \tabularnewline
89 & 0.0547 & -0.0258 & 0.0021 & 5.9574 & 0.4965 & 0.7046 \tabularnewline
90 & 0.0672 & -0.0171 & 0.0014 & 2.6707 & 0.2226 & 0.4718 \tabularnewline
91 & 0.0779 & 0.0697 & 0.0058 & 44.9093 & 3.7424 & 1.9345 \tabularnewline
92 & 0.0873 & 0.1263 & 0.0105 & 151.1286 & 12.594 & 3.5488 \tabularnewline
93 & 0.0968 & 0.2641 & 0.022 & 671.5816 & 55.9651 & 7.481 \tabularnewline
94 & 0.105 & 0.3278 & 0.0273 & 1073.1558 & 89.4296 & 9.4567 \tabularnewline
95 & 0.1143 & 0.3544 & 0.0295 & 1262.9482 & 105.2457 & 10.2589 \tabularnewline
96 & 0.1234 & 0.1515 & 0.0126 & 233.311 & 19.4426 & 4.4094 \tabularnewline
97 & 0.1289 & -0.0244 & 0.002 & 6.4457 & 0.5371 & 0.7329 \tabularnewline
98 & 0.1351 & -0.2887 & 0.0241 & 944.4001 & 78.7 & 8.8713 \tabularnewline
99 & 0.1404 & -0.4928 & 0.0411 & 2906.3538 & 242.1962 & 15.5627 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33579&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]88[/C][C]0.0351[/C][C]-0.0488[/C][C]0.0041[/C][C]21.6316[/C][C]1.8026[/C][C]1.3426[/C][/ROW]
[ROW][C]89[/C][C]0.0547[/C][C]-0.0258[/C][C]0.0021[/C][C]5.9574[/C][C]0.4965[/C][C]0.7046[/C][/ROW]
[ROW][C]90[/C][C]0.0672[/C][C]-0.0171[/C][C]0.0014[/C][C]2.6707[/C][C]0.2226[/C][C]0.4718[/C][/ROW]
[ROW][C]91[/C][C]0.0779[/C][C]0.0697[/C][C]0.0058[/C][C]44.9093[/C][C]3.7424[/C][C]1.9345[/C][/ROW]
[ROW][C]92[/C][C]0.0873[/C][C]0.1263[/C][C]0.0105[/C][C]151.1286[/C][C]12.594[/C][C]3.5488[/C][/ROW]
[ROW][C]93[/C][C]0.0968[/C][C]0.2641[/C][C]0.022[/C][C]671.5816[/C][C]55.9651[/C][C]7.481[/C][/ROW]
[ROW][C]94[/C][C]0.105[/C][C]0.3278[/C][C]0.0273[/C][C]1073.1558[/C][C]89.4296[/C][C]9.4567[/C][/ROW]
[ROW][C]95[/C][C]0.1143[/C][C]0.3544[/C][C]0.0295[/C][C]1262.9482[/C][C]105.2457[/C][C]10.2589[/C][/ROW]
[ROW][C]96[/C][C]0.1234[/C][C]0.1515[/C][C]0.0126[/C][C]233.311[/C][C]19.4426[/C][C]4.4094[/C][/ROW]
[ROW][C]97[/C][C]0.1289[/C][C]-0.0244[/C][C]0.002[/C][C]6.4457[/C][C]0.5371[/C][C]0.7329[/C][/ROW]
[ROW][C]98[/C][C]0.1351[/C][C]-0.2887[/C][C]0.0241[/C][C]944.4001[/C][C]78.7[/C][C]8.8713[/C][/ROW]
[ROW][C]99[/C][C]0.1404[/C][C]-0.4928[/C][C]0.0411[/C][C]2906.3538[/C][C]242.1962[/C][C]15.5627[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33579&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33579&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
880.0351-0.04880.004121.63161.80261.3426
890.0547-0.02580.00215.95740.49650.7046
900.0672-0.01710.00142.67070.22260.4718
910.07790.06970.005844.90933.74241.9345
920.08730.12630.0105151.128612.5943.5488
930.09680.26410.022671.581655.96517.481
940.1050.32780.02731073.155889.42969.4567
950.11430.35440.02951262.9482105.245710.2589
960.12340.15150.0126233.31119.44264.4094
970.1289-0.02440.0026.44570.53710.7329
980.1351-0.28870.0241944.400178.78.8713
990.1404-0.49280.04112906.3538242.196215.5627



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