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 computationFri, 16 Dec 2016 13:55:08 +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/2016/Dec/16/t1481893028tvvrjrrjc7038m5.htm/, Retrieved Thu, 02 May 2024 17:42:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=300232, Retrieved Thu, 02 May 2024 17:42:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact62
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2016-12-16 12:55:08] [85f5800284aab30c091766186b093bb4] [Current]
Feedback Forum

Post a new message
Dataseries X:
1819,6
1312,4
2584
1479,6
1742
2639,2
1706
1408
1951,6
1690,4
2288,4
2912
1460,8
1009,6
2410
1603,2
2115,2
2330
1690
1358
1806,8
1973,6
1402
1857,6
1974,4
1438
1923,2
1996,8
2238,8
2540,4
1704,4
1856
2214,8
1948
1802
1431,6
2857,6
1784
2770,8
2313,6
3707,6
4322,4
3297,6
2223,6
2136,4
2459,2
1650,4
2921,2
1979,6
1403,2
2374
2876,4
2500
3888
1508,8
1011,2
1590,8
2076,4
3736
2125,6
982,8
2034,8
2260
1726
2270,4
1951,6
2104,4
2972,8
2834,4
4227,6
3392,4
3069,2
3138,8
3570
4800,4
4769,2
5124,8
3476,8
2866,8
2549,2
2728
2448,8
3286,8
2830
3251,2
4188,8
2747,6
2269,2
2493,2
2147,6
2689,2
3557,2
2840
3979,6
2683,2
2852
3012,8
2950,8
3065,2
3942,4
4272
4564
5222,8
5164,4
3883,6
4103,2
5244
8071,6
5441,6
7496
10100,4
9616
5645,6
10490
5582
7579,2
4023,6
8146,4
8534,4
10113,6
8504,4
9782,4
13110
8192,8
8708,8
9528,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=300232&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=300232&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300232&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[114])
1024564-------
1035222.8-------
1045164.4-------
1053883.6-------
1064103.2-------
1075244-------
1088071.6-------
1095441.6-------
1107496-------
11110100.4-------
1129616-------
1135645.6-------
11410490-------
11555828795.43576900.719410690.15214e-040.03980.99990.0398
1167579.28795.43576715.21410875.65750.12590.99880.99970.0552
1174023.68795.43576544.948111045.923400.855310.07
1188146.48795.43576386.687711204.18380.29870.99990.99990.084
1198534.48795.43576238.20311352.66850.42070.69060.99680.097
12010113.68795.43576097.879111492.99240.16910.57520.70050.1091
1218504.48795.43575964.502311626.36920.42020.18070.98990.1204
1229782.48795.43575837.132711753.73880.25660.57650.80540.1308
123131108795.43575715.025211875.84630.0030.2650.20320.1405
1248192.88795.43575597.576911993.29460.35590.00410.30750.1495
1258708.88795.43575484.291912106.57960.47950.63940.96890.1579
1269528.88795.43575374.756512216.1150.33720.51980.16580.1658

