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 computationMon, 19 Dec 2016 11:00:48 +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/19/t148214181035fiz9llc0hq5zc.htm/, Retrieved Sun, 19 May 2024 19:28:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=301270, Retrieved Sun, 19 May 2024 19:28:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact113
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA extrapolation ] [2016-12-19 10:00:48] [9fb47d69755d1f4b66b6f2591280f9e0] [Current]
Feedback Forum

Post a new message
Dataseries X:
4307.5
4234
5156.5
4844
4606
4850
4294
3190
3811.5
4160.5
4538.5
3792.5
4660
3504.5
3521
4560
4549
3543
2996
3762
4156.5
4525
4058
4871.5
4870
4953
5028.5
5252.5
4907
4641
5447.5
4544.5
4493
5522
3896.5
3108.5
4415
2912.5
3536
3183
3643.5
3412
3202.5
3374.5
3226.5
3927.5
3498.5
3614.5
3740
2857.5
4100
3684
3601.5
3663.5
2586.5
2825
2866.5
2722
2164
2113.5
2379
2811
3539
3474
3909.5
4049.5
3156.5
3435
3058.5
4103
3726.5
4703.5
4020.5
3636
4289
5570.5
5283
4618
4765
3937.5
4717.5
4206.5
4506.5
4306
5281.5
5495.5
5304
5935
5974
9239
6054.5
6072
6279
5260
5966
6764.5
8028.5
6063.5
7531.5
7347
6571
7337.5
7519.5
7358
4746
5173.5
6433.5
4508
4912.5
6246
7557.5
7111
6304.5
6166
5735
4583
4657.5
4712.5
5647
5277
4812.5
4702
6047
5470
4540.5
5112.5




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301270&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[114])
1027337.5-------
1037519.5-------
1047358.00000000001-------
1054746-------
1065173.50000000001-------
1076433.50000000001-------
1084508-------
1094912.5-------
1106246-------
1117557.5-------
1127111-------
1136304.5-------
1146166-------
11557356173.19014353.15868865.56660.37490.50210.16350.5021
11645836166.81923776.234510328.83930.22790.58060.28740.5002
1174657.56036.75223325.605611380.41680.30650.70310.6820.4811
1184712.56062.54453054.122512657.62670.34410.66190.60420.4877
11956476127.27352853.137714018.4090.45250.63740.46970.4962
12052776021.31822617.927514938.78940.4350.53280.63030.4873
1214812.56047.07592465.652816202.710.40580.55910.58670.4908
12247026118.52852349.170217637.20770.40480.58790.49130.4968
12360476174.66832241.384519071.73740.49230.58850.41680.5005
12454706156.78642122.283420281.82760.4620.50610.44730.4995
1254540.56121.28612009.988121437.91150.41980.53320.49060.4977
1265112.56114.71341916.345922725.53810.45290.57370.49760.4976

