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 computationThu, 16 Dec 2010 18:51:29 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/16/t12925253782fle5c3e25ovlew.htm/, Retrieved Fri, 03 May 2024 07:17:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111181, Retrieved Fri, 03 May 2024 07:17:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsPaper DMA
Estimated Impact151
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper DMA ARIMA-F...] [2010-12-16 18:51:29] [f92ba2b01007f169e2985fcc57236bd0] [Current]
Feedback Forum

Post a new message
Dataseries X:
25,64
27,97
27,62
23,31
29,07
29,58
28,63
29,92
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
43,8
45,29




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111181&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111181&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111181&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[97])
8555.04-------
8658.34-------
8761.92-------
8867.65-------
8967.68-------
9070.3-------
9175.26-------
9271.44-------
9376.36-------
9481.71-------
9592.6-------
9690.6-------
9792.23-------
9894.0992.302671.8782122.85150.45430.50190.98530.5019
99102.7992.302664.9284141.490.3380.47160.8870.5012
100109.6592.302660.3106158.59750.3040.37830.7670.5009
101124.0592.302656.8058175.46360.22720.34130.71920.5007
102132.6992.302653.9723192.60870.2150.26750.66640.5006
103135.8192.302651.5929210.33720.2350.25120.61140.5005
104116.0792.302649.5432228.87090.36650.26620.61770.5004
105101.4292.302647.7446248.39730.45440.38270.57930.5004
10675.7392.302646.144269.09150.42710.45970.54670.5003
10755.4892.302644.7038291.12820.35830.56490.49880.5003
10843.892.302643.3961314.68960.33450.62720.5060.5003
10945.2992.302642.1999339.9710.35490.64950.50020.5002

