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, 13 Dec 2016 12:23:43 +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/13/t14816282345igadjizyvelfgg.htm/, Retrieved Sat, 04 May 2024 23:09:43 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=299066, Retrieved Sat, 04 May 2024 23:09:43 +0000
QR Codes:

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

Post a new message
Dataseries X:
4028.8
4076.6
4125.8
4177.2
4183
4222.6
4255.8
4260.8
4279.2
4328.8
4356.6
4393
4419.4
4426.2
4467.2
4517.4
4517
4560.4
4589
4596
4621.2
4654.6
4708.6
4774.4
4824.8
4839
4869.8
4895.8
4895.8
4968.8
5010
5032.4
5054
5083.8
5117.4
5170.8
5182.2
5163.6
5212.6
5288
5303.4
5367.6
5433.8
5465.8
5493.8
5549.4
5590.2
5661.2
5699
5654.2
5671.8
5730.8
5693
5720.4
5747.8
5764.2
5783
5822.4
5836.2
5864.6
5913.4
5906.8
5954
6031.2
6011.2
6059.8
6091.6
6088
6082.2
6108
6151.4
6187
6190
6152.2
6183.8
6222.8
6165.8
6223.4
6292.8
6320.6
6344
6391.2
6443.4
6504
6520.2
6518.8
6563.8
6614
6555.6
6601.8
6632.4
6657.8
6674.4
6687
6697.6
6732
6736.4
6745.8
6805.2
6850.4
6807.2
6844.6
6850.8
6848.2
6837.8
6857.6
6900.8
6940.8
6937.4
6950.4
6978.8
6997.8
6934.8
6946.8
6956.2
6968.2




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299066&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[104])
926657.8-------
936674.4-------
946687-------
956697.60000000001-------
966732-------
976736.4-------
986745.80000000001-------
996805.2-------
1006850.4-------
1016807.2-------
1026844.6-------
1036850.79999999999-------
1046848.2-------
1056837.86849.1556803.49436895.12220.31410.516210.5162
1066857.66857.00266765.20936950.04130.4950.65710.99980.5736
1076900.86866.26846737.57726997.41770.30290.55150.99410.6064
1086940.86901.02686741.38337064.45080.31670.50110.97870.7368
1096937.46905.37716719.82057096.05750.3710.35790.95880.7216
1106950.46914.96236706.44377129.96420.37330.4190.93850.7286
1116978.86975.83586744.88797214.69140.49030.58270.91930.8525
1126997.87022.1646770.72197282.94390.42740.62780.90160.9045
1136934.86977.87936710.57087255.83570.38070.44410.88560.8198
1146946.87016.21656731.02797313.48840.32360.70430.87110.866
1156956.27022.57186721.64677336.96910.33950.68170.85790.8615
1166968.27019.90656704.42937350.22860.37950.64730.84590.8459

