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 computationTue, 16 Dec 2008 09:27:50 -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/16/t1229444946qu8jzvij8ew4jww.htm/, Retrieved Tue, 14 May 2024 07:31:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34013, Retrieved Tue, 14 May 2024 07:31:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact221
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] [73d6180dc45497329efd1b6934a84aba]
-   PD        [ARIMA Forecasting] [arima forecast ol...] [2008-12-16 16:27:50] [e81ac192d6ae6d77191d83851a692999] [Current]
-   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 time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34013&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34013&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34013&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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.693.869587.0955100.64360.17210.643310.6433
8992.2393.157482.8032103.51160.43030.685810.542
9094.0993.003980.2715105.73630.43360.547410.5248
91102.7993.044778.3701107.71930.09650.444510.5237
92109.6593.059576.6613109.45780.02370.12240.99880.5219
93124.0593.057775.0964111.0194e-040.03510.99720.5199
94132.6993.056473.6578112.455109e-040.98930.5184
95135.8193.056572.3203113.792701e-040.95370.5172
96116.0793.056671.064115.04920.02011e-040.9730.5162
97101.4293.056669.8756116.23760.23970.02580.9210.5154
9875.7393.056668.7452117.36790.08120.25010.81980.5147
9955.4893.056667.6651118.44810.00190.90950.51410.5141

