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, 20 Dec 2016 19:56:13 +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/20/t1482262742qhh0ymy3a51sm2m.htm/, Retrieved Sat, 27 Apr 2024 16:19:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=301789, Retrieved Sat, 27 Apr 2024 16:19:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact54
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2016-12-20 18:56:13] [b7216e4bc5ee29192acbe9c506cee18c] [Current]
Feedback Forum

Post a new message
Dataseries X:
3450.3
2328.96
2610.24
3974.04
2025.3
3991.02
2636.88
2980.98
3813.36
2709.42
2772
3482.64
3752.64
2873.16
2667.84
4810.8
2247.54
4156.92
3121.02
3312.54
4081.14
3135.06
3089.64
3744.24
4227.24
3241.26
2976.36
5675.58
2387.64
4329.06
3478.2
3346.56
4428.48
3473.16
3069.78
4091.58
4602.6
3202.2
2973.42
5486.28
2774.76
4621.44
3778.44
3391.38
4680.78
3540.72
3178.02
4682.1
4906.26
3327.78
3390.9
7373.82
2861.46
4976.7
3853.38
3612.78
5544.6
3737.7
3414.9
5128.14
4904.4
3616.74
3939.84
6555.96
3578.1
5948.4
3637.86
4163.4
5864.52
3814.92
3859.2
5619.3
5358.36
3713.82
4092.3
7733.52
4261.5
6494.94
3971.46
4568.16
5953.98
4105.56
4272.78
5347.8
5971.44
3908.46
3888.3
8376.24
4151.16
6636.06
4339.74
4707.72
6176.34
4619.16
4230.42
6114
6042.78
4059.42
3888.3
8422.8
3813.6
6203.34
4715.58
4585.56
6561
4683.9
4385.7
6218.16
6241.86
3764.82
4327.62
8301.06
3731.04
7252.68
4743
4686.06




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301789&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[104])
924707.72-------
936176.34-------
944619.16-------
954230.42-------
966114-------
976042.78-------
984059.42-------
993888.3-------
1008422.8-------
1013813.6-------
1026203.34-------
1034715.58-------
1044585.56-------
10565616235.1355436.44957208.26450.25580.99960.54710.9996
1064683.94781.38394224.57125446.61890.38700.68370.718
1074385.74238.31683764.03184800.67850.30370.06020.5110.1131
1086218.166183.19485327.45227244.47060.47430.99950.55080.9984
1096241.866303.82175425.71117394.53960.45570.56120.68050.999
1103764.824136.58943638.06634736.25370.112200.59960.0711
1114327.624054.78173558.99924652.91580.18560.8290.70730.041
1128301.068674.95577275.659710482.07050.342510.60781
1133731.043840.09583373.97924401.59680.351700.53680.0046
1147252.686543.90135569.82767774.22340.129410.70630.9991
11547434817.63584171.34615613.2930.427100.59920.7162
1164686.064764.15754122.32775555.09950.42330.52090.6710.671

