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:42:36 -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/t1229294645vd0d88qrwft9ecn.htm/, Retrieved Mon, 13 May 2024 23:29:04 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33586, Retrieved Mon, 13 May 2024 23:29:04 +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)
-     [Central Tendency] [Central tendency:...] [2008-12-12 12:54:43] [73d6180dc45497329efd1b6934a84aba]
- RMP   [ARIMA Backward Selection] [ARIMA goudprijs] [2008-12-14 20:12:57] [73d6180dc45497329efd1b6934a84aba]
- RMPD      [ARIMA Forecasting] [ARIMA forecast: O...] [2008-12-14 22:42:36] [e81ac192d6ae6d77191d83851a692999] [Current]
-   PD        [ARIMA Forecasting] [arima forecast ol...] [2008-12-16 16:27:50] [73d6180dc45497329efd1b6934a84aba]
-   P           [ARIMA Forecasting] [Lambda -0,2 ARIMA...] [2008-12-19 21:26:09] [73d6180dc45497329efd1b6934a84aba]
- R  D            [ARIMA Forecasting] [ARIMA Forecast olie] [2008-12-22 13:09:43] [7458e879e85b911182071700fff19fbd]
- RMPD              [ARIMA Forecasting] [] [2009-12-30 22:22:39] [74be16979710d4c4e7c6647856088456]
-   PD                [ARIMA Forecasting] [] [2009-12-31 10:35:36] [74be16979710d4c4e7c6647856088456]
-   PD                [ARIMA Forecasting] [] [2009-12-31 10:39:14] [74be16979710d4c4e7c6647856088456]
- R PD            [ARIMA Forecasting] [Forecast BEL20] [2008-12-22 14:06:40] [7458e879e85b911182071700fff19fbd]
- RMPD              [ARIMA Forecasting] [] [2009-12-30 23:10:28] [74be16979710d4c4e7c6647856088456]
- RMPD              [ARIMA Forecasting] [] [2009-12-30 23:10:28] [74be16979710d4c4e7c6647856088456]
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 time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33586&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]1 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=33586&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33586&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 time1 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.6101.378393.2505109.5060.00470.982910.9829
8992.23110.961595.4961126.42680.00880.995110.99
9094.09120.237995.4529145.02280.01930.986610.9856
91102.79129.631294.3363164.92610.0680.97580.99990.9801
92109.65138.9891.9642185.99570.11070.93430.99850.9734
93124.05148.345788.5621208.12930.21290.89770.99590.9662
94132.69157.70584.1692231.24080.25250.81510.99010.9587
95135.81167.066778.8667255.26680.24370.77750.97930.951
96116.07176.427572.7024280.15270.1270.77860.97640.9434
97101.42185.788765.7238305.85360.08420.87250.9630.9359
9875.73195.149757.9688332.33070.0440.90970.94750.9286
9955.48204.510849.4714359.55020.02980.94820.92140.9214

