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, 19 Dec 2017 12:37:36 +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/19/t1513683465ea1wotknbpigs1u.htm/, Retrieved Wed, 15 May 2024 10:08:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310296, Retrieved Wed, 15 May 2024 10:08:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact99
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2017-12-19 11:37:36] [4a18882c9dbf23bd76c659f8b4f63e4f] [Current]
Feedback Forum

Post a new message
Dataseries X:
56.5
69.4
81
68
69
66.3
46.4
71.5
75.7
78.7
73.2
53.3
60.2
71.4
73
73.4
66.4
69.9
53.9
72.6
77.3
78.5
73.3
63.7
73.7
81.5
93.7
92.9
79.4
81.7
69.3
82.9
90
95
83.3
64.5
64.6
85.5
88.4
84.8
81.2
74.2
68.1
82.3
91.5
95.2
76.5
64
62.1
70
93.3
91.1
73.9
90.8
70.7
85.5
91.2
88.3
79.8
68.5
64.8
72.5
84.1
89
82.9
100.1
63.8
87.5
96.5
121.3
121.8
111.5
81.8
85.7
106.7
94.7
104.7
110.5
82
102.7
103.8
111.1
100.4
92.5
88.8
97.3
116.1
105.9
107
115.4
90.9
123.6
103.5
110.9
106.9
83.5
113.8
104.1
126.9
125.8
112.9
119.9
105.2
123.4
113.3
114.4
93
73.9
64.8
83.5
90.4
92.1
85.8
99
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.1
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.4
111.6
96.1
67.2
66.8
78.9
87.8
97
103.5
103.1
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.6
95.8
101.4
82.1
72.1
99
86.6
115
101.3
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.5
131.3
118.6
120
100.2
83
99.3
123.7
104
114
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 time1 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 time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310296&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]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=310296&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310296&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 time1 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.5-------
201131.3115.199393.3727144.15120.13790.35990.54850.3599
202118.6117.185892.5537151.06630.46740.20710.64410.424
203120103.203881.3093133.42370.1380.1590.63460.131
204100.281.948865.0741104.98360.06026e-040.45095e-04
2058385.343267.1339110.53160.42770.12380.51070.0031
20699.393.562772.6501123.0260.35140.75890.61930.0366
207123.7114.133886.7324153.94190.31880.76740.42640.377
208104110.091983.3649149.11710.37980.24720.45190.3006
209114106.462180.3359144.80110.350.55010.62360.2365
210122.2113.977485.0066157.21050.35470.49960.54470.3837
21198.785.594464.9758115.59390.19590.00840.89630.0113
212114.8110.605481.7353154.26370.42530.70350.32840.3284

