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, 21 Dec 2017 10:30:10 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2017/Dec/21/t1513848654ginlcakv9aoclib.htm/, Retrieved Tue, 14 May 2024 20:36:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310592, Retrieved Tue, 14 May 2024 20:36:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact87
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [dataset 3 - ARIMA...] [2017-12-21 09:30:10] [6bf860cf1a792f74e81bfd3c0354928d] [Current]
Feedback Forum

Post a new message
Dataseries X:
46.8
52.8
58.3
54.5
64.7
58.3
57.5
56.7
56
66.2
58.2
53.9
53.1
54.4
59.2
57.8
61.5
60.1
60.1
58.4
56.8
63.8
53.9
63.1
55.7
54.9
64.6
60.2
63.9
69.9
58.5
52
66.7
72
68.4
70.8
56.5
62.6
66.5
69.2
63.7
73.6
64.1
53.8
72.2
80.2
69.1
72
66.3
72.5
88.9
88.6
73.7
86
70
71.6
90.5
85.7
84.8
81.1
70.8
65.7
86.2
76.1
79.8
85.2
75.8
69.4
85
75
77.7
68.5
68.4
65
73.2
67.9
76.5
85.5
71.7
57.9
75.5
78.2
75.7
67.1
74.6
66.2
74.9
69.5
76.1
82.3
82.1
60.5
71.2
81.4
74.5
61.4
83.8
85.4
91.6
91.9
86.3
96.8
81
70.8
98.8
94.5
84.5
92.8
81.2
75.7
86.7
87.5
87.8
103.1
96.4
77.1
106.5
95.7
95.3
86.6
89.6
81.9
98.4
92.9
83.9
121.8
103.9
87.5
118.9
109
112.2
100.1
111.3
102.7
122.6
124.8
120.3
118.3
108.7
100.7
124
103.1
115
112.7
101.7
111.5
114.4
112.5
107.2
136.7
107.8
94.6
110.7
126.6
127.9
109.2
87.1
90.8
94.5
103.3
103.2
105.4
103.9
79.8
105.6
113
87.7
110
90.3
108.9
105.1
113
100.4
110.1
114.7
88.6
117.2
127.7
107.8
102.8
100.2
108.4
114.2
94.4
92.2
115.3
102
86.3
112
112.5
109.5
105.9
115.3
126.2
112.2
112.5
106.9
90.6
75.6
78.8
101.8
93.9
100
89.2
97.7
121.1
108.8
92.9
113.6
112.6
98.8
78




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310592&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=310592&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310592&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center







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[200])
18886.3-------
189112-------
190112.5-------
191109.5-------
192105.9-------
193115.3-------
194126.2-------
195112.2-------
196112.5-------
197106.9-------
19890.6-------
19975.6-------
20078.8-------
201101.899.397482.7669120.6470.41230.97130.12250.9713
20293.9101.058683.2734124.11510.27140.47490.16540.9708
20310094.458577.4351116.68560.31250.51960.09240.9163
20489.292.197475.0504114.80640.39750.24940.11740.8773
20597.788.797271.8676111.29920.2190.4860.01050.8081
206121.192.912674.4068117.87620.01340.35350.00450.8661
207108.897.377.1002124.95620.20750.04580.14550.9051
20892.995.142274.9566123.00420.43730.16830.1110.8748
209113.692.041472.1738119.64680.06290.47570.14570.8264
210112.699.537477.0839131.29130.210.19270.70940.8997
21198.889.364869.2983117.68940.25690.05390.82960.7676
2127878.061860.7549102.3650.4980.04720.47630.4763

