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 computationWed, 20 Dec 2017 09:37:52 +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/20/t1513761708n05fvs7kpgqagpt.htm/, Retrieved Mon, 13 May 2024 23:01:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310462, Retrieved Mon, 13 May 2024 23:01:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact126
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Arima forecasting] [2017-12-20 08:37:52] [fe26a21ad13d52067ed58ad527d4fbe1] [Current]
Feedback Forum

Post a new message
Dataseries X:
56,5
69,4
81
68
69,1
66,3
46,4
71,6
75,8
78,7
73,2
53,3
60,3
71,4
73,1
73,4
66,4
69,9
53,9
72,7
77,3
78,6
73,4
63,7
73,8
81,5
93,7
92,9
79,4
81,8
69,3
82,9
90,1
95
83,3
64,6
64,7
85,5
88,5
84,8
81,2
74,3
68,1
82,3
91,6
95,2
76,5
64
62,2
70
93,3
91,1
73,9
90,9
70,7
85,5
91,3
88,3
79,8
68,5
64,8
72,5
84,1
89,1
82,9
100,1
63,8
87,6
96,5
121,3
121,8
111,5
81,9
85,7
106,8
94,7
104,8
110,5
82
102,7
103,8
111,1
100,4
92,5
88,9
97,3
116,2
105,9
107,1
115,4
90,9
123,6
103,5
111
106,9
83,5
113,8
104,2
126,9
125,8
112,9
119,9
105,1
123,4
113,3
114,4
93
73,9
64,9
83,5
90,5
92,1
85,8
99,1
76,7
92,5
106,8
108,5
95,3
67,2
59,4
74,3
111,2
112,4
102,6
127,5
88,4
118,5
112,9
111,1
111
70,6
84,9
102,4
115,6
105,3
118
111,5
72,8
118,7
112,9
107,4
105,2
85,7
88,2
78,8
111,5
99,4
108,7
112,4
79,1
94,7
99,3
111,6
96,1
67,2
66,8
78,9
87,8
97
103,5
103
85
91,7
96,6
105,8
87,5
74
80,7
82,2
92,8
97,1
90,4
90,3
78,1
84,5
95,8
101,4
82,1
72
99
86,6
114,9
101,2
104
119,4
106,2
106,8
113,4
110,8
97,9
83,4
85
89
117,9
112,5
100,3
111,5
66,3
120,4
131,3
118,6
120
100,1
83
99,2
123,7
104
113,9
122,2
98,7
114,8




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=310462&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=310462&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310462&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])
188106.8-------
189113.4-------
190110.8-------
19197.9-------
19283.4-------
19385-------
19489-------
195117.9-------
196112.5-------
197100.3-------
198111.5-------
19966.3-------
200120.4-------
201131.3114.85694.3234139.85810.09870.33190.54540.3319
202118.6115.996293.0067144.66830.42940.14770.63880.3817
203120103.080681.674130.0980.10980.13010.64650.1045
204100.183.21965.3319106.00340.07328e-040.49387e-04
2058385.827166.8241110.23410.41020.12590.52650.0027
20699.294.101172.6872121.82360.35920.78370.64080.0315
207123.7114.619987.8609149.52860.30510.80670.42690.3728
208104110.243183.8798144.89240.3620.22330.44920.2828
209113.9105.209879.4729139.28150.30860.52770.61120.1911
210122.2112.857784.6506150.46380.31320.47830.52820.3471
21198.783.041461.8591111.47720.14020.00350.87570.005
212114.8111.835982.7499151.14540.44130.74380.33470.3347