\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.5 & - & - & - & - & - & - & - \tabularnewline
201 & 131.3 & 115.1993 & 93.3727 & 144.1512 & 0.1379 & 0.3599 & 0.5485 & 0.3599 \tabularnewline
202 & 118.6 & 117.1858 & 92.5537 & 151.0663 & 0.4674 & 0.2071 & 0.6441 & 0.424 \tabularnewline
203 & 120 & 103.2038 & 81.3093 & 133.4237 & 0.138 & 0.159 & 0.6346 & 0.131 \tabularnewline
204 & 100.2 & 81.9488 & 65.0741 & 104.9836 & 0.0602 & 6e-04 & 0.4509 & 5e-04 \tabularnewline
205 & 83 & 85.3432 & 67.1339 & 110.5316 & 0.4277 & 0.1238 & 0.5107 & 0.0031 \tabularnewline
206 & 99.3 & 93.5627 & 72.6501 & 123.026 & 0.3514 & 0.7589 & 0.6193 & 0.0366 \tabularnewline
207 & 123.7 & 114.1338 & 86.7324 & 153.9419 & 0.3188 & 0.7674 & 0.4264 & 0.377 \tabularnewline
208 & 104 & 110.0919 & 83.3649 & 149.1171 & 0.3798 & 0.2472 & 0.4519 & 0.3006 \tabularnewline
209 & 114 & 106.4621 & 80.3359 & 144.8011 & 0.35 & 0.5501 & 0.6236 & 0.2365 \tabularnewline
210 & 122.2 & 113.9774 & 85.0066 & 157.2105 & 0.3547 & 0.4996 & 0.5447 & 0.3837 \tabularnewline
211 & 98.7 & 85.5944 & 64.9758 & 115.5939 & 0.1959 & 0.0084 & 0.8963 & 0.0113 \tabularnewline
212 & 114.8 & 110.6054 & 81.7353 & 154.2637 & 0.4253 & 0.7035 & 0.3284 & 0.3284 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310296&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.5[/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]115.1993[/C][C]93.3727[/C][C]144.1512[/C][C]0.1379[/C][C]0.3599[/C][C]0.5485[/C][C]0.3599[/C][/ROW]
[ROW][C]202[/C][C]118.6[/C][C]117.1858[/C][C]92.5537[/C][C]151.0663[/C][C]0.4674[/C][C]0.2071[/C][C]0.6441[/C][C]0.424[/C][/ROW]
[ROW][C]203[/C][C]120[/C][C]103.2038[/C][C]81.3093[/C][C]133.4237[/C][C]0.138[/C][C]0.159[/C][C]0.6346[/C][C]0.131[/C][/ROW]
[ROW][C]204[/C][C]100.2[/C][C]81.9488[/C][C]65.0741[/C][C]104.9836[/C][C]0.0602[/C][C]6e-04[/C][C]0.4509[/C][C]5e-04[/C][/ROW]
[ROW][C]205[/C][C]83[/C][C]85.3432[/C][C]67.1339[/C][C]110.5316[/C][C]0.4277[/C][C]0.1238[/C][C]0.5107[/C][C]0.0031[/C][/ROW]
[ROW][C]206[/C][C]99.3[/C][C]93.5627[/C][C]72.6501[/C][C]123.026[/C][C]0.3514[/C][C]0.7589[/C][C]0.6193[/C][C]0.0366[/C][/ROW]
[ROW][C]207[/C][C]123.7[/C][C]114.1338[/C][C]86.7324[/C][C]153.9419[/C][C]0.3188[/C][C]0.7674[/C][C]0.4264[/C][C]0.377[/C][/ROW]
[ROW][C]208[/C][C]104[/C][C]110.0919[/C][C]83.3649[/C][C]149.1171[/C][C]0.3798[/C][C]0.2472[/C][C]0.4519[/C][C]0.3006[/C][/ROW]
[ROW][C]209[/C][C]114[/C][C]106.4621[/C][C]80.3359[/C][C]144.8011[/C][C]0.35[/C][C]0.5501[/C][C]0.6236[/C][C]0.2365[/C][/ROW]
[ROW][C]210[/C][C]122.2[/C][C]113.9774[/C][C]85.0066[/C][C]157.2105[/C][C]0.3547[/C][C]0.4996[/C][C]0.5447[/C][C]0.3837[/C][/ROW]
[ROW][C]211[/C][C]98.7[/C][C]85.5944[/C][C]64.9758[/C][C]115.5939[/C][C]0.1959[/C][C]0.0084[/C][C]0.8963[/C][C]0.0113[/C][/ROW]
[ROW][C]212[/C][C]114.8[/C][C]110.6054[/C][C]81.7353[/C][C]154.2637[/C][C]0.4253[/C][C]0.7035[/C][C]0.3284[/C][C]0.3284[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310296&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310296&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.5-------
201131.3115.199393.3727144.15120.13790.35990.54850.3599
202118.6117.185892.5537151.06630.46740.20710.64410.424
203120103.203881.3093133.42370.1380.1590.63460.131
204100.281.948865.0741104.98360.06026e-040.45095e-04
2058385.343267.1339110.53160.42770.12380.51070.0031
20699.393.562772.6501123.0260.35140.75890.61930.0366
207123.7114.133886.7324153.94190.31880.76740.42640.377
208104110.091983.3649149.11710.37980.24720.45190.3006
209114106.462180.3359144.80110.350.55010.62360.2365
210122.2113.977485.0066157.21050.35470.49960.54470.3837
21198.785.594464.9758115.59390.19590.00840.89630.0113
212114.8110.605481.7353154.26370.42530.70350.32840.3284







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.12820.12260.12260.1306259.2326001.04611.0461
2020.14750.01190.06730.07131.9999130.616311.42870.09190.569
2030.14940.140.09150.0977282.1129181.115213.45791.09130.7431
2040.14340.18210.11420.1234333.1056219.112814.80251.18580.8538
2050.1506-0.02820.0970.10435.4907176.388313.2811-0.15220.7135
2060.16070.05780.09040.096832.9169152.476412.34810.37280.6567
2070.1780.07730.08860.094591.5115143.767211.99030.62150.6517
2080.1809-0.05860.08480.089837.111130.435111.4208-0.39580.6197
2090.18370.06610.08270.087456.8193122.255611.05690.48980.6053
2100.19350.06730.08120.085667.6109116.791110.8070.53420.5982
2110.17880.13280.08590.0908171.7559121.787911.03580.85150.6212
2120.20140.03650.08180.086317.595113.105210.63510.27250.5921

\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.1282 & 0.1226 & 0.1226 & 0.1306 & 259.2326 & 0 & 0 & 1.0461 & 1.0461 \tabularnewline
202 & 0.1475 & 0.0119 & 0.0673 & 0.0713 & 1.9999 & 130.6163 & 11.4287 & 0.0919 & 0.569 \tabularnewline
203 & 0.1494 & 0.14 & 0.0915 & 0.0977 & 282.1129 & 181.1152 & 13.4579 & 1.0913 & 0.7431 \tabularnewline
204 & 0.1434 & 0.1821 & 0.1142 & 0.1234 & 333.1056 & 219.1128 & 14.8025 & 1.1858 & 0.8538 \tabularnewline
205 & 0.1506 & -0.0282 & 0.097 & 0.1043 & 5.4907 & 176.3883 & 13.2811 & -0.1522 & 0.7135 \tabularnewline
206 & 0.1607 & 0.0578 & 0.0904 & 0.0968 & 32.9169 & 152.4764 & 12.3481 & 0.3728 & 0.6567 \tabularnewline
207 & 0.178 & 0.0773 & 0.0886 & 0.0945 & 91.5115 & 143.7672 & 11.9903 & 0.6215 & 0.6517 \tabularnewline
208 & 0.1809 & -0.0586 & 0.0848 & 0.0898 & 37.111 & 130.4351 & 11.4208 & -0.3958 & 0.6197 \tabularnewline
209 & 0.1837 & 0.0661 & 0.0827 & 0.0874 & 56.8193 & 122.2556 & 11.0569 & 0.4898 & 0.6053 \tabularnewline
210 & 0.1935 & 0.0673 & 0.0812 & 0.0856 & 67.6109 & 116.7911 & 10.807 & 0.5342 & 0.5982 \tabularnewline
211 & 0.1788 & 0.1328 & 0.0859 & 0.0908 & 171.7559 & 121.7879 & 11.0358 & 0.8515 & 0.6212 \tabularnewline
212 & 0.2014 & 0.0365 & 0.0818 & 0.0863 & 17.595 & 113.1052 & 10.6351 & 0.2725 & 0.5921 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310296&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.1282[/C][C]0.1226[/C][C]0.1226[/C][C]0.1306[/C][C]259.2326[/C][C]0[/C][C]0[/C][C]1.0461[/C][C]1.0461[/C][/ROW]
[ROW][C]202[/C][C]0.1475[/C][C]0.0119[/C][C]0.0673[/C][C]0.0713[/C][C]1.9999[/C][C]130.6163[/C][C]11.4287[/C][C]0.0919[/C][C]0.569[/C][/ROW]
[ROW][C]203[/C][C]0.1494[/C][C]0.14[/C][C]0.0915[/C][C]0.0977[/C][C]282.1129[/C][C]181.1152[/C][C]13.4579[/C][C]1.0913[/C][C]0.7431[/C][/ROW]
[ROW][C]204[/C][C]0.1434[/C][C]0.1821[/C][C]0.1142[/C][C]0.1234[/C][C]333.1056[/C][C]219.1128[/C][C]14.8025[/C][C]1.1858[/C][C]0.8538[/C][/ROW]
[ROW][C]205[/C][C]0.1506[/C][C]-0.0282[/C][C]0.097[/C][C]0.1043[/C][C]5.4907[/C][C]176.3883[/C][C]13.2811[/C][C]-0.1522[/C][C]0.7135[/C][/ROW]
[ROW][C]206[/C][C]0.1607[/C][C]0.0578[/C][C]0.0904[/C][C]0.0968[/C][C]32.9169[/C][C]152.4764[/C][C]12.3481[/C][C]0.3728[/C][C]0.6567[/C][/ROW]
[ROW][C]207[/C][C]0.178[/C][C]0.0773[/C][C]0.0886[/C][C]0.0945[/C][C]91.5115[/C][C]143.7672[/C][C]11.9903[/C][C]0.6215[/C][C]0.6517[/C][/ROW]
[ROW][C]208[/C][C]0.1809[/C][C]-0.0586[/C][C]0.0848[/C][C]0.0898[/C][C]37.111[/C][C]130.4351[/C][C]11.4208[/C][C]-0.3958[/C][C]0.6197[/C][/ROW]
[ROW][C]209[/C][C]0.1837[/C][C]0.0661[/C][C]0.0827[/C][C]0.0874[/C][C]56.8193[/C][C]122.2556[/C][C]11.0569[/C][C]0.4898[/C][C]0.6053[/C][/ROW]
[ROW][C]210[/C][C]0.1935[/C][C]0.0673[/C][C]0.0812[/C][C]0.0856[/C][C]67.6109[/C][C]116.7911[/C][C]10.807[/C][C]0.5342[/C][C]0.5982[/C][/ROW]
[ROW][C]211[/C][C]0.1788[/C][C]0.1328[/C][C]0.0859[/C][C]0.0908[/C][C]171.7559[/C][C]121.7879[/C][C]11.0358[/C][C]0.8515[/C][C]0.6212[/C][/ROW]
[ROW][C]212[/C][C]0.2014[/C][C]0.0365[/C][C]0.0818[/C][C]0.0863[/C][C]17.595[/C][C]113.1052[/C][C]10.6351[/C][C]0.2725[/C][C]0.5921[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310296&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310296&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.12820.12260.12260.1306259.2326001.04611.0461
2020.14750.01190.06730.07131.9999130.616311.42870.09190.569
2030.14940.140.09150.0977282.1129181.115213.45791.09130.7431
2040.14340.18210.11420.1234333.1056219.112814.80251.18580.8538
2050.1506-0.02820.0970.10435.4907176.388313.2811-0.15220.7135
2060.16070.05780.09040.096832.9169152.476412.34810.37280.6567
2070.1780.07730.08860.094591.5115143.767211.99030.62150.6517
2080.1809-0.05860.08480.089837.111130.435111.4208-0.39580.6197
2090.18370.06610.08270.087456.8193122.255611.05690.48980.6053
2100.19350.06730.08120.085667.6109116.791110.8070.53420.5982
2110.17880.13280.08590.0908171.7559121.787911.03580.85150.6212
2120.20140.03650.08180.086317.595113.105210.63510.27250.5921



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