\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[200]) \tabularnewline
188 & 86.3 & - & - & - & - & - & - & - \tabularnewline
189 & 112 & - & - & - & - & - & - & - \tabularnewline
190 & 112.5 & - & - & - & - & - & - & - \tabularnewline
191 & 109.5 & - & - & - & - & - & - & - \tabularnewline
192 & 105.9 & - & - & - & - & - & - & - \tabularnewline
193 & 115.3 & - & - & - & - & - & - & - \tabularnewline
194 & 126.2 & - & - & - & - & - & - & - \tabularnewline
195 & 112.2 & - & - & - & - & - & - & - \tabularnewline
196 & 112.5 & - & - & - & - & - & - & - \tabularnewline
197 & 106.9 & - & - & - & - & - & - & - \tabularnewline
198 & 90.6 & - & - & - & - & - & - & - \tabularnewline
199 & 75.6 & - & - & - & - & - & - & - \tabularnewline
200 & 78.8 & - & - & - & - & - & - & - \tabularnewline
201 & 101.8 & 99.3974 & 82.7669 & 120.647 & 0.4123 & 0.9713 & 0.1225 & 0.9713 \tabularnewline
202 & 93.9 & 101.0586 & 83.2734 & 124.1151 & 0.2714 & 0.4749 & 0.1654 & 0.9708 \tabularnewline
203 & 100 & 94.4585 & 77.4351 & 116.6856 & 0.3125 & 0.5196 & 0.0924 & 0.9163 \tabularnewline
204 & 89.2 & 92.1974 & 75.0504 & 114.8064 & 0.3975 & 0.2494 & 0.1174 & 0.8773 \tabularnewline
205 & 97.7 & 88.7972 & 71.8676 & 111.2992 & 0.219 & 0.486 & 0.0105 & 0.8081 \tabularnewline
206 & 121.1 & 92.9126 & 74.4068 & 117.8762 & 0.0134 & 0.3535 & 0.0045 & 0.8661 \tabularnewline
207 & 108.8 & 97.3 & 77.1002 & 124.9562 & 0.2075 & 0.0458 & 0.1455 & 0.9051 \tabularnewline
208 & 92.9 & 95.1422 & 74.9566 & 123.0042 & 0.4373 & 0.1683 & 0.111 & 0.8748 \tabularnewline
209 & 113.6 & 92.0414 & 72.1738 & 119.6468 & 0.0629 & 0.4757 & 0.1457 & 0.8264 \tabularnewline
210 & 112.6 & 99.5374 & 77.0839 & 131.2913 & 0.21 & 0.1927 & 0.7094 & 0.8997 \tabularnewline
211 & 98.8 & 89.3648 & 69.2983 & 117.6894 & 0.2569 & 0.0539 & 0.8296 & 0.7676 \tabularnewline
212 & 78 & 78.0618 & 60.7549 & 102.365 & 0.498 & 0.0472 & 0.4763 & 0.4763 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310592&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[200])[/C][/ROW]
[ROW][C]188[/C][C]86.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]112[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]109.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]105.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]115.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]126.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]112.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]106.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]90.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]75.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]78.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]101.8[/C][C]99.3974[/C][C]82.7669[/C][C]120.647[/C][C]0.4123[/C][C]0.9713[/C][C]0.1225[/C][C]0.9713[/C][/ROW]
[ROW][C]202[/C][C]93.9[/C][C]101.0586[/C][C]83.2734[/C][C]124.1151[/C][C]0.2714[/C][C]0.4749[/C][C]0.1654[/C][C]0.9708[/C][/ROW]
[ROW][C]203[/C][C]100[/C][C]94.4585[/C][C]77.4351[/C][C]116.6856[/C][C]0.3125[/C][C]0.5196[/C][C]0.0924[/C][C]0.9163[/C][/ROW]
[ROW][C]204[/C][C]89.2[/C][C]92.1974[/C][C]75.0504[/C][C]114.8064[/C][C]0.3975[/C][C]0.2494[/C][C]0.1174[/C][C]0.8773[/C][/ROW]
[ROW][C]205[/C][C]97.7[/C][C]88.7972[/C][C]71.8676[/C][C]111.2992[/C][C]0.219[/C][C]0.486[/C][C]0.0105[/C][C]0.8081[/C][/ROW]
[ROW][C]206[/C][C]121.1[/C][C]92.9126[/C][C]74.4068[/C][C]117.8762[/C][C]0.0134[/C][C]0.3535[/C][C]0.0045[/C][C]0.8661[/C][/ROW]
[ROW][C]207[/C][C]108.8[/C][C]97.3[/C][C]77.1002[/C][C]124.9562[/C][C]0.2075[/C][C]0.0458[/C][C]0.1455[/C][C]0.9051[/C][/ROW]
[ROW][C]208[/C][C]92.9[/C][C]95.1422[/C][C]74.9566[/C][C]123.0042[/C][C]0.4373[/C][C]0.1683[/C][C]0.111[/C][C]0.8748[/C][/ROW]
[ROW][C]209[/C][C]113.6[/C][C]92.0414[/C][C]72.1738[/C][C]119.6468[/C][C]0.0629[/C][C]0.4757[/C][C]0.1457[/C][C]0.8264[/C][/ROW]
[ROW][C]210[/C][C]112.6[/C][C]99.5374[/C][C]77.0839[/C][C]131.2913[/C][C]0.21[/C][C]0.1927[/C][C]0.7094[/C][C]0.8997[/C][/ROW]
[ROW][C]211[/C][C]98.8[/C][C]89.3648[/C][C]69.2983[/C][C]117.6894[/C][C]0.2569[/C][C]0.0539[/C][C]0.8296[/C][C]0.7676[/C][/ROW]
[ROW][C]212[/C][C]78[/C][C]78.0618[/C][C]60.7549[/C][C]102.365[/C][C]0.498[/C][C]0.0472[/C][C]0.4763[/C][C]0.4763[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310592&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310592&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[200])
18886.3-------
189112-------
190112.5-------
191109.5-------
192105.9-------
193115.3-------
194126.2-------
195112.2-------
196112.5-------
197106.9-------
19890.6-------
19975.6-------
20078.8-------
201101.899.397482.7669120.6470.41230.97130.12250.9713
20293.9101.058683.2734124.11510.27140.47490.16540.9708
20310094.458577.4351116.68560.31250.51960.09240.9163
20489.292.197475.0504114.80640.39750.24940.11740.8773
20597.788.797271.8676111.29920.2190.4860.01050.8081
206121.192.912674.4068117.87620.01340.35350.00450.8661
207108.897.377.1002124.95620.20750.04580.14550.9051
20892.995.142274.9566123.00420.43730.16830.1110.8748
209113.692.041472.1738119.64680.06290.47570.14570.8264
210112.699.537477.0839131.29130.210.19270.70940.8997
21198.889.364869.2983117.68940.25690.05390.82960.7676
2127878.061860.7549102.3650.4980.04720.47630.4763







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.10910.02360.02360.02395.7725000.18720.1872
2020.1164-0.07620.04990.048751.245228.50885.3394-0.55770.3724
2030.12010.05540.05180.051430.708629.24215.40760.43170.3922
2040.1251-0.03360.04720.04688.984324.17774.9171-0.23350.3525
2050.12930.09110.0560.056679.260335.19425.93250.69360.4207
2060.13710.23280.08550.091794.5274161.749712.71812.19590.7166
2070.1450.10570.08830.094132.2494157.535412.55130.89590.7422
2080.1494-0.02410.08030.08525.0273138.471911.7674-0.17470.6713
2090.1530.18980.09250.099464.7737174.727613.21851.67950.7833
2100.16280.1160.09480.1015170.6312174.31813.2031.01760.8067
2110.16170.09550.09490.101389.0237166.56412.9060.7350.8002
2120.1588-8e-040.08710.0930.0038152.68412.3565-0.00480.7339

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
201 & 0.1091 & 0.0236 & 0.0236 & 0.0239 & 5.7725 & 0 & 0 & 0.1872 & 0.1872 \tabularnewline
202 & 0.1164 & -0.0762 & 0.0499 & 0.0487 & 51.2452 & 28.5088 & 5.3394 & -0.5577 & 0.3724 \tabularnewline
203 & 0.1201 & 0.0554 & 0.0518 & 0.0514 & 30.7086 & 29.2421 & 5.4076 & 0.4317 & 0.3922 \tabularnewline
204 & 0.1251 & -0.0336 & 0.0472 & 0.0468 & 8.9843 & 24.1777 & 4.9171 & -0.2335 & 0.3525 \tabularnewline
205 & 0.1293 & 0.0911 & 0.056 & 0.0566 & 79.2603 & 35.1942 & 5.9325 & 0.6936 & 0.4207 \tabularnewline
206 & 0.1371 & 0.2328 & 0.0855 & 0.091 & 794.5274 & 161.7497 & 12.7181 & 2.1959 & 0.7166 \tabularnewline
207 & 0.145 & 0.1057 & 0.0883 & 0.094 & 132.2494 & 157.5354 & 12.5513 & 0.8959 & 0.7422 \tabularnewline
208 & 0.1494 & -0.0241 & 0.0803 & 0.0852 & 5.0273 & 138.4719 & 11.7674 & -0.1747 & 0.6713 \tabularnewline
209 & 0.153 & 0.1898 & 0.0925 & 0.099 & 464.7737 & 174.7276 & 13.2185 & 1.6795 & 0.7833 \tabularnewline
210 & 0.1628 & 0.116 & 0.0948 & 0.1015 & 170.6312 & 174.318 & 13.203 & 1.0176 & 0.8067 \tabularnewline
211 & 0.1617 & 0.0955 & 0.0949 & 0.1013 & 89.0237 & 166.564 & 12.906 & 0.735 & 0.8002 \tabularnewline
212 & 0.1588 & -8e-04 & 0.0871 & 0.093 & 0.0038 & 152.684 & 12.3565 & -0.0048 & 0.7339 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310592&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]sMAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][C]ScaledE[/C][C]MASE[/C][/ROW]
[ROW][C]201[/C][C]0.1091[/C][C]0.0236[/C][C]0.0236[/C][C]0.0239[/C][C]5.7725[/C][C]0[/C][C]0[/C][C]0.1872[/C][C]0.1872[/C][/ROW]
[ROW][C]202[/C][C]0.1164[/C][C]-0.0762[/C][C]0.0499[/C][C]0.0487[/C][C]51.2452[/C][C]28.5088[/C][C]5.3394[/C][C]-0.5577[/C][C]0.3724[/C][/ROW]
[ROW][C]203[/C][C]0.1201[/C][C]0.0554[/C][C]0.0518[/C][C]0.0514[/C][C]30.7086[/C][C]29.2421[/C][C]5.4076[/C][C]0.4317[/C][C]0.3922[/C][/ROW]
[ROW][C]204[/C][C]0.1251[/C][C]-0.0336[/C][C]0.0472[/C][C]0.0468[/C][C]8.9843[/C][C]24.1777[/C][C]4.9171[/C][C]-0.2335[/C][C]0.3525[/C][/ROW]
[ROW][C]205[/C][C]0.1293[/C][C]0.0911[/C][C]0.056[/C][C]0.0566[/C][C]79.2603[/C][C]35.1942[/C][C]5.9325[/C][C]0.6936[/C][C]0.4207[/C][/ROW]
[ROW][C]206[/C][C]0.1371[/C][C]0.2328[/C][C]0.0855[/C][C]0.091[/C][C]794.5274[/C][C]161.7497[/C][C]12.7181[/C][C]2.1959[/C][C]0.7166[/C][/ROW]
[ROW][C]207[/C][C]0.145[/C][C]0.1057[/C][C]0.0883[/C][C]0.094[/C][C]132.2494[/C][C]157.5354[/C][C]12.5513[/C][C]0.8959[/C][C]0.7422[/C][/ROW]
[ROW][C]208[/C][C]0.1494[/C][C]-0.0241[/C][C]0.0803[/C][C]0.0852[/C][C]5.0273[/C][C]138.4719[/C][C]11.7674[/C][C]-0.1747[/C][C]0.6713[/C][/ROW]
[ROW][C]209[/C][C]0.153[/C][C]0.1898[/C][C]0.0925[/C][C]0.099[/C][C]464.7737[/C][C]174.7276[/C][C]13.2185[/C][C]1.6795[/C][C]0.7833[/C][/ROW]
[ROW][C]210[/C][C]0.1628[/C][C]0.116[/C][C]0.0948[/C][C]0.1015[/C][C]170.6312[/C][C]174.318[/C][C]13.203[/C][C]1.0176[/C][C]0.8067[/C][/ROW]
[ROW][C]211[/C][C]0.1617[/C][C]0.0955[/C][C]0.0949[/C][C]0.1013[/C][C]89.0237[/C][C]166.564[/C][C]12.906[/C][C]0.735[/C][C]0.8002[/C][/ROW]
[ROW][C]212[/C][C]0.1588[/C][C]-8e-04[/C][C]0.0871[/C][C]0.093[/C][C]0.0038[/C][C]152.684[/C][C]12.3565[/C][C]-0.0048[/C][C]0.7339[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310592&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310592&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.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.10910.02360.02360.02395.7725000.18720.1872
2020.1164-0.07620.04990.048751.245228.50885.3394-0.55770.3724
2030.12010.05540.05180.051430.708629.24215.40760.43170.3922
2040.1251-0.03360.04720.04688.984324.17774.9171-0.23350.3525
2050.12930.09110.0560.056679.260335.19425.93250.69360.4207
2060.13710.23280.08550.091794.5274161.749712.71812.19590.7166
2070.1450.10570.08830.094132.2494157.535412.55130.89590.7422
2080.1494-0.02410.08030.08525.0273138.471911.7674-0.17470.6713
2090.1530.18980.09250.099464.7737174.727613.21851.67950.7833
2100.16280.1160.09480.1015170.6312174.31813.2031.01760.8067
2110.16170.09550.09490.101389.0237166.56412.9060.7350.8002
2120.1588-8e-040.08710.0930.0038152.68412.3565-0.00480.7339



Parameters (Session):
par1 = additive ; par2 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = -0.3 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; 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*2
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.spe <- array(0, dim=fx)
perf.scalederr <- array(0, dim=fx)
perf.mase <- array(0, dim=fx)
perf.mase1 <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.smape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.smape1 <- 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)
perf.scaleddenom <- 0
for (i in 2:fx) {
perf.scaleddenom = perf.scaleddenom + abs(x[nx+i] - x[nx+i-1])
}
perf.scaleddenom = perf.scaleddenom / (fx-1)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.scalederr[i] = (x[nx+i] - forecast$pred[i]) / perf.scaleddenom
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / x[nx+i]
perf.spe[i] = 2*(x[nx+i] - forecast$pred[i]) / (x[nx+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.smape[1] = abs(perf.spe[1])
perf.mape1[1] = perf.mape[1]
perf.smape1[1] = perf.smape[1]
perf.mse[1] = perf.se[1]
perf.mase[1] = abs(perf.scalederr[1])
perf.mase1[1] = perf.mase[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.smape[i] = perf.smape[i-1] + abs(perf.spe[i])
perf.smape1[i] = perf.smape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
perf.mase[i] = perf.mase[i-1] + abs(perf.scalederr[i])
perf.mase1[i] = perf.mase[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',10,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,'sMAPE',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.element(a,'ScaledE',1,header=TRUE)
a<-table.element(a,'MASE',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.smape1[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.element(a,round(perf.scalederr[i],4))
a<-table.element(a,round(perf.mase1[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')