\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 & 106.8 & - & - & - & - & - & - & - \tabularnewline
189 & 113.4 & - & - & - & - & - & - & - \tabularnewline
190 & 110.8 & - & - & - & - & - & - & - \tabularnewline
191 & 97.9 & - & - & - & - & - & - & - \tabularnewline
192 & 83.4 & - & - & - & - & - & - & - \tabularnewline
193 & 85 & - & - & - & - & - & - & - \tabularnewline
194 & 89 & - & - & - & - & - & - & - \tabularnewline
195 & 117.9 & - & - & - & - & - & - & - \tabularnewline
196 & 112.5 & - & - & - & - & - & - & - \tabularnewline
197 & 100.3 & - & - & - & - & - & - & - \tabularnewline
198 & 111.5 & - & - & - & - & - & - & - \tabularnewline
199 & 66.3 & - & - & - & - & - & - & - \tabularnewline
200 & 120.4 & - & - & - & - & - & - & - \tabularnewline
201 & 131.3 & 114.856 & 94.3234 & 139.8581 & 0.0987 & 0.3319 & 0.5454 & 0.3319 \tabularnewline
202 & 118.6 & 115.9962 & 93.0067 & 144.6683 & 0.4294 & 0.1477 & 0.6388 & 0.3817 \tabularnewline
203 & 120 & 103.0806 & 81.674 & 130.098 & 0.1098 & 0.1301 & 0.6465 & 0.1045 \tabularnewline
204 & 100.1 & 83.219 & 65.3319 & 106.0034 & 0.0732 & 8e-04 & 0.4938 & 7e-04 \tabularnewline
205 & 83 & 85.8271 & 66.8241 & 110.2341 & 0.4102 & 0.1259 & 0.5265 & 0.0027 \tabularnewline
206 & 99.2 & 94.1011 & 72.6872 & 121.8236 & 0.3592 & 0.7837 & 0.6408 & 0.0315 \tabularnewline
207 & 123.7 & 114.6199 & 87.8609 & 149.5286 & 0.3051 & 0.8067 & 0.4269 & 0.3728 \tabularnewline
208 & 104 & 110.2431 & 83.8798 & 144.8924 & 0.362 & 0.2233 & 0.4492 & 0.2828 \tabularnewline
209 & 113.9 & 105.2098 & 79.4729 & 139.2815 & 0.3086 & 0.5277 & 0.6112 & 0.1911 \tabularnewline
210 & 122.2 & 112.8577 & 84.6506 & 150.4638 & 0.3132 & 0.4783 & 0.5282 & 0.3471 \tabularnewline
211 & 98.7 & 83.0414 & 61.8591 & 111.4772 & 0.1402 & 0.0035 & 0.8757 & 0.005 \tabularnewline
212 & 114.8 & 111.8359 & 82.7499 & 151.1454 & 0.4413 & 0.7438 & 0.3347 & 0.3347 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310462&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]106.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]113.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]110.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]97.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]83.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]117.9[/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]100.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]111.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]66.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]120.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]131.3[/C][C]114.856[/C][C]94.3234[/C][C]139.8581[/C][C]0.0987[/C][C]0.3319[/C][C]0.5454[/C][C]0.3319[/C][/ROW]
[ROW][C]202[/C][C]118.6[/C][C]115.9962[/C][C]93.0067[/C][C]144.6683[/C][C]0.4294[/C][C]0.1477[/C][C]0.6388[/C][C]0.3817[/C][/ROW]
[ROW][C]203[/C][C]120[/C][C]103.0806[/C][C]81.674[/C][C]130.098[/C][C]0.1098[/C][C]0.1301[/C][C]0.6465[/C][C]0.1045[/C][/ROW]
[ROW][C]204[/C][C]100.1[/C][C]83.219[/C][C]65.3319[/C][C]106.0034[/C][C]0.0732[/C][C]8e-04[/C][C]0.4938[/C][C]7e-04[/C][/ROW]
[ROW][C]205[/C][C]83[/C][C]85.8271[/C][C]66.8241[/C][C]110.2341[/C][C]0.4102[/C][C]0.1259[/C][C]0.5265[/C][C]0.0027[/C][/ROW]
[ROW][C]206[/C][C]99.2[/C][C]94.1011[/C][C]72.6872[/C][C]121.8236[/C][C]0.3592[/C][C]0.7837[/C][C]0.6408[/C][C]0.0315[/C][/ROW]
[ROW][C]207[/C][C]123.7[/C][C]114.6199[/C][C]87.8609[/C][C]149.5286[/C][C]0.3051[/C][C]0.8067[/C][C]0.4269[/C][C]0.3728[/C][/ROW]
[ROW][C]208[/C][C]104[/C][C]110.2431[/C][C]83.8798[/C][C]144.8924[/C][C]0.362[/C][C]0.2233[/C][C]0.4492[/C][C]0.2828[/C][/ROW]
[ROW][C]209[/C][C]113.9[/C][C]105.2098[/C][C]79.4729[/C][C]139.2815[/C][C]0.3086[/C][C]0.5277[/C][C]0.6112[/C][C]0.1911[/C][/ROW]
[ROW][C]210[/C][C]122.2[/C][C]112.8577[/C][C]84.6506[/C][C]150.4638[/C][C]0.3132[/C][C]0.4783[/C][C]0.5282[/C][C]0.3471[/C][/ROW]
[ROW][C]211[/C][C]98.7[/C][C]83.0414[/C][C]61.8591[/C][C]111.4772[/C][C]0.1402[/C][C]0.0035[/C][C]0.8757[/C][C]0.005[/C][/ROW]
[ROW][C]212[/C][C]114.8[/C][C]111.8359[/C][C]82.7499[/C][C]151.1454[/C][C]0.4413[/C][C]0.7438[/C][C]0.3347[/C][C]0.3347[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310462&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310462&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])
188106.8-------
189113.4-------
190110.8-------
19197.9-------
19283.4-------
19385-------
19489-------
195117.9-------
196112.5-------
197100.3-------
198111.5-------
19966.3-------
200120.4-------
201131.3114.85694.3234139.85810.09870.33190.54540.3319
202118.6115.996293.0067144.66830.42940.14770.63880.3817
203120103.080681.674130.0980.10980.13010.64650.1045
204100.183.21965.3319106.00340.07328e-040.49387e-04
2058385.827166.8241110.23410.41020.12590.52650.0027
20699.294.101172.6872121.82360.35920.78370.64080.0315
207123.7114.619987.8609149.52860.30510.80670.42690.3728
208104110.243183.8798144.89240.3620.22330.44920.2828
209113.9105.209879.4729139.28150.30860.52770.61120.1911
210122.2112.857784.6506150.46380.31320.47830.52820.3471
21198.783.041461.8591111.47720.14020.00350.87570.005
212114.8111.835982.7499151.14540.44130.74380.33470.3347







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.11110.12520.12520.1336270.4062001.06841.0684
2020.12610.0220.07360.07796.7797138.592911.77250.16920.6188
2030.13370.1410.09610.1025286.2646187.816813.70461.09930.779
2040.13970.16860.11420.1229284.9685212.104714.56381.09680.8584
2050.1451-0.03410.09820.1057.9927171.282313.0875-0.18370.7235
2060.15030.05140.09040.096325.9991147.068412.12720.33130.6581
2070.15540.07340.0880.093482.4483137.83711.74040.590.6484
2080.1604-0.060.08450.08938.9766125.479411.2018-0.40560.618
2090.16520.07630.08360.08875.5197119.928410.95120.56460.6121
2100.170.07650.08280.087187.2791116.663410.80110.6070.6116
2110.17470.15860.08970.0949245.1911128.347811.32911.01740.6485
2120.17930.02580.08440.08918.7858118.384310.88050.19260.6105