\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 & 6657.8 & - & - & - & - & - & - & - \tabularnewline
93 & 6674.4 & - & - & - & - & - & - & - \tabularnewline
94 & 6687 & - & - & - & - & - & - & - \tabularnewline
95 & 6697.60000000001 & - & - & - & - & - & - & - \tabularnewline
96 & 6732 & - & - & - & - & - & - & - \tabularnewline
97 & 6736.4 & - & - & - & - & - & - & - \tabularnewline
98 & 6745.80000000001 & - & - & - & - & - & - & - \tabularnewline
99 & 6805.2 & - & - & - & - & - & - & - \tabularnewline
100 & 6850.4 & - & - & - & - & - & - & - \tabularnewline
101 & 6807.2 & - & - & - & - & - & - & - \tabularnewline
102 & 6844.6 & - & - & - & - & - & - & - \tabularnewline
103 & 6850.79999999999 & - & - & - & - & - & - & - \tabularnewline
104 & 6848.2 & - & - & - & - & - & - & - \tabularnewline
105 & 6837.8 & 6849.155 & 6803.4943 & 6895.1222 & 0.3141 & 0.5162 & 1 & 0.5162 \tabularnewline
106 & 6857.6 & 6857.0026 & 6765.2093 & 6950.0413 & 0.495 & 0.6571 & 0.9998 & 0.5736 \tabularnewline
107 & 6900.8 & 6866.2684 & 6737.5772 & 6997.4177 & 0.3029 & 0.5515 & 0.9941 & 0.6064 \tabularnewline
108 & 6940.8 & 6901.0268 & 6741.3833 & 7064.4508 & 0.3167 & 0.5011 & 0.9787 & 0.7368 \tabularnewline
109 & 6937.4 & 6905.3771 & 6719.8205 & 7096.0575 & 0.371 & 0.3579 & 0.9588 & 0.7216 \tabularnewline
110 & 6950.4 & 6914.9623 & 6706.4437 & 7129.9642 & 0.3733 & 0.419 & 0.9385 & 0.7286 \tabularnewline
111 & 6978.8 & 6975.8358 & 6744.8879 & 7214.6914 & 0.4903 & 0.5827 & 0.9193 & 0.8525 \tabularnewline
112 & 6997.8 & 7022.164 & 6770.7219 & 7282.9439 & 0.4274 & 0.6278 & 0.9016 & 0.9045 \tabularnewline
113 & 6934.8 & 6977.8793 & 6710.5708 & 7255.8357 & 0.3807 & 0.4441 & 0.8856 & 0.8198 \tabularnewline
114 & 6946.8 & 7016.2165 & 6731.0279 & 7313.4884 & 0.3236 & 0.7043 & 0.8711 & 0.866 \tabularnewline
115 & 6956.2 & 7022.5718 & 6721.6467 & 7336.9691 & 0.3395 & 0.6817 & 0.8579 & 0.8615 \tabularnewline
116 & 6968.2 & 7019.9065 & 6704.4293 & 7350.2286 & 0.3795 & 0.6473 & 0.8459 & 0.8459 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299066&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]6657.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]6674.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]6687[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]6697.60000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]6732[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]6736.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]6745.80000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]6805.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]6850.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]6807.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]6844.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]6850.79999999999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]6848.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]6837.8[/C][C]6849.155[/C][C]6803.4943[/C][C]6895.1222[/C][C]0.3141[/C][C]0.5162[/C][C]1[/C][C]0.5162[/C][/ROW]
[ROW][C]106[/C][C]6857.6[/C][C]6857.0026[/C][C]6765.2093[/C][C]6950.0413[/C][C]0.495[/C][C]0.6571[/C][C]0.9998[/C][C]0.5736[/C][/ROW]
[ROW][C]107[/C][C]6900.8[/C][C]6866.2684[/C][C]6737.5772[/C][C]6997.4177[/C][C]0.3029[/C][C]0.5515[/C][C]0.9941[/C][C]0.6064[/C][/ROW]
[ROW][C]108[/C][C]6940.8[/C][C]6901.0268[/C][C]6741.3833[/C][C]7064.4508[/C][C]0.3167[/C][C]0.5011[/C][C]0.9787[/C][C]0.7368[/C][/ROW]
[ROW][C]109[/C][C]6937.4[/C][C]6905.3771[/C][C]6719.8205[/C][C]7096.0575[/C][C]0.371[/C][C]0.3579[/C][C]0.9588[/C][C]0.7216[/C][/ROW]
[ROW][C]110[/C][C]6950.4[/C][C]6914.9623[/C][C]6706.4437[/C][C]7129.9642[/C][C]0.3733[/C][C]0.419[/C][C]0.9385[/C][C]0.7286[/C][/ROW]
[ROW][C]111[/C][C]6978.8[/C][C]6975.8358[/C][C]6744.8879[/C][C]7214.6914[/C][C]0.4903[/C][C]0.5827[/C][C]0.9193[/C][C]0.8525[/C][/ROW]
[ROW][C]112[/C][C]6997.8[/C][C]7022.164[/C][C]6770.7219[/C][C]7282.9439[/C][C]0.4274[/C][C]0.6278[/C][C]0.9016[/C][C]0.9045[/C][/ROW]
[ROW][C]113[/C][C]6934.8[/C][C]6977.8793[/C][C]6710.5708[/C][C]7255.8357[/C][C]0.3807[/C][C]0.4441[/C][C]0.8856[/C][C]0.8198[/C][/ROW]
[ROW][C]114[/C][C]6946.8[/C][C]7016.2165[/C][C]6731.0279[/C][C]7313.4884[/C][C]0.3236[/C][C]0.7043[/C][C]0.8711[/C][C]0.866[/C][/ROW]
[ROW][C]115[/C][C]6956.2[/C][C]7022.5718[/C][C]6721.6467[/C][C]7336.9691[/C][C]0.3395[/C][C]0.6817[/C][C]0.8579[/C][C]0.8615[/C][/ROW]
[ROW][C]116[/C][C]6968.2[/C][C]7019.9065[/C][C]6704.4293[/C][C]7350.2286[/C][C]0.3795[/C][C]0.6473[/C][C]0.8459[/C][C]0.8459[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299066&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299066&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])
926657.8-------
936674.4-------
946687-------
956697.60000000001-------
966732-------
976736.4-------
986745.80000000001-------
996805.2-------
1006850.4-------
1016807.2-------
1026844.6-------
1036850.79999999999-------
1046848.2-------
1056837.86849.1556803.49436895.12220.31410.516210.5162
1066857.66857.00266765.20936950.04130.4950.65710.99980.5736
1076900.86866.26846737.57726997.41770.30290.55150.99410.6064
1086940.86901.02686741.38337064.45080.31670.50110.97870.7368
1096937.46905.37716719.82057096.05750.3710.35790.95880.7216
1106950.46914.96236706.44377129.96420.37330.4190.93850.7286
1116978.86975.83586744.88797214.69140.49030.58270.91930.8525
1126997.87022.1646770.72197282.94390.42740.62780.90160.9045
1136934.86977.87936710.57087255.83570.38070.44410.88560.8198
1146946.87016.21656731.02797313.48840.32360.70430.87110.866
1156956.27022.57186721.64677336.96910.33950.68170.85790.8615
1166968.27019.90656704.42937350.22860.37950.64730.84590.8459







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
1050.0034-0.00170.00170.0017128.936600-0.47460.4746
1060.00691e-049e-049e-040.356964.64678.04030.0250.2498
1070.00970.0050.00230.00231192.4297440.574420.98991.44320.6476
1080.01210.00570.00310.00311581.9087725.90826.94271.66230.9012
1090.01410.00460.00340.00341025.4683785.8228.03251.33830.9887
1100.01590.00510.00370.00371255.8308864.155229.39651.48111.0707
1110.01754e-040.00320.00328.7866741.959727.23890.12390.9355
1120.0189-0.00350.00330.0033593.6062723.415526.8964-1.01830.9458
1130.0203-0.00620.00360.00361855.8226849.238529.1417-1.80041.0408
1140.0216-0.010.00420.00424818.64991246.179635.3013-2.90111.2268
1150.0228-0.00950.00470.00474405.21461533.364639.1582-2.77391.3675
1160.024-0.00740.00490.00492673.56731628.381540.3532-2.1611.4336