\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 & 101.3783 & 93.2505 & 109.506 & 0.0047 & 0.9829 & 1 & 0.9829 \tabularnewline
89 & 92.23 & 110.9615 & 95.4961 & 126.4268 & 0.0088 & 0.9951 & 1 & 0.99 \tabularnewline
90 & 94.09 & 120.2379 & 95.4529 & 145.0228 & 0.0193 & 0.9866 & 1 & 0.9856 \tabularnewline
91 & 102.79 & 129.6312 & 94.3363 & 164.9261 & 0.068 & 0.9758 & 0.9999 & 0.9801 \tabularnewline
92 & 109.65 & 138.98 & 91.9642 & 185.9957 & 0.1107 & 0.9343 & 0.9985 & 0.9734 \tabularnewline
93 & 124.05 & 148.3457 & 88.5621 & 208.1293 & 0.2129 & 0.8977 & 0.9959 & 0.9662 \tabularnewline
94 & 132.69 & 157.705 & 84.1692 & 231.2408 & 0.2525 & 0.8151 & 0.9901 & 0.9587 \tabularnewline
95 & 135.81 & 167.0667 & 78.8667 & 255.2668 & 0.2437 & 0.7775 & 0.9793 & 0.951 \tabularnewline
96 & 116.07 & 176.4275 & 72.7024 & 280.1527 & 0.127 & 0.7786 & 0.9764 & 0.9434 \tabularnewline
97 & 101.42 & 185.7887 & 65.7238 & 305.8536 & 0.0842 & 0.8725 & 0.963 & 0.9359 \tabularnewline
98 & 75.73 & 195.1497 & 57.9688 & 332.3307 & 0.044 & 0.9097 & 0.9475 & 0.9286 \tabularnewline
99 & 55.48 & 204.5108 & 49.4714 & 359.5502 & 0.0298 & 0.9482 & 0.9214 & 0.9214 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33586&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]101.3783[/C][C]93.2505[/C][C]109.506[/C][C]0.0047[/C][C]0.9829[/C][C]1[/C][C]0.9829[/C][/ROW]
[ROW][C]89[/C][C]92.23[/C][C]110.9615[/C][C]95.4961[/C][C]126.4268[/C][C]0.0088[/C][C]0.9951[/C][C]1[/C][C]0.99[/C][/ROW]
[ROW][C]90[/C][C]94.09[/C][C]120.2379[/C][C]95.4529[/C][C]145.0228[/C][C]0.0193[/C][C]0.9866[/C][C]1[/C][C]0.9856[/C][/ROW]
[ROW][C]91[/C][C]102.79[/C][C]129.6312[/C][C]94.3363[/C][C]164.9261[/C][C]0.068[/C][C]0.9758[/C][C]0.9999[/C][C]0.9801[/C][/ROW]
[ROW][C]92[/C][C]109.65[/C][C]138.98[/C][C]91.9642[/C][C]185.9957[/C][C]0.1107[/C][C]0.9343[/C][C]0.9985[/C][C]0.9734[/C][/ROW]
[ROW][C]93[/C][C]124.05[/C][C]148.3457[/C][C]88.5621[/C][C]208.1293[/C][C]0.2129[/C][C]0.8977[/C][C]0.9959[/C][C]0.9662[/C][/ROW]
[ROW][C]94[/C][C]132.69[/C][C]157.705[/C][C]84.1692[/C][C]231.2408[/C][C]0.2525[/C][C]0.8151[/C][C]0.9901[/C][C]0.9587[/C][/ROW]
[ROW][C]95[/C][C]135.81[/C][C]167.0667[/C][C]78.8667[/C][C]255.2668[/C][C]0.2437[/C][C]0.7775[/C][C]0.9793[/C][C]0.951[/C][/ROW]
[ROW][C]96[/C][C]116.07[/C][C]176.4275[/C][C]72.7024[/C][C]280.1527[/C][C]0.127[/C][C]0.7786[/C][C]0.9764[/C][C]0.9434[/C][/ROW]
[ROW][C]97[/C][C]101.42[/C][C]185.7887[/C][C]65.7238[/C][C]305.8536[/C][C]0.0842[/C][C]0.8725[/C][C]0.963[/C][C]0.9359[/C][/ROW]
[ROW][C]98[/C][C]75.73[/C][C]195.1497[/C][C]57.9688[/C][C]332.3307[/C][C]0.044[/C][C]0.9097[/C][C]0.9475[/C][C]0.9286[/C][/ROW]
[ROW][C]99[/C][C]55.48[/C][C]204.5108[/C][C]49.4714[/C][C]359.5502[/C][C]0.0298[/C][C]0.9482[/C][C]0.9214[/C][C]0.9214[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33586&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33586&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.6101.378393.2505109.5060.00470.982910.9829
8992.23110.961595.4961126.42680.00880.995110.99
9094.09120.237995.4529145.02280.01930.986610.9856
91102.79129.631294.3363164.92610.0680.97580.99990.9801
92109.65138.9891.9642185.99570.11070.93430.99850.9734
93124.05148.345788.5621208.12930.21290.89770.99590.9662
94132.69157.70584.1692231.24080.25250.81510.99010.9587
95135.81167.066778.8667255.26680.24370.77750.97930.951
96116.07176.427572.7024280.15270.1270.77860.97640.9434
97101.42185.788765.7238305.85360.08420.87250.9630.9359
9875.73195.149757.9688332.33070.0440.90970.94750.9286
9955.48204.510849.4714359.55020.02980.94820.92140.9214







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.0409-0.10630.0089116.17099.68093.1114
890.0711-0.16880.0141350.868229.2395.4073
900.1052-0.21750.0181683.710656.97597.5482
910.1389-0.20710.0173720.4560.03757.7484
920.1726-0.2110.0176860.246571.68728.4668
930.2056-0.16380.0136590.281649.19017.0136
940.2379-0.15860.0132625.749652.14587.2212
950.2694-0.18710.0156976.983281.41539.023
960.3-0.34210.02853643.0319303.58617.4237
970.3297-0.45410.03787118.0768593.173124.3551
980.3586-0.61190.05114261.06961188.422534.4735
990.3868-0.72870.060722210.17861850.848243.0215

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
88 & 0.0409 & -0.1063 & 0.0089 & 116.1709 & 9.6809 & 3.1114 \tabularnewline
89 & 0.0711 & -0.1688 & 0.0141 & 350.8682 & 29.239 & 5.4073 \tabularnewline
90 & 0.1052 & -0.2175 & 0.0181 & 683.7106 & 56.9759 & 7.5482 \tabularnewline
91 & 0.1389 & -0.2071 & 0.0173 & 720.45 & 60.0375 & 7.7484 \tabularnewline
92 & 0.1726 & -0.211 & 0.0176 & 860.2465 & 71.6872 & 8.4668 \tabularnewline
93 & 0.2056 & -0.1638 & 0.0136 & 590.2816 & 49.1901 & 7.0136 \tabularnewline
94 & 0.2379 & -0.1586 & 0.0132 & 625.7496 & 52.1458 & 7.2212 \tabularnewline
95 & 0.2694 & -0.1871 & 0.0156 & 976.9832 & 81.4153 & 9.023 \tabularnewline
96 & 0.3 & -0.3421 & 0.0285 & 3643.0319 & 303.586 & 17.4237 \tabularnewline
97 & 0.3297 & -0.4541 & 0.0378 & 7118.0768 & 593.1731 & 24.3551 \tabularnewline
98 & 0.3586 & -0.6119 & 0.051 & 14261.0696 & 1188.4225 & 34.4735 \tabularnewline
99 & 0.3868 & -0.7287 & 0.0607 & 22210.1786 & 1850.8482 & 43.0215 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33586&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.0409[/C][C]-0.1063[/C][C]0.0089[/C][C]116.1709[/C][C]9.6809[/C][C]3.1114[/C][/ROW]
[ROW][C]89[/C][C]0.0711[/C][C]-0.1688[/C][C]0.0141[/C][C]350.8682[/C][C]29.239[/C][C]5.4073[/C][/ROW]
[ROW][C]90[/C][C]0.1052[/C][C]-0.2175[/C][C]0.0181[/C][C]683.7106[/C][C]56.9759[/C][C]7.5482[/C][/ROW]
[ROW][C]91[/C][C]0.1389[/C][C]-0.2071[/C][C]0.0173[/C][C]720.45[/C][C]60.0375[/C][C]7.7484[/C][/ROW]
[ROW][C]92[/C][C]0.1726[/C][C]-0.211[/C][C]0.0176[/C][C]860.2465[/C][C]71.6872[/C][C]8.4668[/C][/ROW]
[ROW][C]93[/C][C]0.2056[/C][C]-0.1638[/C][C]0.0136[/C][C]590.2816[/C][C]49.1901[/C][C]7.0136[/C][/ROW]
[ROW][C]94[/C][C]0.2379[/C][C]-0.1586[/C][C]0.0132[/C][C]625.7496[/C][C]52.1458[/C][C]7.2212[/C][/ROW]
[ROW][C]95[/C][C]0.2694[/C][C]-0.1871[/C][C]0.0156[/C][C]976.9832[/C][C]81.4153[/C][C]9.023[/C][/ROW]
[ROW][C]96[/C][C]0.3[/C][C]-0.3421[/C][C]0.0285[/C][C]3643.0319[/C][C]303.586[/C][C]17.4237[/C][/ROW]
[ROW][C]97[/C][C]0.3297[/C][C]-0.4541[/C][C]0.0378[/C][C]7118.0768[/C][C]593.1731[/C][C]24.3551[/C][/ROW]
[ROW][C]98[/C][C]0.3586[/C][C]-0.6119[/C][C]0.051[/C][C]14261.0696[/C][C]1188.4225[/C][C]34.4735[/C][/ROW]
[ROW][C]99[/C][C]0.3868[/C][C]-0.7287[/C][C]0.0607[/C][C]22210.1786[/C][C]1850.8482[/C][C]43.0215[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33586&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33586&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.0409-0.10630.0089116.17099.68093.1114
890.0711-0.16880.0141350.868229.2395.4073
900.1052-0.21750.0181683.710656.97597.5482
910.1389-0.20710.0173720.4560.03757.7484
920.1726-0.2110.0176860.246571.68728.4668
930.2056-0.16380.0136590.281649.19017.0136
940.2379-0.15860.0132625.749652.14587.2212
950.2694-0.18710.0156976.983281.41539.023
960.3-0.34210.02853643.0319303.58617.4237
970.3297-0.45410.03787118.0768593.173124.3551
980.3586-0.61190.05114261.06961188.422534.4735
990.3868-0.72870.060722210.17861850.848243.0215



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