\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.1111 & 0.1252 & 0.1252 & 0.1336 & 270.4062 & 0 & 0 & 1.0684 & 1.0684 \tabularnewline
202 & 0.1261 & 0.022 & 0.0736 & 0.0779 & 6.7797 & 138.5929 & 11.7725 & 0.1692 & 0.6188 \tabularnewline
203 & 0.1337 & 0.141 & 0.0961 & 0.1025 & 286.2646 & 187.8168 & 13.7046 & 1.0993 & 0.779 \tabularnewline
204 & 0.1397 & 0.1686 & 0.1142 & 0.1229 & 284.9685 & 212.1047 & 14.5638 & 1.0968 & 0.8584 \tabularnewline
205 & 0.1451 & -0.0341 & 0.0982 & 0.105 & 7.9927 & 171.2823 & 13.0875 & -0.1837 & 0.7235 \tabularnewline
206 & 0.1503 & 0.0514 & 0.0904 & 0.0963 & 25.9991 & 147.0684 & 12.1272 & 0.3313 & 0.6581 \tabularnewline
207 & 0.1554 & 0.0734 & 0.088 & 0.0934 & 82.4483 & 137.837 & 11.7404 & 0.59 & 0.6484 \tabularnewline
208 & 0.1604 & -0.06 & 0.0845 & 0.089 & 38.9766 & 125.4794 & 11.2018 & -0.4056 & 0.618 \tabularnewline
209 & 0.1652 & 0.0763 & 0.0836 & 0.088 & 75.5197 & 119.9284 & 10.9512 & 0.5646 & 0.6121 \tabularnewline
210 & 0.17 & 0.0765 & 0.0828 & 0.0871 & 87.2791 & 116.6634 & 10.8011 & 0.607 & 0.6116 \tabularnewline
211 & 0.1747 & 0.1586 & 0.0897 & 0.0949 & 245.1911 & 128.3478 & 11.3291 & 1.0174 & 0.6485 \tabularnewline
212 & 0.1793 & 0.0258 & 0.0844 & 0.0891 & 8.7858 & 118.3843 & 10.8805 & 0.1926 & 0.6105 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310462&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.1111[/C][C]0.1252[/C][C]0.1252[/C][C]0.1336[/C][C]270.4062[/C][C]0[/C][C]0[/C][C]1.0684[/C][C]1.0684[/C][/ROW]
[ROW][C]202[/C][C]0.1261[/C][C]0.022[/C][C]0.0736[/C][C]0.0779[/C][C]6.7797[/C][C]138.5929[/C][C]11.7725[/C][C]0.1692[/C][C]0.6188[/C][/ROW]
[ROW][C]203[/C][C]0.1337[/C][C]0.141[/C][C]0.0961[/C][C]0.1025[/C][C]286.2646[/C][C]187.8168[/C][C]13.7046[/C][C]1.0993[/C][C]0.779[/C][/ROW]
[ROW][C]204[/C][C]0.1397[/C][C]0.1686[/C][C]0.1142[/C][C]0.1229[/C][C]284.9685[/C][C]212.1047[/C][C]14.5638[/C][C]1.0968[/C][C]0.8584[/C][/ROW]
[ROW][C]205[/C][C]0.1451[/C][C]-0.0341[/C][C]0.0982[/C][C]0.105[/C][C]7.9927[/C][C]171.2823[/C][C]13.0875[/C][C]-0.1837[/C][C]0.7235[/C][/ROW]
[ROW][C]206[/C][C]0.1503[/C][C]0.0514[/C][C]0.0904[/C][C]0.0963[/C][C]25.9991[/C][C]147.0684[/C][C]12.1272[/C][C]0.3313[/C][C]0.6581[/C][/ROW]
[ROW][C]207[/C][C]0.1554[/C][C]0.0734[/C][C]0.088[/C][C]0.0934[/C][C]82.4483[/C][C]137.837[/C][C]11.7404[/C][C]0.59[/C][C]0.6484[/C][/ROW]
[ROW][C]208[/C][C]0.1604[/C][C]-0.06[/C][C]0.0845[/C][C]0.089[/C][C]38.9766[/C][C]125.4794[/C][C]11.2018[/C][C]-0.4056[/C][C]0.618[/C][/ROW]
[ROW][C]209[/C][C]0.1652[/C][C]0.0763[/C][C]0.0836[/C][C]0.088[/C][C]75.5197[/C][C]119.9284[/C][C]10.9512[/C][C]0.5646[/C][C]0.6121[/C][/ROW]
[ROW][C]210[/C][C]0.17[/C][C]0.0765[/C][C]0.0828[/C][C]0.0871[/C][C]87.2791[/C][C]116.6634[/C][C]10.8011[/C][C]0.607[/C][C]0.6116[/C][/ROW]
[ROW][C]211[/C][C]0.1747[/C][C]0.1586[/C][C]0.0897[/C][C]0.0949[/C][C]245.1911[/C][C]128.3478[/C][C]11.3291[/C][C]1.0174[/C][C]0.6485[/C][/ROW]
[ROW][C]212[/C][C]0.1793[/C][C]0.0258[/C][C]0.0844[/C][C]0.0891[/C][C]8.7858[/C][C]118.3843[/C][C]10.8805[/C][C]0.1926[/C][C]0.6105[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310462&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310462&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.11110.12520.12520.1336270.4062001.06841.0684
2020.12610.0220.07360.07796.7797138.592911.77250.16920.6188
2030.13370.1410.09610.1025286.2646187.816813.70461.09930.779
2040.13970.16860.11420.1229284.9685212.104714.56381.09680.8584
2050.1451-0.03410.09820.1057.9927171.282313.0875-0.18370.7235
2060.15030.05140.09040.096325.9991147.068412.12720.33130.6581
2070.15540.07340.0880.093482.4483137.83711.74040.590.6484
2080.1604-0.060.08450.08938.9766125.479411.2018-0.40560.618
2090.16520.07630.08360.08875.5197119.928410.95120.56460.6121
2100.170.07650.08280.087187.2791116.663410.80110.6070.6116
2110.17470.15860.08970.0949245.1911128.347811.32911.01740.6485
2120.17930.02580.08440.08918.7858118.384310.88050.19260.6105



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