\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[114]) \tabularnewline
102 & 4564 & - & - & - & - & - & - & - \tabularnewline
103 & 5222.8 & - & - & - & - & - & - & - \tabularnewline
104 & 5164.4 & - & - & - & - & - & - & - \tabularnewline
105 & 3883.6 & - & - & - & - & - & - & - \tabularnewline
106 & 4103.2 & - & - & - & - & - & - & - \tabularnewline
107 & 5244 & - & - & - & - & - & - & - \tabularnewline
108 & 8071.6 & - & - & - & - & - & - & - \tabularnewline
109 & 5441.6 & - & - & - & - & - & - & - \tabularnewline
110 & 7496 & - & - & - & - & - & - & - \tabularnewline
111 & 10100.4 & - & - & - & - & - & - & - \tabularnewline
112 & 9616 & - & - & - & - & - & - & - \tabularnewline
113 & 5645.6 & - & - & - & - & - & - & - \tabularnewline
114 & 10490 & - & - & - & - & - & - & - \tabularnewline
115 & 5582 & 8795.4357 & 6900.7194 & 10690.1521 & 4e-04 & 0.0398 & 0.9999 & 0.0398 \tabularnewline
116 & 7579.2 & 8795.4357 & 6715.214 & 10875.6575 & 0.1259 & 0.9988 & 0.9997 & 0.0552 \tabularnewline
117 & 4023.6 & 8795.4357 & 6544.9481 & 11045.9234 & 0 & 0.8553 & 1 & 0.07 \tabularnewline
118 & 8146.4 & 8795.4357 & 6386.6877 & 11204.1838 & 0.2987 & 0.9999 & 0.9999 & 0.084 \tabularnewline
119 & 8534.4 & 8795.4357 & 6238.203 & 11352.6685 & 0.4207 & 0.6906 & 0.9968 & 0.097 \tabularnewline
120 & 10113.6 & 8795.4357 & 6097.8791 & 11492.9924 & 0.1691 & 0.5752 & 0.7005 & 0.1091 \tabularnewline
121 & 8504.4 & 8795.4357 & 5964.5023 & 11626.3692 & 0.4202 & 0.1807 & 0.9899 & 0.1204 \tabularnewline
122 & 9782.4 & 8795.4357 & 5837.1327 & 11753.7388 & 0.2566 & 0.5765 & 0.8054 & 0.1308 \tabularnewline
123 & 13110 & 8795.4357 & 5715.0252 & 11875.8463 & 0.003 & 0.265 & 0.2032 & 0.1405 \tabularnewline
124 & 8192.8 & 8795.4357 & 5597.5769 & 11993.2946 & 0.3559 & 0.0041 & 0.3075 & 0.1495 \tabularnewline
125 & 8708.8 & 8795.4357 & 5484.2919 & 12106.5796 & 0.4795 & 0.6394 & 0.9689 & 0.1579 \tabularnewline
126 & 9528.8 & 8795.4357 & 5374.7565 & 12216.115 & 0.3372 & 0.5198 & 0.1658 & 0.1658 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300232&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[114])[/C][/ROW]
[ROW][C]102[/C][C]4564[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]5222.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]5164.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]3883.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]4103.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]5244[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]8071.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]5441.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]7496[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]10100.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]9616[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]5645.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]10490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]5582[/C][C]8795.4357[/C][C]6900.7194[/C][C]10690.1521[/C][C]4e-04[/C][C]0.0398[/C][C]0.9999[/C][C]0.0398[/C][/ROW]
[ROW][C]116[/C][C]7579.2[/C][C]8795.4357[/C][C]6715.214[/C][C]10875.6575[/C][C]0.1259[/C][C]0.9988[/C][C]0.9997[/C][C]0.0552[/C][/ROW]
[ROW][C]117[/C][C]4023.6[/C][C]8795.4357[/C][C]6544.9481[/C][C]11045.9234[/C][C]0[/C][C]0.8553[/C][C]1[/C][C]0.07[/C][/ROW]
[ROW][C]118[/C][C]8146.4[/C][C]8795.4357[/C][C]6386.6877[/C][C]11204.1838[/C][C]0.2987[/C][C]0.9999[/C][C]0.9999[/C][C]0.084[/C][/ROW]
[ROW][C]119[/C][C]8534.4[/C][C]8795.4357[/C][C]6238.203[/C][C]11352.6685[/C][C]0.4207[/C][C]0.6906[/C][C]0.9968[/C][C]0.097[/C][/ROW]
[ROW][C]120[/C][C]10113.6[/C][C]8795.4357[/C][C]6097.8791[/C][C]11492.9924[/C][C]0.1691[/C][C]0.5752[/C][C]0.7005[/C][C]0.1091[/C][/ROW]
[ROW][C]121[/C][C]8504.4[/C][C]8795.4357[/C][C]5964.5023[/C][C]11626.3692[/C][C]0.4202[/C][C]0.1807[/C][C]0.9899[/C][C]0.1204[/C][/ROW]
[ROW][C]122[/C][C]9782.4[/C][C]8795.4357[/C][C]5837.1327[/C][C]11753.7388[/C][C]0.2566[/C][C]0.5765[/C][C]0.8054[/C][C]0.1308[/C][/ROW]
[ROW][C]123[/C][C]13110[/C][C]8795.4357[/C][C]5715.0252[/C][C]11875.8463[/C][C]0.003[/C][C]0.265[/C][C]0.2032[/C][C]0.1405[/C][/ROW]
[ROW][C]124[/C][C]8192.8[/C][C]8795.4357[/C][C]5597.5769[/C][C]11993.2946[/C][C]0.3559[/C][C]0.0041[/C][C]0.3075[/C][C]0.1495[/C][/ROW]
[ROW][C]125[/C][C]8708.8[/C][C]8795.4357[/C][C]5484.2919[/C][C]12106.5796[/C][C]0.4795[/C][C]0.6394[/C][C]0.9689[/C][C]0.1579[/C][/ROW]
[ROW][C]126[/C][C]9528.8[/C][C]8795.4357[/C][C]5374.7565[/C][C]12216.115[/C][C]0.3372[/C][C]0.5198[/C][C]0.1658[/C][C]0.1658[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=300232&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300232&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[114])
1024564-------
1035222.8-------
1045164.4-------
1053883.6-------
1064103.2-------
1075244-------
1088071.6-------
1095441.6-------
1107496-------
11110100.4-------
1129616-------
1135645.6-------
11410490-------
11555828795.43576900.719410690.15214e-040.03980.99990.0398
1167579.28795.43576715.21410875.65750.12590.99880.99970.0552
1174023.68795.43576544.948111045.923400.855310.07
1188146.48795.43576386.687711204.18380.29870.99990.99990.084
1198534.48795.43576238.20311352.66850.42070.69060.99680.097
12010113.68795.43576097.879111492.99240.16910.57520.70050.1091
1218504.48795.43575964.502311626.36920.42020.18070.98990.1204
1229782.48795.43575837.132711753.73880.25660.57650.80540.1308
123131108795.43575715.025211875.84630.0030.2650.20320.1405
1248192.88795.43575597.576911993.29460.35590.00410.30750.1495
1258708.88795.43575484.291912106.57960.47950.63940.96890.1579
1269528.88795.43575374.756512216.1150.33720.51980.16580.1658







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
1150.1099-0.57570.57570.44710326169.301400-1.46611.4661
1160.1207-0.16050.36810.29781479229.39285902699.34712429.5471-0.55491.0105
1170.1305-1.1860.64070.446722770416.398311525271.69753394.8891-2.1771.3993
1180.1397-0.07970.50040.3542421247.40128749265.62342957.9158-0.29611.1235
1190.1483-0.03060.40650.289468139.66137013040.4312648.2146-0.11910.9226
1200.15650.13030.36050.26441737556.99736133793.19212476.64960.60140.8691
1210.1642-0.03420.31380.231484701.80625269637.27982295.5691-0.13280.7639
1220.17160.10090.28720.2158974098.43634732694.92432175.47580.45030.7247
1230.17870.32910.29190.235618615464.69156275224.89852505.03991.96840.8629
1240.1855-0.07360.270.2191363169.84385684019.3932384.1182-0.27490.8041
1250.1921-0.00990.24640.20017505.75275167972.69842273.3176-0.03950.7346
1260.19840.0770.23230.1901537823.12734782126.90082186.80750.33460.7013

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
115 & 0.1099 & -0.5757 & 0.5757 & 0.447 & 10326169.3014 & 0 & 0 & -1.4661 & 1.4661 \tabularnewline
116 & 0.1207 & -0.1605 & 0.3681 & 0.2978 & 1479229.3928 & 5902699.3471 & 2429.5471 & -0.5549 & 1.0105 \tabularnewline
117 & 0.1305 & -1.186 & 0.6407 & 0.4467 & 22770416.3983 & 11525271.6975 & 3394.8891 & -2.177 & 1.3993 \tabularnewline
118 & 0.1397 & -0.0797 & 0.5004 & 0.3542 & 421247.4012 & 8749265.6234 & 2957.9158 & -0.2961 & 1.1235 \tabularnewline
119 & 0.1483 & -0.0306 & 0.4065 & 0.2894 & 68139.6613 & 7013040.431 & 2648.2146 & -0.1191 & 0.9226 \tabularnewline
120 & 0.1565 & 0.1303 & 0.3605 & 0.2644 & 1737556.9973 & 6133793.1921 & 2476.6496 & 0.6014 & 0.8691 \tabularnewline
121 & 0.1642 & -0.0342 & 0.3138 & 0.2314 & 84701.8062 & 5269637.2798 & 2295.5691 & -0.1328 & 0.7639 \tabularnewline
122 & 0.1716 & 0.1009 & 0.2872 & 0.2158 & 974098.4363 & 4732694.9243 & 2175.4758 & 0.4503 & 0.7247 \tabularnewline
123 & 0.1787 & 0.3291 & 0.2919 & 0.2356 & 18615464.6915 & 6275224.8985 & 2505.0399 & 1.9684 & 0.8629 \tabularnewline
124 & 0.1855 & -0.0736 & 0.27 & 0.2191 & 363169.8438 & 5684019.393 & 2384.1182 & -0.2749 & 0.8041 \tabularnewline
125 & 0.1921 & -0.0099 & 0.2464 & 0.2001 & 7505.7527 & 5167972.6984 & 2273.3176 & -0.0395 & 0.7346 \tabularnewline
126 & 0.1984 & 0.077 & 0.2323 & 0.1901 & 537823.1273 & 4782126.9008 & 2186.8075 & 0.3346 & 0.7013 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300232&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]115[/C][C]0.1099[/C][C]-0.5757[/C][C]0.5757[/C][C]0.447[/C][C]10326169.3014[/C][C]0[/C][C]0[/C][C]-1.4661[/C][C]1.4661[/C][/ROW]
[ROW][C]116[/C][C]0.1207[/C][C]-0.1605[/C][C]0.3681[/C][C]0.2978[/C][C]1479229.3928[/C][C]5902699.3471[/C][C]2429.5471[/C][C]-0.5549[/C][C]1.0105[/C][/ROW]
[ROW][C]117[/C][C]0.1305[/C][C]-1.186[/C][C]0.6407[/C][C]0.4467[/C][C]22770416.3983[/C][C]11525271.6975[/C][C]3394.8891[/C][C]-2.177[/C][C]1.3993[/C][/ROW]
[ROW][C]118[/C][C]0.1397[/C][C]-0.0797[/C][C]0.5004[/C][C]0.3542[/C][C]421247.4012[/C][C]8749265.6234[/C][C]2957.9158[/C][C]-0.2961[/C][C]1.1235[/C][/ROW]
[ROW][C]119[/C][C]0.1483[/C][C]-0.0306[/C][C]0.4065[/C][C]0.2894[/C][C]68139.6613[/C][C]7013040.431[/C][C]2648.2146[/C][C]-0.1191[/C][C]0.9226[/C][/ROW]
[ROW][C]120[/C][C]0.1565[/C][C]0.1303[/C][C]0.3605[/C][C]0.2644[/C][C]1737556.9973[/C][C]6133793.1921[/C][C]2476.6496[/C][C]0.6014[/C][C]0.8691[/C][/ROW]
[ROW][C]121[/C][C]0.1642[/C][C]-0.0342[/C][C]0.3138[/C][C]0.2314[/C][C]84701.8062[/C][C]5269637.2798[/C][C]2295.5691[/C][C]-0.1328[/C][C]0.7639[/C][/ROW]
[ROW][C]122[/C][C]0.1716[/C][C]0.1009[/C][C]0.2872[/C][C]0.2158[/C][C]974098.4363[/C][C]4732694.9243[/C][C]2175.4758[/C][C]0.4503[/C][C]0.7247[/C][/ROW]
[ROW][C]123[/C][C]0.1787[/C][C]0.3291[/C][C]0.2919[/C][C]0.2356[/C][C]18615464.6915[/C][C]6275224.8985[/C][C]2505.0399[/C][C]1.9684[/C][C]0.8629[/C][/ROW]
[ROW][C]124[/C][C]0.1855[/C][C]-0.0736[/C][C]0.27[/C][C]0.2191[/C][C]363169.8438[/C][C]5684019.393[/C][C]2384.1182[/C][C]-0.2749[/C][C]0.8041[/C][/ROW]
[ROW][C]125[/C][C]0.1921[/C][C]-0.0099[/C][C]0.2464[/C][C]0.2001[/C][C]7505.7527[/C][C]5167972.6984[/C][C]2273.3176[/C][C]-0.0395[/C][C]0.7346[/C][/ROW]
[ROW][C]126[/C][C]0.1984[/C][C]0.077[/C][C]0.2323[/C][C]0.1901[/C][C]537823.1273[/C][C]4782126.9008[/C][C]2186.8075[/C][C]0.3346[/C][C]0.7013[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=300232&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300232&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
1150.1099-0.57570.57570.44710326169.301400-1.46611.4661
1160.1207-0.16050.36810.29781479229.39285902699.34712429.5471-0.55491.0105
1170.1305-1.1860.64070.446722770416.398311525271.69753394.8891-2.1771.3993
1180.1397-0.07970.50040.3542421247.40128749265.62342957.9158-0.29611.1235
1190.1483-0.03060.40650.289468139.66137013040.4312648.2146-0.11910.9226
1200.15650.13030.36050.26441737556.99736133793.19212476.64960.60140.8691
1210.1642-0.03420.31380.231484701.80625269637.27982295.5691-0.13280.7639
1220.17160.10090.28720.2158974098.43634732694.92432175.47580.45030.7247
1230.17870.32910.29190.235618615464.69156275224.89852505.03991.96840.8629
1240.1855-0.07360.270.2191363169.84385684019.3932384.1182-0.27490.8041
1250.1921-0.00990.24640.20017505.75275167972.69842273.3176-0.03950.7346
1260.19840.0770.23230.1901537823.12734782126.90082186.80750.33460.7013



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