\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[97]) \tabularnewline
85 & 55.04 & - & - & - & - & - & - & - \tabularnewline
86 & 58.34 & - & - & - & - & - & - & - \tabularnewline
87 & 61.92 & - & - & - & - & - & - & - \tabularnewline
88 & 67.65 & - & - & - & - & - & - & - \tabularnewline
89 & 67.68 & - & - & - & - & - & - & - \tabularnewline
90 & 70.3 & - & - & - & - & - & - & - \tabularnewline
91 & 75.26 & - & - & - & - & - & - & - \tabularnewline
92 & 71.44 & - & - & - & - & - & - & - \tabularnewline
93 & 76.36 & - & - & - & - & - & - & - \tabularnewline
94 & 81.71 & - & - & - & - & - & - & - \tabularnewline
95 & 92.6 & - & - & - & - & - & - & - \tabularnewline
96 & 90.6 & - & - & - & - & - & - & - \tabularnewline
97 & 92.23 & - & - & - & - & - & - & - \tabularnewline
98 & 94.09 & 92.3026 & 71.8782 & 122.8515 & 0.4543 & 0.5019 & 0.9853 & 0.5019 \tabularnewline
99 & 102.79 & 92.3026 & 64.9284 & 141.49 & 0.338 & 0.4716 & 0.887 & 0.5012 \tabularnewline
100 & 109.65 & 92.3026 & 60.3106 & 158.5975 & 0.304 & 0.3783 & 0.767 & 0.5009 \tabularnewline
101 & 124.05 & 92.3026 & 56.8058 & 175.4636 & 0.2272 & 0.3413 & 0.7192 & 0.5007 \tabularnewline
102 & 132.69 & 92.3026 & 53.9723 & 192.6087 & 0.215 & 0.2675 & 0.6664 & 0.5006 \tabularnewline
103 & 135.81 & 92.3026 & 51.5929 & 210.3372 & 0.235 & 0.2512 & 0.6114 & 0.5005 \tabularnewline
104 & 116.07 & 92.3026 & 49.5432 & 228.8709 & 0.3665 & 0.2662 & 0.6177 & 0.5004 \tabularnewline
105 & 101.42 & 92.3026 & 47.7446 & 248.3973 & 0.4544 & 0.3827 & 0.5793 & 0.5004 \tabularnewline
106 & 75.73 & 92.3026 & 46.144 & 269.0915 & 0.4271 & 0.4597 & 0.5467 & 0.5003 \tabularnewline
107 & 55.48 & 92.3026 & 44.7038 & 291.1282 & 0.3583 & 0.5649 & 0.4988 & 0.5003 \tabularnewline
108 & 43.8 & 92.3026 & 43.3961 & 314.6896 & 0.3345 & 0.6272 & 0.506 & 0.5003 \tabularnewline
109 & 45.29 & 92.3026 & 42.1999 & 339.971 & 0.3549 & 0.6495 & 0.5002 & 0.5002 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111181&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[97])[/C][/ROW]
[ROW][C]85[/C][C]55.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]58.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]61.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]67.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]67.68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]70.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]75.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]71.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]76.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]81.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]92.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]90.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]92.23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]94.09[/C][C]92.3026[/C][C]71.8782[/C][C]122.8515[/C][C]0.4543[/C][C]0.5019[/C][C]0.9853[/C][C]0.5019[/C][/ROW]
[ROW][C]99[/C][C]102.79[/C][C]92.3026[/C][C]64.9284[/C][C]141.49[/C][C]0.338[/C][C]0.4716[/C][C]0.887[/C][C]0.5012[/C][/ROW]
[ROW][C]100[/C][C]109.65[/C][C]92.3026[/C][C]60.3106[/C][C]158.5975[/C][C]0.304[/C][C]0.3783[/C][C]0.767[/C][C]0.5009[/C][/ROW]
[ROW][C]101[/C][C]124.05[/C][C]92.3026[/C][C]56.8058[/C][C]175.4636[/C][C]0.2272[/C][C]0.3413[/C][C]0.7192[/C][C]0.5007[/C][/ROW]
[ROW][C]102[/C][C]132.69[/C][C]92.3026[/C][C]53.9723[/C][C]192.6087[/C][C]0.215[/C][C]0.2675[/C][C]0.6664[/C][C]0.5006[/C][/ROW]
[ROW][C]103[/C][C]135.81[/C][C]92.3026[/C][C]51.5929[/C][C]210.3372[/C][C]0.235[/C][C]0.2512[/C][C]0.6114[/C][C]0.5005[/C][/ROW]
[ROW][C]104[/C][C]116.07[/C][C]92.3026[/C][C]49.5432[/C][C]228.8709[/C][C]0.3665[/C][C]0.2662[/C][C]0.6177[/C][C]0.5004[/C][/ROW]
[ROW][C]105[/C][C]101.42[/C][C]92.3026[/C][C]47.7446[/C][C]248.3973[/C][C]0.4544[/C][C]0.3827[/C][C]0.5793[/C][C]0.5004[/C][/ROW]
[ROW][C]106[/C][C]75.73[/C][C]92.3026[/C][C]46.144[/C][C]269.0915[/C][C]0.4271[/C][C]0.4597[/C][C]0.5467[/C][C]0.5003[/C][/ROW]
[ROW][C]107[/C][C]55.48[/C][C]92.3026[/C][C]44.7038[/C][C]291.1282[/C][C]0.3583[/C][C]0.5649[/C][C]0.4988[/C][C]0.5003[/C][/ROW]
[ROW][C]108[/C][C]43.8[/C][C]92.3026[/C][C]43.3961[/C][C]314.6896[/C][C]0.3345[/C][C]0.6272[/C][C]0.506[/C][C]0.5003[/C][/ROW]
[ROW][C]109[/C][C]45.29[/C][C]92.3026[/C][C]42.1999[/C][C]339.971[/C][C]0.3549[/C][C]0.6495[/C][C]0.5002[/C][C]0.5002[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111181&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111181&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[97])
8555.04-------
8658.34-------
8761.92-------
8867.65-------
8967.68-------
9070.3-------
9175.26-------
9271.44-------
9376.36-------
9481.71-------
9592.6-------
9690.6-------
9792.23-------
9894.0992.302671.8782122.85150.45430.50190.98530.5019
99102.7992.302664.9284141.490.3380.47160.8870.5012
100109.6592.302660.3106158.59750.3040.37830.7670.5009
101124.0592.302656.8058175.46360.22720.34130.71920.5007
102132.6992.302653.9723192.60870.2150.26750.66640.5006
103135.8192.302651.5929210.33720.2350.25120.61140.5005
104116.0792.302649.5432228.87090.36650.26620.61770.5004
105101.4292.302647.7446248.39730.45440.38270.57930.5004
10675.7392.302646.144269.09150.42710.45970.54670.5003
10755.4892.302644.7038291.12820.35830.56490.49880.5003
10843.892.302643.3961314.68960.33450.62720.5060.5003
10945.2992.302642.1999339.9710.35490.64950.50020.5002







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
980.16890.019403.194900
990.27190.11360.0665109.98656.59047.5227
1000.36640.18790.107300.933138.037911.749
1010.45970.34390.16621007.8987355.503118.8548
1020.55440.43760.22051631.1437610.631224.711
1030.65240.47140.26231892.8956824.34228.7114
1040.75490.25750.2616564.8903787.277428.0585
1050.86280.09880.241383.1274699.258726.4435
1060.9772-0.17950.2344274.6504652.0825.5359
1071.099-0.39890.25091355.9024722.462226.8787
1081.2292-0.52550.27582352.5002870.647529.5067
1091.369-0.50930.29532210.1827982.275431.3413

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
98 & 0.1689 & 0.0194 & 0 & 3.1949 & 0 & 0 \tabularnewline
99 & 0.2719 & 0.1136 & 0.0665 & 109.986 & 56.5904 & 7.5227 \tabularnewline
100 & 0.3664 & 0.1879 & 0.107 & 300.933 & 138.0379 & 11.749 \tabularnewline
101 & 0.4597 & 0.3439 & 0.1662 & 1007.8987 & 355.5031 & 18.8548 \tabularnewline
102 & 0.5544 & 0.4376 & 0.2205 & 1631.1437 & 610.6312 & 24.711 \tabularnewline
103 & 0.6524 & 0.4714 & 0.2623 & 1892.8956 & 824.342 & 28.7114 \tabularnewline
104 & 0.7549 & 0.2575 & 0.2616 & 564.8903 & 787.2774 & 28.0585 \tabularnewline
105 & 0.8628 & 0.0988 & 0.2413 & 83.1274 & 699.2587 & 26.4435 \tabularnewline
106 & 0.9772 & -0.1795 & 0.2344 & 274.6504 & 652.08 & 25.5359 \tabularnewline
107 & 1.099 & -0.3989 & 0.2509 & 1355.9024 & 722.4622 & 26.8787 \tabularnewline
108 & 1.2292 & -0.5255 & 0.2758 & 2352.5002 & 870.6475 & 29.5067 \tabularnewline
109 & 1.369 & -0.5093 & 0.2953 & 2210.1827 & 982.2754 & 31.3413 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111181&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]98[/C][C]0.1689[/C][C]0.0194[/C][C]0[/C][C]3.1949[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]99[/C][C]0.2719[/C][C]0.1136[/C][C]0.0665[/C][C]109.986[/C][C]56.5904[/C][C]7.5227[/C][/ROW]
[ROW][C]100[/C][C]0.3664[/C][C]0.1879[/C][C]0.107[/C][C]300.933[/C][C]138.0379[/C][C]11.749[/C][/ROW]
[ROW][C]101[/C][C]0.4597[/C][C]0.3439[/C][C]0.1662[/C][C]1007.8987[/C][C]355.5031[/C][C]18.8548[/C][/ROW]
[ROW][C]102[/C][C]0.5544[/C][C]0.4376[/C][C]0.2205[/C][C]1631.1437[/C][C]610.6312[/C][C]24.711[/C][/ROW]
[ROW][C]103[/C][C]0.6524[/C][C]0.4714[/C][C]0.2623[/C][C]1892.8956[/C][C]824.342[/C][C]28.7114[/C][/ROW]
[ROW][C]104[/C][C]0.7549[/C][C]0.2575[/C][C]0.2616[/C][C]564.8903[/C][C]787.2774[/C][C]28.0585[/C][/ROW]
[ROW][C]105[/C][C]0.8628[/C][C]0.0988[/C][C]0.2413[/C][C]83.1274[/C][C]699.2587[/C][C]26.4435[/C][/ROW]
[ROW][C]106[/C][C]0.9772[/C][C]-0.1795[/C][C]0.2344[/C][C]274.6504[/C][C]652.08[/C][C]25.5359[/C][/ROW]
[ROW][C]107[/C][C]1.099[/C][C]-0.3989[/C][C]0.2509[/C][C]1355.9024[/C][C]722.4622[/C][C]26.8787[/C][/ROW]
[ROW][C]108[/C][C]1.2292[/C][C]-0.5255[/C][C]0.2758[/C][C]2352.5002[/C][C]870.6475[/C][C]29.5067[/C][/ROW]
[ROW][C]109[/C][C]1.369[/C][C]-0.5093[/C][C]0.2953[/C][C]2210.1827[/C][C]982.2754[/C][C]31.3413[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111181&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111181&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
980.16890.019403.194900
990.27190.11360.0665109.98656.59047.5227
1000.36640.18790.107300.933138.037911.749
1010.45970.34390.16621007.8987355.503118.8548
1020.55440.43760.22051631.1437610.631224.711
1030.65240.47140.26231892.8956824.34228.7114
1040.75490.25750.2616564.8903787.277428.0585
1050.86280.09880.241383.1274699.258726.4435
1060.9772-0.17950.2344274.6504652.0825.5359
1071.099-0.39890.25091355.9024722.462226.8787
1081.2292-0.52550.27582352.5002870.647529.5067
1091.369-0.50930.29532210.1827982.275431.3413



Parameters (Session):
par1 = 12 ; par2 = -0.5 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = -0.5 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')