\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 & 7337.5 & - & - & - & - & - & - & - \tabularnewline
103 & 7519.5 & - & - & - & - & - & - & - \tabularnewline
104 & 7358.00000000001 & - & - & - & - & - & - & - \tabularnewline
105 & 4746 & - & - & - & - & - & - & - \tabularnewline
106 & 5173.50000000001 & - & - & - & - & - & - & - \tabularnewline
107 & 6433.50000000001 & - & - & - & - & - & - & - \tabularnewline
108 & 4508 & - & - & - & - & - & - & - \tabularnewline
109 & 4912.5 & - & - & - & - & - & - & - \tabularnewline
110 & 6246 & - & - & - & - & - & - & - \tabularnewline
111 & 7557.5 & - & - & - & - & - & - & - \tabularnewline
112 & 7111 & - & - & - & - & - & - & - \tabularnewline
113 & 6304.5 & - & - & - & - & - & - & - \tabularnewline
114 & 6166 & - & - & - & - & - & - & - \tabularnewline
115 & 5735 & 6173.1901 & 4353.1586 & 8865.5666 & 0.3749 & 0.5021 & 0.1635 & 0.5021 \tabularnewline
116 & 4583 & 6166.8192 & 3776.2345 & 10328.8393 & 0.2279 & 0.5806 & 0.2874 & 0.5002 \tabularnewline
117 & 4657.5 & 6036.7522 & 3325.6056 & 11380.4168 & 0.3065 & 0.7031 & 0.682 & 0.4811 \tabularnewline
118 & 4712.5 & 6062.5445 & 3054.1225 & 12657.6267 & 0.3441 & 0.6619 & 0.6042 & 0.4877 \tabularnewline
119 & 5647 & 6127.2735 & 2853.1377 & 14018.409 & 0.4525 & 0.6374 & 0.4697 & 0.4962 \tabularnewline
120 & 5277 & 6021.3182 & 2617.9275 & 14938.7894 & 0.435 & 0.5328 & 0.6303 & 0.4873 \tabularnewline
121 & 4812.5 & 6047.0759 & 2465.6528 & 16202.71 & 0.4058 & 0.5591 & 0.5867 & 0.4908 \tabularnewline
122 & 4702 & 6118.5285 & 2349.1702 & 17637.2077 & 0.4048 & 0.5879 & 0.4913 & 0.4968 \tabularnewline
123 & 6047 & 6174.6683 & 2241.3845 & 19071.7374 & 0.4923 & 0.5885 & 0.4168 & 0.5005 \tabularnewline
124 & 5470 & 6156.7864 & 2122.2834 & 20281.8276 & 0.462 & 0.5061 & 0.4473 & 0.4995 \tabularnewline
125 & 4540.5 & 6121.2861 & 2009.9881 & 21437.9115 & 0.4198 & 0.5332 & 0.4906 & 0.4977 \tabularnewline
126 & 5112.5 & 6114.7134 & 1916.3459 & 22725.5381 & 0.4529 & 0.5737 & 0.4976 & 0.4976 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301270&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]7337.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]7519.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]7358.00000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]4746[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]5173.50000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]6433.50000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]4508[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]4912.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]6246[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]7557.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]7111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]6304.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]6166[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]5735[/C][C]6173.1901[/C][C]4353.1586[/C][C]8865.5666[/C][C]0.3749[/C][C]0.5021[/C][C]0.1635[/C][C]0.5021[/C][/ROW]
[ROW][C]116[/C][C]4583[/C][C]6166.8192[/C][C]3776.2345[/C][C]10328.8393[/C][C]0.2279[/C][C]0.5806[/C][C]0.2874[/C][C]0.5002[/C][/ROW]
[ROW][C]117[/C][C]4657.5[/C][C]6036.7522[/C][C]3325.6056[/C][C]11380.4168[/C][C]0.3065[/C][C]0.7031[/C][C]0.682[/C][C]0.4811[/C][/ROW]
[ROW][C]118[/C][C]4712.5[/C][C]6062.5445[/C][C]3054.1225[/C][C]12657.6267[/C][C]0.3441[/C][C]0.6619[/C][C]0.6042[/C][C]0.4877[/C][/ROW]
[ROW][C]119[/C][C]5647[/C][C]6127.2735[/C][C]2853.1377[/C][C]14018.409[/C][C]0.4525[/C][C]0.6374[/C][C]0.4697[/C][C]0.4962[/C][/ROW]
[ROW][C]120[/C][C]5277[/C][C]6021.3182[/C][C]2617.9275[/C][C]14938.7894[/C][C]0.435[/C][C]0.5328[/C][C]0.6303[/C][C]0.4873[/C][/ROW]
[ROW][C]121[/C][C]4812.5[/C][C]6047.0759[/C][C]2465.6528[/C][C]16202.71[/C][C]0.4058[/C][C]0.5591[/C][C]0.5867[/C][C]0.4908[/C][/ROW]
[ROW][C]122[/C][C]4702[/C][C]6118.5285[/C][C]2349.1702[/C][C]17637.2077[/C][C]0.4048[/C][C]0.5879[/C][C]0.4913[/C][C]0.4968[/C][/ROW]
[ROW][C]123[/C][C]6047[/C][C]6174.6683[/C][C]2241.3845[/C][C]19071.7374[/C][C]0.4923[/C][C]0.5885[/C][C]0.4168[/C][C]0.5005[/C][/ROW]
[ROW][C]124[/C][C]5470[/C][C]6156.7864[/C][C]2122.2834[/C][C]20281.8276[/C][C]0.462[/C][C]0.5061[/C][C]0.4473[/C][C]0.4995[/C][/ROW]
[ROW][C]125[/C][C]4540.5[/C][C]6121.2861[/C][C]2009.9881[/C][C]21437.9115[/C][C]0.4198[/C][C]0.5332[/C][C]0.4906[/C][C]0.4977[/C][/ROW]
[ROW][C]126[/C][C]5112.5[/C][C]6114.7134[/C][C]1916.3459[/C][C]22725.5381[/C][C]0.4529[/C][C]0.5737[/C][C]0.4976[/C][C]0.4976[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301270&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301270&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])
1027337.5-------
1037519.5-------
1047358.00000000001-------
1054746-------
1065173.50000000001-------
1076433.50000000001-------
1084508-------
1094912.5-------
1106246-------
1117557.5-------
1127111-------
1136304.5-------
1146166-------
11557356173.19014353.15868865.56660.37490.50210.16350.5021
11645836166.81923776.234510328.83930.22790.58060.28740.5002
1174657.56036.75223325.605611380.41680.30650.70310.6820.4811
1184712.56062.54453054.122512657.62670.34410.66190.60420.4877
11956476127.27352853.137714018.4090.45250.63740.46970.4962
12052776021.31822617.927514938.78940.4350.53280.63030.4873
1214812.56047.07592465.652816202.710.40580.55910.58670.4908
12247026118.52852349.170217637.20770.40480.58790.49130.4968
12360476174.66832241.384519071.73740.49230.58850.41680.5005
12454706156.78642122.283420281.82760.4620.50610.44730.4995
1254540.56121.28612009.988121437.91150.41980.53320.49060.4977
1265112.56114.71341916.345922725.53810.45290.57370.49760.4976







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
1150.2225-0.07640.07640.0736192010.56200-0.7320.732
1160.3443-0.34560.2110.18412508483.12291350246.84251162.0012-2.64591.689
1170.4516-0.29610.23940.20871902336.53381534276.73961238.6593-2.30421.894
1180.555-0.28650.25120.21921822620.18181606362.60011267.4236-2.25541.9844
1190.6571-0.0850.21790.1917230662.63431331222.6071153.7862-0.80231.748
1200.7556-0.1410.20510.1817554009.56891201687.10061096.2149-1.24351.6639
1210.8569-0.25650.21250.18821524177.57011247757.16771117.0305-2.06251.7208
1220.9605-0.30130.22360.19742006553.05481342606.65361158.709-2.36641.8015
1231.0657-0.02110.20110.177816299.19711195239.15841093.2699-0.21331.6251
1241.1705-0.12560.19350.1718471675.5031122882.79291059.6616-1.14731.5773
1251.2766-0.34820.20760.18322498884.77931247973.88251117.1275-2.64081.674
1261.386-0.1960.20660.18281004431.6021227678.69251108.0066-1.67431.674