\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.0034 & -0.0017 & 0.0017 & 0.0017 & 128.9366 & 0 & 0 & -0.4746 & 0.4746 \tabularnewline
106 & 0.0069 & 1e-04 & 9e-04 & 9e-04 & 0.3569 & 64.6467 & 8.0403 & 0.025 & 0.2498 \tabularnewline
107 & 0.0097 & 0.005 & 0.0023 & 0.0023 & 1192.4297 & 440.5744 & 20.9899 & 1.4432 & 0.6476 \tabularnewline
108 & 0.0121 & 0.0057 & 0.0031 & 0.0031 & 1581.9087 & 725.908 & 26.9427 & 1.6623 & 0.9012 \tabularnewline
109 & 0.0141 & 0.0046 & 0.0034 & 0.0034 & 1025.4683 & 785.82 & 28.0325 & 1.3383 & 0.9887 \tabularnewline
110 & 0.0159 & 0.0051 & 0.0037 & 0.0037 & 1255.8308 & 864.1552 & 29.3965 & 1.4811 & 1.0707 \tabularnewline
111 & 0.0175 & 4e-04 & 0.0032 & 0.0032 & 8.7866 & 741.9597 & 27.2389 & 0.1239 & 0.9355 \tabularnewline
112 & 0.0189 & -0.0035 & 0.0033 & 0.0033 & 593.6062 & 723.4155 & 26.8964 & -1.0183 & 0.9458 \tabularnewline
113 & 0.0203 & -0.0062 & 0.0036 & 0.0036 & 1855.8226 & 849.2385 & 29.1417 & -1.8004 & 1.0408 \tabularnewline
114 & 0.0216 & -0.01 & 0.0042 & 0.0042 & 4818.6499 & 1246.1796 & 35.3013 & -2.9011 & 1.2268 \tabularnewline
115 & 0.0228 & -0.0095 & 0.0047 & 0.0047 & 4405.2146 & 1533.3646 & 39.1582 & -2.7739 & 1.3675 \tabularnewline
116 & 0.024 & -0.0074 & 0.0049 & 0.0049 & 2673.5673 & 1628.3815 & 40.3532 & -2.161 & 1.4336 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299066&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.0034[/C][C]-0.0017[/C][C]0.0017[/C][C]0.0017[/C][C]128.9366[/C][C]0[/C][C]0[/C][C]-0.4746[/C][C]0.4746[/C][/ROW]
[ROW][C]106[/C][C]0.0069[/C][C]1e-04[/C][C]9e-04[/C][C]9e-04[/C][C]0.3569[/C][C]64.6467[/C][C]8.0403[/C][C]0.025[/C][C]0.2498[/C][/ROW]
[ROW][C]107[/C][C]0.0097[/C][C]0.005[/C][C]0.0023[/C][C]0.0023[/C][C]1192.4297[/C][C]440.5744[/C][C]20.9899[/C][C]1.4432[/C][C]0.6476[/C][/ROW]
[ROW][C]108[/C][C]0.0121[/C][C]0.0057[/C][C]0.0031[/C][C]0.0031[/C][C]1581.9087[/C][C]725.908[/C][C]26.9427[/C][C]1.6623[/C][C]0.9012[/C][/ROW]
[ROW][C]109[/C][C]0.0141[/C][C]0.0046[/C][C]0.0034[/C][C]0.0034[/C][C]1025.4683[/C][C]785.82[/C][C]28.0325[/C][C]1.3383[/C][C]0.9887[/C][/ROW]
[ROW][C]110[/C][C]0.0159[/C][C]0.0051[/C][C]0.0037[/C][C]0.0037[/C][C]1255.8308[/C][C]864.1552[/C][C]29.3965[/C][C]1.4811[/C][C]1.0707[/C][/ROW]
[ROW][C]111[/C][C]0.0175[/C][C]4e-04[/C][C]0.0032[/C][C]0.0032[/C][C]8.7866[/C][C]741.9597[/C][C]27.2389[/C][C]0.1239[/C][C]0.9355[/C][/ROW]
[ROW][C]112[/C][C]0.0189[/C][C]-0.0035[/C][C]0.0033[/C][C]0.0033[/C][C]593.6062[/C][C]723.4155[/C][C]26.8964[/C][C]-1.0183[/C][C]0.9458[/C][/ROW]
[ROW][C]113[/C][C]0.0203[/C][C]-0.0062[/C][C]0.0036[/C][C]0.0036[/C][C]1855.8226[/C][C]849.2385[/C][C]29.1417[/C][C]-1.8004[/C][C]1.0408[/C][/ROW]
[ROW][C]114[/C][C]0.0216[/C][C]-0.01[/C][C]0.0042[/C][C]0.0042[/C][C]4818.6499[/C][C]1246.1796[/C][C]35.3013[/C][C]-2.9011[/C][C]1.2268[/C][/ROW]
[ROW][C]115[/C][C]0.0228[/C][C]-0.0095[/C][C]0.0047[/C][C]0.0047[/C][C]4405.2146[/C][C]1533.3646[/C][C]39.1582[/C][C]-2.7739[/C][C]1.3675[/C][/ROW]
[ROW][C]116[/C][C]0.024[/C][C]-0.0074[/C][C]0.0049[/C][C]0.0049[/C][C]2673.5673[/C][C]1628.3815[/C][C]40.3532[/C][C]-2.161[/C][C]1.4336[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299066&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299066&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.0034-0.00170.00170.0017128.936600-0.47460.4746
1060.00691e-049e-049e-040.356964.64678.04030.0250.2498
1070.00970.0050.00230.00231192.4297440.574420.98991.44320.6476
1080.01210.00570.00310.00311581.9087725.90826.94271.66230.9012
1090.01410.00460.00340.00341025.4683785.8228.03251.33830.9887
1100.01590.00510.00370.00371255.8308864.155229.39651.48111.0707
1110.01754e-040.00320.00328.7866741.959727.23890.12390.9355
1120.0189-0.00350.00330.0033593.6062723.415526.8964-1.01830.9458
1130.0203-0.00620.00360.00361855.8226849.238529.1417-1.80041.0408
1140.0216-0.010.00420.00424818.64991246.179635.3013-2.90111.2268
1150.0228-0.00950.00470.00474405.21461533.364639.1582-2.77391.3675
1160.024-0.00740.00490.00492673.56731628.381540.3532-2.1611.4336



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