\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[104]) \tabularnewline
92 & 4707.72 & - & - & - & - & - & - & - \tabularnewline
93 & 6176.34 & - & - & - & - & - & - & - \tabularnewline
94 & 4619.16 & - & - & - & - & - & - & - \tabularnewline
95 & 4230.42 & - & - & - & - & - & - & - \tabularnewline
96 & 6114 & - & - & - & - & - & - & - \tabularnewline
97 & 6042.78 & - & - & - & - & - & - & - \tabularnewline
98 & 4059.42 & - & - & - & - & - & - & - \tabularnewline
99 & 3888.3 & - & - & - & - & - & - & - \tabularnewline
100 & 8422.8 & - & - & - & - & - & - & - \tabularnewline
101 & 3813.6 & - & - & - & - & - & - & - \tabularnewline
102 & 6203.34 & - & - & - & - & - & - & - \tabularnewline
103 & 4715.58 & - & - & - & - & - & - & - \tabularnewline
104 & 4585.56 & - & - & - & - & - & - & - \tabularnewline
105 & 6561 & 6235.135 & 5436.4495 & 7208.2645 & 0.2558 & 0.9996 & 0.5471 & 0.9996 \tabularnewline
106 & 4683.9 & 4781.3839 & 4224.5712 & 5446.6189 & 0.387 & 0 & 0.6837 & 0.718 \tabularnewline
107 & 4385.7 & 4238.3168 & 3764.0318 & 4800.6785 & 0.3037 & 0.0602 & 0.511 & 0.1131 \tabularnewline
108 & 6218.16 & 6183.1948 & 5327.4522 & 7244.4706 & 0.4743 & 0.9995 & 0.5508 & 0.9984 \tabularnewline
109 & 6241.86 & 6303.8217 & 5425.7111 & 7394.5396 & 0.4557 & 0.5612 & 0.6805 & 0.999 \tabularnewline
110 & 3764.82 & 4136.5894 & 3638.0663 & 4736.2537 & 0.1122 & 0 & 0.5996 & 0.0711 \tabularnewline
111 & 4327.62 & 4054.7817 & 3558.9992 & 4652.9158 & 0.1856 & 0.829 & 0.7073 & 0.041 \tabularnewline
112 & 8301.06 & 8674.9557 & 7275.6597 & 10482.0705 & 0.3425 & 1 & 0.6078 & 1 \tabularnewline
113 & 3731.04 & 3840.0958 & 3373.9792 & 4401.5968 & 0.3517 & 0 & 0.5368 & 0.0046 \tabularnewline
114 & 7252.68 & 6543.9013 & 5569.8276 & 7774.2234 & 0.1294 & 1 & 0.7063 & 0.9991 \tabularnewline
115 & 4743 & 4817.6358 & 4171.3461 & 5613.293 & 0.4271 & 0 & 0.5992 & 0.7162 \tabularnewline
116 & 4686.06 & 4764.1575 & 4122.3277 & 5555.0995 & 0.4233 & 0.5209 & 0.671 & 0.671 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301789&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[104])[/C][/ROW]
[ROW][C]92[/C][C]4707.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]6176.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]4619.16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]4230.42[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]6114[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]6042.78[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]4059.42[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]3888.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]8422.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]3813.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]6203.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]4715.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]4585.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]6561[/C][C]6235.135[/C][C]5436.4495[/C][C]7208.2645[/C][C]0.2558[/C][C]0.9996[/C][C]0.5471[/C][C]0.9996[/C][/ROW]
[ROW][C]106[/C][C]4683.9[/C][C]4781.3839[/C][C]4224.5712[/C][C]5446.6189[/C][C]0.387[/C][C]0[/C][C]0.6837[/C][C]0.718[/C][/ROW]
[ROW][C]107[/C][C]4385.7[/C][C]4238.3168[/C][C]3764.0318[/C][C]4800.6785[/C][C]0.3037[/C][C]0.0602[/C][C]0.511[/C][C]0.1131[/C][/ROW]
[ROW][C]108[/C][C]6218.16[/C][C]6183.1948[/C][C]5327.4522[/C][C]7244.4706[/C][C]0.4743[/C][C]0.9995[/C][C]0.5508[/C][C]0.9984[/C][/ROW]
[ROW][C]109[/C][C]6241.86[/C][C]6303.8217[/C][C]5425.7111[/C][C]7394.5396[/C][C]0.4557[/C][C]0.5612[/C][C]0.6805[/C][C]0.999[/C][/ROW]
[ROW][C]110[/C][C]3764.82[/C][C]4136.5894[/C][C]3638.0663[/C][C]4736.2537[/C][C]0.1122[/C][C]0[/C][C]0.5996[/C][C]0.0711[/C][/ROW]
[ROW][C]111[/C][C]4327.62[/C][C]4054.7817[/C][C]3558.9992[/C][C]4652.9158[/C][C]0.1856[/C][C]0.829[/C][C]0.7073[/C][C]0.041[/C][/ROW]
[ROW][C]112[/C][C]8301.06[/C][C]8674.9557[/C][C]7275.6597[/C][C]10482.0705[/C][C]0.3425[/C][C]1[/C][C]0.6078[/C][C]1[/C][/ROW]
[ROW][C]113[/C][C]3731.04[/C][C]3840.0958[/C][C]3373.9792[/C][C]4401.5968[/C][C]0.3517[/C][C]0[/C][C]0.5368[/C][C]0.0046[/C][/ROW]
[ROW][C]114[/C][C]7252.68[/C][C]6543.9013[/C][C]5569.8276[/C][C]7774.2234[/C][C]0.1294[/C][C]1[/C][C]0.7063[/C][C]0.9991[/C][/ROW]
[ROW][C]115[/C][C]4743[/C][C]4817.6358[/C][C]4171.3461[/C][C]5613.293[/C][C]0.4271[/C][C]0[/C][C]0.5992[/C][C]0.7162[/C][/ROW]
[ROW][C]116[/C][C]4686.06[/C][C]4764.1575[/C][C]4122.3277[/C][C]5555.0995[/C][C]0.4233[/C][C]0.5209[/C][C]0.671[/C][C]0.671[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301789&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301789&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[104])
924707.72-------
936176.34-------
944619.16-------
954230.42-------
966114-------
976042.78-------
984059.42-------
993888.3-------
1008422.8-------
1013813.6-------
1026203.34-------
1034715.58-------
1044585.56-------
10565616235.1355436.44957208.26450.25580.99960.54710.9996
1064683.94781.38394224.57125446.61890.38700.68370.718
1074385.74238.31683764.03184800.67850.30370.06020.5110.1131
1086218.166183.19485327.45227244.47060.47430.99950.55080.9984
1096241.866303.82175425.71117394.53960.45570.56120.68050.999
1103764.824136.58943638.06634736.25370.112200.59960.0711
1114327.624054.78173558.99924652.91580.18560.8290.70730.041
1128301.068674.95577275.659710482.07050.342510.60781
1133731.043840.09583373.97924401.59680.351700.53680.0046
1147252.686543.90135569.82767774.22340.129410.70630.9991
11547434817.63584171.34615613.2930.427100.59920.7162
1164686.064764.15754122.32775555.09950.42330.52090.6710.671







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
1050.07960.04970.04970.0509106188.0083000.16520.1652
1060.071-0.02080.03520.03589503.102157845.5552240.511-0.04940.1073
1070.06770.03360.03470.035221721.821245804.3105214.01940.07470.0964
1080.08760.00560.02740.02781222.562934658.8736186.16890.01770.0767
1090.0883-0.00990.02390.02423839.256128494.9501168.8045-0.03140.0677
1100.074-0.09870.03640.0359138212.457646781.2014216.2896-0.18840.0878
1110.07530.0630.04020.040174440.727750732.5623225.23890.13830.095
1120.1063-0.0450.04080.0406139797.958761865.7368248.7282-0.18950.1068
1130.0746-0.02920.03950.039311893.164156313.2287237.3041-0.05530.1011
1140.09590.09770.04530.0456502367.2141100918.6273317.67690.35920.1269
1150.0843-0.01570.04270.04295570.506192250.6163303.7279-0.03780.1188
1160.0847-0.01670.04050.04076099.214585071.3328291.6699-0.03960.1122

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
105 & 0.0796 & 0.0497 & 0.0497 & 0.0509 & 106188.0083 & 0 & 0 & 0.1652 & 0.1652 \tabularnewline
106 & 0.071 & -0.0208 & 0.0352 & 0.0358 & 9503.1021 & 57845.5552 & 240.511 & -0.0494 & 0.1073 \tabularnewline
107 & 0.0677 & 0.0336 & 0.0347 & 0.0352 & 21721.8212 & 45804.3105 & 214.0194 & 0.0747 & 0.0964 \tabularnewline
108 & 0.0876 & 0.0056 & 0.0274 & 0.0278 & 1222.5629 & 34658.8736 & 186.1689 & 0.0177 & 0.0767 \tabularnewline
109 & 0.0883 & -0.0099 & 0.0239 & 0.0242 & 3839.2561 & 28494.9501 & 168.8045 & -0.0314 & 0.0677 \tabularnewline
110 & 0.074 & -0.0987 & 0.0364 & 0.0359 & 138212.4576 & 46781.2014 & 216.2896 & -0.1884 & 0.0878 \tabularnewline
111 & 0.0753 & 0.063 & 0.0402 & 0.0401 & 74440.7277 & 50732.5623 & 225.2389 & 0.1383 & 0.095 \tabularnewline
112 & 0.1063 & -0.045 & 0.0408 & 0.0406 & 139797.9587 & 61865.7368 & 248.7282 & -0.1895 & 0.1068 \tabularnewline
113 & 0.0746 & -0.0292 & 0.0395 & 0.0393 & 11893.1641 & 56313.2287 & 237.3041 & -0.0553 & 0.1011 \tabularnewline
114 & 0.0959 & 0.0977 & 0.0453 & 0.0456 & 502367.2141 & 100918.6273 & 317.6769 & 0.3592 & 0.1269 \tabularnewline
115 & 0.0843 & -0.0157 & 0.0427 & 0.0429 & 5570.5061 & 92250.6163 & 303.7279 & -0.0378 & 0.1188 \tabularnewline
116 & 0.0847 & -0.0167 & 0.0405 & 0.0407 & 6099.2145 & 85071.3328 & 291.6699 & -0.0396 & 0.1122 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301789&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]105[/C][C]0.0796[/C][C]0.0497[/C][C]0.0497[/C][C]0.0509[/C][C]106188.0083[/C][C]0[/C][C]0[/C][C]0.1652[/C][C]0.1652[/C][/ROW]
[ROW][C]106[/C][C]0.071[/C][C]-0.0208[/C][C]0.0352[/C][C]0.0358[/C][C]9503.1021[/C][C]57845.5552[/C][C]240.511[/C][C]-0.0494[/C][C]0.1073[/C][/ROW]
[ROW][C]107[/C][C]0.0677[/C][C]0.0336[/C][C]0.0347[/C][C]0.0352[/C][C]21721.8212[/C][C]45804.3105[/C][C]214.0194[/C][C]0.0747[/C][C]0.0964[/C][/ROW]
[ROW][C]108[/C][C]0.0876[/C][C]0.0056[/C][C]0.0274[/C][C]0.0278[/C][C]1222.5629[/C][C]34658.8736[/C][C]186.1689[/C][C]0.0177[/C][C]0.0767[/C][/ROW]
[ROW][C]109[/C][C]0.0883[/C][C]-0.0099[/C][C]0.0239[/C][C]0.0242[/C][C]3839.2561[/C][C]28494.9501[/C][C]168.8045[/C][C]-0.0314[/C][C]0.0677[/C][/ROW]
[ROW][C]110[/C][C]0.074[/C][C]-0.0987[/C][C]0.0364[/C][C]0.0359[/C][C]138212.4576[/C][C]46781.2014[/C][C]216.2896[/C][C]-0.1884[/C][C]0.0878[/C][/ROW]
[ROW][C]111[/C][C]0.0753[/C][C]0.063[/C][C]0.0402[/C][C]0.0401[/C][C]74440.7277[/C][C]50732.5623[/C][C]225.2389[/C][C]0.1383[/C][C]0.095[/C][/ROW]
[ROW][C]112[/C][C]0.1063[/C][C]-0.045[/C][C]0.0408[/C][C]0.0406[/C][C]139797.9587[/C][C]61865.7368[/C][C]248.7282[/C][C]-0.1895[/C][C]0.1068[/C][/ROW]
[ROW][C]113[/C][C]0.0746[/C][C]-0.0292[/C][C]0.0395[/C][C]0.0393[/C][C]11893.1641[/C][C]56313.2287[/C][C]237.3041[/C][C]-0.0553[/C][C]0.1011[/C][/ROW]
[ROW][C]114[/C][C]0.0959[/C][C]0.0977[/C][C]0.0453[/C][C]0.0456[/C][C]502367.2141[/C][C]100918.6273[/C][C]317.6769[/C][C]0.3592[/C][C]0.1269[/C][/ROW]
[ROW][C]115[/C][C]0.0843[/C][C]-0.0157[/C][C]0.0427[/C][C]0.0429[/C][C]5570.5061[/C][C]92250.6163[/C][C]303.7279[/C][C]-0.0378[/C][C]0.1188[/C][/ROW]
[ROW][C]116[/C][C]0.0847[/C][C]-0.0167[/C][C]0.0405[/C][C]0.0407[/C][C]6099.2145[/C][C]85071.3328[/C][C]291.6699[/C][C]-0.0396[/C][C]0.1122[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301789&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301789&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
1050.07960.04970.04970.0509106188.0083000.16520.1652
1060.071-0.02080.03520.03589503.102157845.5552240.511-0.04940.1073
1070.06770.03360.03470.035221721.821245804.3105214.01940.07470.0964
1080.08760.00560.02740.02781222.562934658.8736186.16890.01770.0767
1090.0883-0.00990.02390.02423839.256128494.9501168.8045-0.03140.0677
1100.074-0.09870.03640.0359138212.457646781.2014216.2896-0.18840.0878
1110.07530.0630.04020.040174440.727750732.5623225.23890.13830.095
1120.1063-0.0450.04080.0406139797.958761865.7368248.7282-0.18950.1068
1130.0746-0.02920.03950.039311893.164156313.2287237.3041-0.05530.1011
1140.09590.09770.04530.0456502367.2141100918.6273317.67690.35920.1269
1150.0843-0.01570.04270.04295570.506192250.6163303.7279-0.03780.1188
1160.0847-0.01670.04050.04076099.214585071.3328291.6699-0.03960.1122



Parameters (Session):
par1 = FALSE ; par2 = -0.4 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 1 ; par9 = 1 ;
Parameters (R input):
par1 = 12 ; par2 = -0.4 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 1 ; par9 = 1 ; par10 = FALSE ;
R code (references can be found in the software module):
par10 <- 'FALSE'
par9 <- '1'
par8 <- '1'
par7 <- '1'
par6 <- '3'
par5 <- '12'
par4 <- '1'
par3 <- '1'
par2 <- '-0.4'
par1 <- '0'
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')