\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.2225 & -0.0764 & 0.0764 & 0.0736 & 192010.562 & 0 & 0 & -0.732 & 0.732 \tabularnewline
116 & 0.3443 & -0.3456 & 0.211 & 0.1841 & 2508483.1229 & 1350246.8425 & 1162.0012 & -2.6459 & 1.689 \tabularnewline
117 & 0.4516 & -0.2961 & 0.2394 & 0.2087 & 1902336.5338 & 1534276.7396 & 1238.6593 & -2.3042 & 1.894 \tabularnewline
118 & 0.555 & -0.2865 & 0.2512 & 0.2192 & 1822620.1818 & 1606362.6001 & 1267.4236 & -2.2554 & 1.9844 \tabularnewline
119 & 0.6571 & -0.085 & 0.2179 & 0.1917 & 230662.6343 & 1331222.607 & 1153.7862 & -0.8023 & 1.748 \tabularnewline
120 & 0.7556 & -0.141 & 0.2051 & 0.1817 & 554009.5689 & 1201687.1006 & 1096.2149 & -1.2435 & 1.6639 \tabularnewline
121 & 0.8569 & -0.2565 & 0.2125 & 0.1882 & 1524177.5701 & 1247757.1677 & 1117.0305 & -2.0625 & 1.7208 \tabularnewline
122 & 0.9605 & -0.3013 & 0.2236 & 0.1974 & 2006553.0548 & 1342606.6536 & 1158.709 & -2.3664 & 1.8015 \tabularnewline
123 & 1.0657 & -0.0211 & 0.2011 & 0.1778 & 16299.1971 & 1195239.1584 & 1093.2699 & -0.2133 & 1.6251 \tabularnewline
124 & 1.1705 & -0.1256 & 0.1935 & 0.1718 & 471675.503 & 1122882.7929 & 1059.6616 & -1.1473 & 1.5773 \tabularnewline
125 & 1.2766 & -0.3482 & 0.2076 & 0.1832 & 2498884.7793 & 1247973.8825 & 1117.1275 & -2.6408 & 1.674 \tabularnewline
126 & 1.386 & -0.196 & 0.2066 & 0.1828 & 1004431.602 & 1227678.6925 & 1108.0066 & -1.6743 & 1.674 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301270&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.2225[/C][C]-0.0764[/C][C]0.0764[/C][C]0.0736[/C][C]192010.562[/C][C]0[/C][C]0[/C][C]-0.732[/C][C]0.732[/C][/ROW]
[ROW][C]116[/C][C]0.3443[/C][C]-0.3456[/C][C]0.211[/C][C]0.1841[/C][C]2508483.1229[/C][C]1350246.8425[/C][C]1162.0012[/C][C]-2.6459[/C][C]1.689[/C][/ROW]
[ROW][C]117[/C][C]0.4516[/C][C]-0.2961[/C][C]0.2394[/C][C]0.2087[/C][C]1902336.5338[/C][C]1534276.7396[/C][C]1238.6593[/C][C]-2.3042[/C][C]1.894[/C][/ROW]
[ROW][C]118[/C][C]0.555[/C][C]-0.2865[/C][C]0.2512[/C][C]0.2192[/C][C]1822620.1818[/C][C]1606362.6001[/C][C]1267.4236[/C][C]-2.2554[/C][C]1.9844[/C][/ROW]
[ROW][C]119[/C][C]0.6571[/C][C]-0.085[/C][C]0.2179[/C][C]0.1917[/C][C]230662.6343[/C][C]1331222.607[/C][C]1153.7862[/C][C]-0.8023[/C][C]1.748[/C][/ROW]
[ROW][C]120[/C][C]0.7556[/C][C]-0.141[/C][C]0.2051[/C][C]0.1817[/C][C]554009.5689[/C][C]1201687.1006[/C][C]1096.2149[/C][C]-1.2435[/C][C]1.6639[/C][/ROW]
[ROW][C]121[/C][C]0.8569[/C][C]-0.2565[/C][C]0.2125[/C][C]0.1882[/C][C]1524177.5701[/C][C]1247757.1677[/C][C]1117.0305[/C][C]-2.0625[/C][C]1.7208[/C][/ROW]
[ROW][C]122[/C][C]0.9605[/C][C]-0.3013[/C][C]0.2236[/C][C]0.1974[/C][C]2006553.0548[/C][C]1342606.6536[/C][C]1158.709[/C][C]-2.3664[/C][C]1.8015[/C][/ROW]
[ROW][C]123[/C][C]1.0657[/C][C]-0.0211[/C][C]0.2011[/C][C]0.1778[/C][C]16299.1971[/C][C]1195239.1584[/C][C]1093.2699[/C][C]-0.2133[/C][C]1.6251[/C][/ROW]
[ROW][C]124[/C][C]1.1705[/C][C]-0.1256[/C][C]0.1935[/C][C]0.1718[/C][C]471675.503[/C][C]1122882.7929[/C][C]1059.6616[/C][C]-1.1473[/C][C]1.5773[/C][/ROW]
[ROW][C]125[/C][C]1.2766[/C][C]-0.3482[/C][C]0.2076[/C][C]0.1832[/C][C]2498884.7793[/C][C]1247973.8825[/C][C]1117.1275[/C][C]-2.6408[/C][C]1.674[/C][/ROW]
[ROW][C]126[/C][C]1.386[/C][C]-0.196[/C][C]0.2066[/C][C]0.1828[/C][C]1004431.602[/C][C]1227678.6925[/C][C]1108.0066[/C][C]-1.6743[/C][C]1.674[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301270&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301270&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.2225-0.07640.07640.0736192010.56200-0.7320.732
1160.3443-0.34560.2110.18412508483.12291350246.84251162.0012-2.64591.689
1170.4516-0.29610.23940.20871902336.53381534276.73961238.6593-2.30421.894
1180.555-0.28650.25120.21921822620.18181606362.60011267.4236-2.25541.9844
1190.6571-0.0850.21790.1917230662.63431331222.6071153.7862-0.80231.748
1200.7556-0.1410.20510.1817554009.56891201687.10061096.2149-1.24351.6639
1210.8569-0.25650.21250.18821524177.57011247757.16771117.0305-2.06251.7208
1220.9605-0.30130.22360.19742006553.05481342606.65361158.709-2.36641.8015
1231.0657-0.02110.20110.177816299.19711195239.15841093.2699-0.21331.6251
1241.1705-0.12560.19350.1718471675.5031122882.79291059.6616-1.14731.5773
1251.2766-0.34820.20760.18322498884.77931247973.88251117.1275-2.64081.674
1261.386-0.1960.20660.18281004431.6021227678.69251108.0066-1.67431.674



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