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 computationWed, 04 Dec 2013 10:15:49 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2013/Dec/04/t1386170311a2uwfbtjazetmha.htm/, Retrieved Fri, 19 Apr 2024 10:20:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=230641, Retrieved Fri, 19 Apr 2024 10:20:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact72
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2008-12-08 19:22:39] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMP     [ARIMA Forecasting] [Workshop 9.5] [2013-12-04 15:15:49] [249761a82d67c41cbe9b5c486860cdc6] [Current]
Feedback Forum

Post a new message
Dataseries X:
655362
873127
1107897
1555964
1671159
1493308
2957796
2638691
1305669
1280496
921900
867888
652586
913831
1108544
1555827
1699283
1509458
3268975
2425016
1312703
1365498
934453
775019
651142
843192
1146766
1652601
1465906
1652734
2922334
2702805
1458956
1410363
1019279
936574
708917
885295
1099663
1576220
1487870
1488635
2882530
2677026
1404398
1344370
936865
872705
628151
953712
1160384
1400618
1661511
1495347
2918786
2775677
1407026
1370199
964526
850851
683118
847224
1073256
1514326
1503734
1507712
2865698
2788128
1391596
1366378
946295
859626




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 4 seconds \tabularnewline
R Server & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=230641&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=230641&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=230641&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 Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net







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[60])
48872705-------
49628151-------
50953712-------
511160384-------
521400618-------
531661511-------
541495347-------
552918786-------
562775677-------
571407026-------
581370199-------
59964526-------
60850851-------
61683118674176.7389478855.5609869497.91690.46430.03810.67790.0381
62847224918310.1593716095.93721120524.38130.24540.98870.36570.7434
6310732561137967.2594933725.11191342209.40680.26730.99740.41480.9971
6415143261472289.93031267716.99231676862.86820.34360.99990.75391
6515037341589929.86271385288.93971794570.78570.20450.76550.24651
6615077121492314.37521287660.6661696968.08440.44140.45650.48841
6728656982903831.4822699175.28283108487.68120.357510.44311
6827881282734648.02532529991.34772939304.70290.30430.10470.34721
6913915961405954.92651201298.15661610611.69650.445300.49591
7013663781359459.95961154803.17191564116.74740.47360.37910.4591
71946295953038.9623748382.17111157695.75350.474300.45620.8361
72859626859927.9096655271.11771064584.70150.49880.20410.53460.5346