\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 & 93.8695 & 87.0955 & 100.6436 & 0.1721 & 0.6433 & 1 & 0.6433 \tabularnewline
89 & 92.23 & 93.1574 & 82.8032 & 103.5116 & 0.4303 & 0.6858 & 1 & 0.542 \tabularnewline
90 & 94.09 & 93.0039 & 80.2715 & 105.7363 & 0.4336 & 0.5474 & 1 & 0.5248 \tabularnewline
91 & 102.79 & 93.0447 & 78.3701 & 107.7193 & 0.0965 & 0.4445 & 1 & 0.5237 \tabularnewline
92 & 109.65 & 93.0595 & 76.6613 & 109.4578 & 0.0237 & 0.1224 & 0.9988 & 0.5219 \tabularnewline
93 & 124.05 & 93.0577 & 75.0964 & 111.019 & 4e-04 & 0.0351 & 0.9972 & 0.5199 \tabularnewline
94 & 132.69 & 93.0564 & 73.6578 & 112.4551 & 0 & 9e-04 & 0.9893 & 0.5184 \tabularnewline
95 & 135.81 & 93.0565 & 72.3203 & 113.7927 & 0 & 1e-04 & 0.9537 & 0.5172 \tabularnewline
96 & 116.07 & 93.0566 & 71.064 & 115.0492 & 0.0201 & 1e-04 & 0.973 & 0.5162 \tabularnewline
97 & 101.42 & 93.0566 & 69.8756 & 116.2376 & 0.2397 & 0.0258 & 0.921 & 0.5154 \tabularnewline
98 & 75.73 & 93.0566 & 68.7452 & 117.3679 & 0.0812 & 0.2501 & 0.8198 & 0.5147 \tabularnewline
99 & 55.48 & 93.0566 & 67.6651 & 118.4481 & 0.0019 & 0.9095 & 0.5141 & 0.5141 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34013&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]93.8695[/C][C]87.0955[/C][C]100.6436[/C][C]0.1721[/C][C]0.6433[/C][C]1[/C][C]0.6433[/C][/ROW]
[ROW][C]89[/C][C]92.23[/C][C]93.1574[/C][C]82.8032[/C][C]103.5116[/C][C]0.4303[/C][C]0.6858[/C][C]1[/C][C]0.542[/C][/ROW]
[ROW][C]90[/C][C]94.09[/C][C]93.0039[/C][C]80.2715[/C][C]105.7363[/C][C]0.4336[/C][C]0.5474[/C][C]1[/C][C]0.5248[/C][/ROW]
[ROW][C]91[/C][C]102.79[/C][C]93.0447[/C][C]78.3701[/C][C]107.7193[/C][C]0.0965[/C][C]0.4445[/C][C]1[/C][C]0.5237[/C][/ROW]
[ROW][C]92[/C][C]109.65[/C][C]93.0595[/C][C]76.6613[/C][C]109.4578[/C][C]0.0237[/C][C]0.1224[/C][C]0.9988[/C][C]0.5219[/C][/ROW]
[ROW][C]93[/C][C]124.05[/C][C]93.0577[/C][C]75.0964[/C][C]111.019[/C][C]4e-04[/C][C]0.0351[/C][C]0.9972[/C][C]0.5199[/C][/ROW]
[ROW][C]94[/C][C]132.69[/C][C]93.0564[/C][C]73.6578[/C][C]112.4551[/C][C]0[/C][C]9e-04[/C][C]0.9893[/C][C]0.5184[/C][/ROW]
[ROW][C]95[/C][C]135.81[/C][C]93.0565[/C][C]72.3203[/C][C]113.7927[/C][C]0[/C][C]1e-04[/C][C]0.9537[/C][C]0.5172[/C][/ROW]
[ROW][C]96[/C][C]116.07[/C][C]93.0566[/C][C]71.064[/C][C]115.0492[/C][C]0.0201[/C][C]1e-04[/C][C]0.973[/C][C]0.5162[/C][/ROW]
[ROW][C]97[/C][C]101.42[/C][C]93.0566[/C][C]69.8756[/C][C]116.2376[/C][C]0.2397[/C][C]0.0258[/C][C]0.921[/C][C]0.5154[/C][/ROW]
[ROW][C]98[/C][C]75.73[/C][C]93.0566[/C][C]68.7452[/C][C]117.3679[/C][C]0.0812[/C][C]0.2501[/C][C]0.8198[/C][C]0.5147[/C][/ROW]
[ROW][C]99[/C][C]55.48[/C][C]93.0566[/C][C]67.6651[/C][C]118.4481[/C][C]0.0019[/C][C]0.9095[/C][C]0.5141[/C][C]0.5141[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34013&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34013&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.693.869587.0955100.64360.17210.643310.6433
8992.2393.157482.8032103.51160.43030.685810.542
9094.0993.003980.2715105.73630.43360.547410.5248
91102.7993.044778.3701107.71930.09650.444510.5237
92109.6593.059576.6613109.45780.02370.12240.99880.5219
93124.0593.057775.0964111.0194e-040.03510.99720.5199
94132.6993.056473.6578112.455109e-040.98930.5184
95135.8193.056572.3203113.792701e-040.95370.5172
96116.0793.056671.064115.04920.02011e-040.9730.5162
97101.4293.056669.8756116.23760.23970.02580.9210.5154
9875.7393.056668.7452117.36790.08120.25010.81980.5147
9955.4893.056667.6651118.44810.00190.90950.51410.5141







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.0368-0.03480.002910.68980.89080.9438
890.0567-0.018e-040.86010.07170.2677
900.06980.01170.0011.17960.09830.3135
910.08050.10470.008794.97117.91432.8132
920.08990.17830.0149275.243322.93694.7893
930.09850.3330.0278960.522680.04358.9467
940.10640.42590.03551570.8193130.901611.4412
950.11370.45940.03831827.8642152.32212.3419
960.12060.24730.0206529.61844.13486.6434
970.12710.08990.007569.94695.82892.4143
980.1333-0.18620.0155300.2125.01755.0017
990.1392-0.40380.03371411.9984117.666510.8474

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
88 & 0.0368 & -0.0348 & 0.0029 & 10.6898 & 0.8908 & 0.9438 \tabularnewline
89 & 0.0567 & -0.01 & 8e-04 & 0.8601 & 0.0717 & 0.2677 \tabularnewline
90 & 0.0698 & 0.0117 & 0.001 & 1.1796 & 0.0983 & 0.3135 \tabularnewline
91 & 0.0805 & 0.1047 & 0.0087 & 94.9711 & 7.9143 & 2.8132 \tabularnewline
92 & 0.0899 & 0.1783 & 0.0149 & 275.2433 & 22.9369 & 4.7893 \tabularnewline
93 & 0.0985 & 0.333 & 0.0278 & 960.5226 & 80.0435 & 8.9467 \tabularnewline
94 & 0.1064 & 0.4259 & 0.0355 & 1570.8193 & 130.9016 & 11.4412 \tabularnewline
95 & 0.1137 & 0.4594 & 0.0383 & 1827.8642 & 152.322 & 12.3419 \tabularnewline
96 & 0.1206 & 0.2473 & 0.0206 & 529.618 & 44.1348 & 6.6434 \tabularnewline
97 & 0.1271 & 0.0899 & 0.0075 & 69.9469 & 5.8289 & 2.4143 \tabularnewline
98 & 0.1333 & -0.1862 & 0.0155 & 300.21 & 25.0175 & 5.0017 \tabularnewline
99 & 0.1392 & -0.4038 & 0.0337 & 1411.9984 & 117.6665 & 10.8474 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34013&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.0368[/C][C]-0.0348[/C][C]0.0029[/C][C]10.6898[/C][C]0.8908[/C][C]0.9438[/C][/ROW]
[ROW][C]89[/C][C]0.0567[/C][C]-0.01[/C][C]8e-04[/C][C]0.8601[/C][C]0.0717[/C][C]0.2677[/C][/ROW]
[ROW][C]90[/C][C]0.0698[/C][C]0.0117[/C][C]0.001[/C][C]1.1796[/C][C]0.0983[/C][C]0.3135[/C][/ROW]
[ROW][C]91[/C][C]0.0805[/C][C]0.1047[/C][C]0.0087[/C][C]94.9711[/C][C]7.9143[/C][C]2.8132[/C][/ROW]
[ROW][C]92[/C][C]0.0899[/C][C]0.1783[/C][C]0.0149[/C][C]275.2433[/C][C]22.9369[/C][C]4.7893[/C][/ROW]
[ROW][C]93[/C][C]0.0985[/C][C]0.333[/C][C]0.0278[/C][C]960.5226[/C][C]80.0435[/C][C]8.9467[/C][/ROW]
[ROW][C]94[/C][C]0.1064[/C][C]0.4259[/C][C]0.0355[/C][C]1570.8193[/C][C]130.9016[/C][C]11.4412[/C][/ROW]
[ROW][C]95[/C][C]0.1137[/C][C]0.4594[/C][C]0.0383[/C][C]1827.8642[/C][C]152.322[/C][C]12.3419[/C][/ROW]
[ROW][C]96[/C][C]0.1206[/C][C]0.2473[/C][C]0.0206[/C][C]529.618[/C][C]44.1348[/C][C]6.6434[/C][/ROW]
[ROW][C]97[/C][C]0.1271[/C][C]0.0899[/C][C]0.0075[/C][C]69.9469[/C][C]5.8289[/C][C]2.4143[/C][/ROW]
[ROW][C]98[/C][C]0.1333[/C][C]-0.1862[/C][C]0.0155[/C][C]300.21[/C][C]25.0175[/C][C]5.0017[/C][/ROW]
[ROW][C]99[/C][C]0.1392[/C][C]-0.4038[/C][C]0.0337[/C][C]1411.9984[/C][C]117.6665[/C][C]10.8474[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34013&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34013&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.0368-0.03480.002910.68980.89080.9438
890.0567-0.018e-040.86010.07170.2677
900.06980.01170.0011.17960.09830.3135
910.08050.10470.008794.97117.91432.8132
920.08990.17830.0149275.243322.93694.7893
930.09850.3330.0278960.522680.04358.9467
940.10640.42590.03551570.8193130.901611.4412
950.11370.45940.03831827.8642152.32212.3419
960.12060.24730.0206529.61844.13486.6434
970.12710.08990.007569.94695.82892.4143
980.1333-0.18620.0155300.2125.01755.0017
990.1392-0.40380.03371411.9984117.666510.8474



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