\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[60]) \tabularnewline
48 & 872705 & - & - & - & - & - & - & - \tabularnewline
49 & 628151 & - & - & - & - & - & - & - \tabularnewline
50 & 953712 & - & - & - & - & - & - & - \tabularnewline
51 & 1160384 & - & - & - & - & - & - & - \tabularnewline
52 & 1400618 & - & - & - & - & - & - & - \tabularnewline
53 & 1661511 & - & - & - & - & - & - & - \tabularnewline
54 & 1495347 & - & - & - & - & - & - & - \tabularnewline
55 & 2918786 & - & - & - & - & - & - & - \tabularnewline
56 & 2775677 & - & - & - & - & - & - & - \tabularnewline
57 & 1407026 & - & - & - & - & - & - & - \tabularnewline
58 & 1370199 & - & - & - & - & - & - & - \tabularnewline
59 & 964526 & - & - & - & - & - & - & - \tabularnewline
60 & 850851 & - & - & - & - & - & - & - \tabularnewline
61 & 683118 & 674176.7389 & 478855.5609 & 869497.9169 & 0.4643 & 0.0381 & 0.6779 & 0.0381 \tabularnewline
62 & 847224 & 918310.1593 & 716095.9372 & 1120524.3813 & 0.2454 & 0.9887 & 0.3657 & 0.7434 \tabularnewline
63 & 1073256 & 1137967.2594 & 933725.1119 & 1342209.4068 & 0.2673 & 0.9974 & 0.4148 & 0.9971 \tabularnewline
64 & 1514326 & 1472289.9303 & 1267716.9923 & 1676862.8682 & 0.3436 & 0.9999 & 0.7539 & 1 \tabularnewline
65 & 1503734 & 1589929.8627 & 1385288.9397 & 1794570.7857 & 0.2045 & 0.7655 & 0.2465 & 1 \tabularnewline
66 & 1507712 & 1492314.3752 & 1287660.666 & 1696968.0844 & 0.4414 & 0.4565 & 0.4884 & 1 \tabularnewline
67 & 2865698 & 2903831.482 & 2699175.2828 & 3108487.6812 & 0.3575 & 1 & 0.4431 & 1 \tabularnewline
68 & 2788128 & 2734648.0253 & 2529991.3477 & 2939304.7029 & 0.3043 & 0.1047 & 0.3472 & 1 \tabularnewline
69 & 1391596 & 1405954.9265 & 1201298.1566 & 1610611.6965 & 0.4453 & 0 & 0.4959 & 1 \tabularnewline
70 & 1366378 & 1359459.9596 & 1154803.1719 & 1564116.7474 & 0.4736 & 0.3791 & 0.459 & 1 \tabularnewline
71 & 946295 & 953038.9623 & 748382.1711 & 1157695.7535 & 0.4743 & 0 & 0.4562 & 0.8361 \tabularnewline
72 & 859626 & 859927.9096 & 655271.1177 & 1064584.7015 & 0.4988 & 0.2041 & 0.5346 & 0.5346 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=230641&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[60])[/C][/ROW]
[ROW][C]48[/C][C]872705[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]628151[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]953712[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1160384[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]1400618[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]1661511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]1495347[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]2918786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]2775677[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1407026[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1370199[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]964526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]850851[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]683118[/C][C]674176.7389[/C][C]478855.5609[/C][C]869497.9169[/C][C]0.4643[/C][C]0.0381[/C][C]0.6779[/C][C]0.0381[/C][/ROW]
[ROW][C]62[/C][C]847224[/C][C]918310.1593[/C][C]716095.9372[/C][C]1120524.3813[/C][C]0.2454[/C][C]0.9887[/C][C]0.3657[/C][C]0.7434[/C][/ROW]
[ROW][C]63[/C][C]1073256[/C][C]1137967.2594[/C][C]933725.1119[/C][C]1342209.4068[/C][C]0.2673[/C][C]0.9974[/C][C]0.4148[/C][C]0.9971[/C][/ROW]
[ROW][C]64[/C][C]1514326[/C][C]1472289.9303[/C][C]1267716.9923[/C][C]1676862.8682[/C][C]0.3436[/C][C]0.9999[/C][C]0.7539[/C][C]1[/C][/ROW]
[ROW][C]65[/C][C]1503734[/C][C]1589929.8627[/C][C]1385288.9397[/C][C]1794570.7857[/C][C]0.2045[/C][C]0.7655[/C][C]0.2465[/C][C]1[/C][/ROW]
[ROW][C]66[/C][C]1507712[/C][C]1492314.3752[/C][C]1287660.666[/C][C]1696968.0844[/C][C]0.4414[/C][C]0.4565[/C][C]0.4884[/C][C]1[/C][/ROW]
[ROW][C]67[/C][C]2865698[/C][C]2903831.482[/C][C]2699175.2828[/C][C]3108487.6812[/C][C]0.3575[/C][C]1[/C][C]0.4431[/C][C]1[/C][/ROW]
[ROW][C]68[/C][C]2788128[/C][C]2734648.0253[/C][C]2529991.3477[/C][C]2939304.7029[/C][C]0.3043[/C][C]0.1047[/C][C]0.3472[/C][C]1[/C][/ROW]
[ROW][C]69[/C][C]1391596[/C][C]1405954.9265[/C][C]1201298.1566[/C][C]1610611.6965[/C][C]0.4453[/C][C]0[/C][C]0.4959[/C][C]1[/C][/ROW]
[ROW][C]70[/C][C]1366378[/C][C]1359459.9596[/C][C]1154803.1719[/C][C]1564116.7474[/C][C]0.4736[/C][C]0.3791[/C][C]0.459[/C][C]1[/C][/ROW]
[ROW][C]71[/C][C]946295[/C][C]953038.9623[/C][C]748382.1711[/C][C]1157695.7535[/C][C]0.4743[/C][C]0[/C][C]0.4562[/C][C]0.8361[/C][/ROW]
[ROW][C]72[/C][C]859626[/C][C]859927.9096[/C][C]655271.1177[/C][C]1064584.7015[/C][C]0.4988[/C][C]0.2041[/C][C]0.5346[/C][C]0.5346[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=230641&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=230641&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[60])
48872705-------
49628151-------
50953712-------
511160384-------
521400618-------
531661511-------
541495347-------
552918786-------
562775677-------
571407026-------
581370199-------
59964526-------
60850851-------
61683118674176.7389478855.5609869497.91690.46430.03810.67790.0381
62847224918310.1593716095.93721120524.38130.24540.98870.36570.7434
6310732561137967.2594933725.11191342209.40680.26730.99740.41480.9971
6415143261472289.93031267716.99231676862.86820.34360.99990.75391
6515037341589929.86271385288.93971794570.78570.20450.76550.24651
6615077121492314.37521287660.6661696968.08440.44140.45650.48841
6728656982903831.4822699175.28283108487.68120.357510.44311
6827881282734648.02532529991.34772939304.70290.30430.10470.34721
6913915961405954.92651201298.15661610611.69650.445300.49591
7013663781359459.95961154803.17191564116.74740.47360.37910.4591
71946295953038.9623748382.17111157695.75350.474300.45620.8361
72859626859927.9096655271.11771064584.70150.49880.20410.53460.5346







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
610.14780.01310.01310.013279946150.5598000.02340.0234
620.1123-0.08390.04850.04695053242039.88242566594095.221150661.5643-0.18570.1046
630.0916-0.06030.05240.05074187547089.59783106911760.013355739.6785-0.16910.1261
640.07090.02780.04630.04511767031158.35972771941609.599952649.23180.10980.122
650.0657-0.05730.04850.04727429726746.14253703498636.908460856.3771-0.22520.1427
660.070.01020.04210.0411237086848.77083125763338.885555908.52650.04020.1256
670.036-0.01330.0380.03711454162450.66652886963211.997153730.4682-0.09960.1219
680.03820.01920.03560.03492860107692.64142883606272.077653699.22040.13970.1241
690.0743-0.01030.03280.0321206178771.35842586114327.553350853.8526-0.03750.1145
700.07680.00510.030.029447859282.43712332288823.041648293.77620.01810.1048
710.1096-0.00710.0280.027445481027.71392124397205.284646091.1836-0.01760.0969
720.1214-4e-040.02570.025191149.40431947371700.627944129.0347-8e-040.0889

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
61 & 0.1478 & 0.0131 & 0.0131 & 0.0132 & 79946150.5598 & 0 & 0 & 0.0234 & 0.0234 \tabularnewline
62 & 0.1123 & -0.0839 & 0.0485 & 0.0469 & 5053242039.8824 & 2566594095.2211 & 50661.5643 & -0.1857 & 0.1046 \tabularnewline
63 & 0.0916 & -0.0603 & 0.0524 & 0.0507 & 4187547089.5978 & 3106911760.0133 & 55739.6785 & -0.1691 & 0.1261 \tabularnewline
64 & 0.0709 & 0.0278 & 0.0463 & 0.0451 & 1767031158.3597 & 2771941609.5999 & 52649.2318 & 0.1098 & 0.122 \tabularnewline
65 & 0.0657 & -0.0573 & 0.0485 & 0.0472 & 7429726746.1425 & 3703498636.9084 & 60856.3771 & -0.2252 & 0.1427 \tabularnewline
66 & 0.07 & 0.0102 & 0.0421 & 0.0411 & 237086848.7708 & 3125763338.8855 & 55908.5265 & 0.0402 & 0.1256 \tabularnewline
67 & 0.036 & -0.0133 & 0.038 & 0.0371 & 1454162450.6665 & 2886963211.9971 & 53730.4682 & -0.0996 & 0.1219 \tabularnewline
68 & 0.0382 & 0.0192 & 0.0356 & 0.0349 & 2860107692.6414 & 2883606272.0776 & 53699.2204 & 0.1397 & 0.1241 \tabularnewline
69 & 0.0743 & -0.0103 & 0.0328 & 0.0321 & 206178771.3584 & 2586114327.5533 & 50853.8526 & -0.0375 & 0.1145 \tabularnewline
70 & 0.0768 & 0.0051 & 0.03 & 0.0294 & 47859282.4371 & 2332288823.0416 & 48293.7762 & 0.0181 & 0.1048 \tabularnewline
71 & 0.1096 & -0.0071 & 0.028 & 0.0274 & 45481027.7139 & 2124397205.2846 & 46091.1836 & -0.0176 & 0.0969 \tabularnewline
72 & 0.1214 & -4e-04 & 0.0257 & 0.0251 & 91149.4043 & 1947371700.6279 & 44129.0347 & -8e-04 & 0.0889 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=230641&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]61[/C][C]0.1478[/C][C]0.0131[/C][C]0.0131[/C][C]0.0132[/C][C]79946150.5598[/C][C]0[/C][C]0[/C][C]0.0234[/C][C]0.0234[/C][/ROW]
[ROW][C]62[/C][C]0.1123[/C][C]-0.0839[/C][C]0.0485[/C][C]0.0469[/C][C]5053242039.8824[/C][C]2566594095.2211[/C][C]50661.5643[/C][C]-0.1857[/C][C]0.1046[/C][/ROW]
[ROW][C]63[/C][C]0.0916[/C][C]-0.0603[/C][C]0.0524[/C][C]0.0507[/C][C]4187547089.5978[/C][C]3106911760.0133[/C][C]55739.6785[/C][C]-0.1691[/C][C]0.1261[/C][/ROW]
[ROW][C]64[/C][C]0.0709[/C][C]0.0278[/C][C]0.0463[/C][C]0.0451[/C][C]1767031158.3597[/C][C]2771941609.5999[/C][C]52649.2318[/C][C]0.1098[/C][C]0.122[/C][/ROW]
[ROW][C]65[/C][C]0.0657[/C][C]-0.0573[/C][C]0.0485[/C][C]0.0472[/C][C]7429726746.1425[/C][C]3703498636.9084[/C][C]60856.3771[/C][C]-0.2252[/C][C]0.1427[/C][/ROW]
[ROW][C]66[/C][C]0.07[/C][C]0.0102[/C][C]0.0421[/C][C]0.0411[/C][C]237086848.7708[/C][C]3125763338.8855[/C][C]55908.5265[/C][C]0.0402[/C][C]0.1256[/C][/ROW]
[ROW][C]67[/C][C]0.036[/C][C]-0.0133[/C][C]0.038[/C][C]0.0371[/C][C]1454162450.6665[/C][C]2886963211.9971[/C][C]53730.4682[/C][C]-0.0996[/C][C]0.1219[/C][/ROW]
[ROW][C]68[/C][C]0.0382[/C][C]0.0192[/C][C]0.0356[/C][C]0.0349[/C][C]2860107692.6414[/C][C]2883606272.0776[/C][C]53699.2204[/C][C]0.1397[/C][C]0.1241[/C][/ROW]
[ROW][C]69[/C][C]0.0743[/C][C]-0.0103[/C][C]0.0328[/C][C]0.0321[/C][C]206178771.3584[/C][C]2586114327.5533[/C][C]50853.8526[/C][C]-0.0375[/C][C]0.1145[/C][/ROW]
[ROW][C]70[/C][C]0.0768[/C][C]0.0051[/C][C]0.03[/C][C]0.0294[/C][C]47859282.4371[/C][C]2332288823.0416[/C][C]48293.7762[/C][C]0.0181[/C][C]0.1048[/C][/ROW]
[ROW][C]71[/C][C]0.1096[/C][C]-0.0071[/C][C]0.028[/C][C]0.0274[/C][C]45481027.7139[/C][C]2124397205.2846[/C][C]46091.1836[/C][C]-0.0176[/C][C]0.0969[/C][/ROW]
[ROW][C]72[/C][C]0.1214[/C][C]-4e-04[/C][C]0.0257[/C][C]0.0251[/C][C]91149.4043[/C][C]1947371700.6279[/C][C]44129.0347[/C][C]-8e-04[/C][C]0.0889[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=230641&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=230641&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
610.14780.01310.01310.013279946150.5598000.02340.0234
620.1123-0.08390.04850.04695053242039.88242566594095.221150661.5643-0.18570.1046
630.0916-0.06030.05240.05074187547089.59783106911760.013355739.6785-0.16910.1261
640.07090.02780.04630.04511767031158.35972771941609.599952649.23180.10980.122
650.0657-0.05730.04850.04727429726746.14253703498636.908460856.3771-0.22520.1427
660.070.01020.04210.0411237086848.77083125763338.885555908.52650.04020.1256
670.036-0.01330.0380.03711454162450.66652886963211.997153730.4682-0.09960.1219
680.03820.01920.03560.03492860107692.64142883606272.077653699.22040.13970.1241
690.0743-0.01030.03280.0321206178771.35842586114327.553350853.8526-0.03750.1145
700.07680.00510.030.029447859282.43712332288823.041648293.77620.01810.1048
710.1096-0.00710.0280.027445481027.71392124397205.284646091.1836-0.01760.0969
720.1214-4e-040.02570.025191149.40431947371700.627944129.0347-8e-040.0889



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