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 computationSat, 04 Dec 2010 09:28:45 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/04/t12914548000f65jfhyndsrs55.htm/, Retrieved Sun, 05 May 2024 06:06:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=105054, Retrieved Sun, 05 May 2024 06:06:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact171
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Forecasting] [Arima W9] [2010-12-03 19:50:12] [247f085ab5b7724f755ad01dc754a3e8]
-   P           [ARIMA Forecasting] [Arima W9] [2010-12-04 09:28:45] [9d72585f2b7b60ae977d4816136e1c95] [Current]
Feedback Forum

Post a new message
Dataseries X:
14731798.37
16471559.62
15213975.95
17637387.4
17972385.83
16896235.55
16697955.94
19691579.52
15930700.75
17444615.98
17699369.88
15189796.81
15672722.75
17180794.3
17664893.45
17862884.98
16162288.88
17463628.82
16772112.17
19106861.48
16721314.25
18161267.85
18509941.2
17802737.97
16409869.75
17967742.04
20286602.27
19537280.81
18021889.62
20194317.23
19049596.62
20244720.94
21473302.24
19673603.19
21053177.29
20159479.84
18203628.31
21289464.94
20432335.71
17180395.07
15816786.32
15071819.75
14521120.61
15668789.39
14346884.11
13881008.13
15465943.69
14238232.92
13557713.21
16127590.29
16793894.2
16014007.43
16867867.15
16014583.21
15878594.85
18664899.14
17962530.06
17332692.2
19542066.35
17203555.19




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105054&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105054&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105054&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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[48])
3620159479.84-------
3718203628.31-------
3821289464.94-------
3920432335.71-------
4017180395.07-------
4115816786.32-------
4215071819.75-------
4314521120.61-------
4415668789.39-------
4514346884.11-------
4613881008.13-------
4715465943.69-------
4814238232.92-------
4913557713.2112531393.622310201699.39614861087.84870.19390.075500.0755
5016127590.2915322623.175612562045.171418083201.17990.28380.894900.7793
5116793894.214937786.511711720176.507218155396.51610.12910.23434e-040.665
5216014007.4312803697.52678496010.940517111384.11290.0720.03470.02320.257
5316867867.1511699283.8356952815.326516445752.34340.01640.03740.04450.1472
5416014583.2111230454.33655941116.370716519792.30230.03810.01840.07730.1325
5515878594.8510770857.05964732123.594216809590.5250.04870.04440.11180.1302
5618664899.1411594667.20025160206.134418029128.26610.01560.0960.10730.2103
5717962530.0611431343.13714483019.401918379666.87240.03270.02070.20540.2142
5817332692.210085079.73062581096.763517589062.69770.02920.01980.16070.139
5919542066.3511603312.06423734883.887319471740.24110.0240.07680.1680.2558
6017203555.1910340396.90652008251.437218672542.37580.05320.01520.17960.1796

\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[48]) \tabularnewline
36 & 20159479.84 & - & - & - & - & - & - & - \tabularnewline
37 & 18203628.31 & - & - & - & - & - & - & - \tabularnewline
38 & 21289464.94 & - & - & - & - & - & - & - \tabularnewline
39 & 20432335.71 & - & - & - & - & - & - & - \tabularnewline
40 & 17180395.07 & - & - & - & - & - & - & - \tabularnewline
41 & 15816786.32 & - & - & - & - & - & - & - \tabularnewline
42 & 15071819.75 & - & - & - & - & - & - & - \tabularnewline
43 & 14521120.61 & - & - & - & - & - & - & - \tabularnewline
44 & 15668789.39 & - & - & - & - & - & - & - \tabularnewline
45 & 14346884.11 & - & - & - & - & - & - & - \tabularnewline
46 & 13881008.13 & - & - & - & - & - & - & - \tabularnewline
47 & 15465943.69 & - & - & - & - & - & - & - \tabularnewline
48 & 14238232.92 & - & - & - & - & - & - & - \tabularnewline
49 & 13557713.21 & 12531393.6223 & 10201699.396 & 14861087.8487 & 0.1939 & 0.0755 & 0 & 0.0755 \tabularnewline
50 & 16127590.29 & 15322623.1756 & 12562045.1714 & 18083201.1799 & 0.2838 & 0.8949 & 0 & 0.7793 \tabularnewline
51 & 16793894.2 & 14937786.5117 & 11720176.5072 & 18155396.5161 & 0.1291 & 0.2343 & 4e-04 & 0.665 \tabularnewline
52 & 16014007.43 & 12803697.5267 & 8496010.9405 & 17111384.1129 & 0.072 & 0.0347 & 0.0232 & 0.257 \tabularnewline
53 & 16867867.15 & 11699283.835 & 6952815.3265 & 16445752.3434 & 0.0164 & 0.0374 & 0.0445 & 0.1472 \tabularnewline
54 & 16014583.21 & 11230454.3365 & 5941116.3707 & 16519792.3023 & 0.0381 & 0.0184 & 0.0773 & 0.1325 \tabularnewline
55 & 15878594.85 & 10770857.0596 & 4732123.5942 & 16809590.525 & 0.0487 & 0.0444 & 0.1118 & 0.1302 \tabularnewline
56 & 18664899.14 & 11594667.2002 & 5160206.1344 & 18029128.2661 & 0.0156 & 0.096 & 0.1073 & 0.2103 \tabularnewline
57 & 17962530.06 & 11431343.1371 & 4483019.4019 & 18379666.8724 & 0.0327 & 0.0207 & 0.2054 & 0.2142 \tabularnewline
58 & 17332692.2 & 10085079.7306 & 2581096.7635 & 17589062.6977 & 0.0292 & 0.0198 & 0.1607 & 0.139 \tabularnewline
59 & 19542066.35 & 11603312.0642 & 3734883.8873 & 19471740.2411 & 0.024 & 0.0768 & 0.168 & 0.2558 \tabularnewline
60 & 17203555.19 & 10340396.9065 & 2008251.4372 & 18672542.3758 & 0.0532 & 0.0152 & 0.1796 & 0.1796 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105054&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[48])[/C][/ROW]
[ROW][C]36[/C][C]20159479.84[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]18203628.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]21289464.94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]20432335.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]17180395.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]15816786.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]15071819.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]14521120.61[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]15668789.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]14346884.11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]13881008.13[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]15465943.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]14238232.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]13557713.21[/C][C]12531393.6223[/C][C]10201699.396[/C][C]14861087.8487[/C][C]0.1939[/C][C]0.0755[/C][C]0[/C][C]0.0755[/C][/ROW]
[ROW][C]50[/C][C]16127590.29[/C][C]15322623.1756[/C][C]12562045.1714[/C][C]18083201.1799[/C][C]0.2838[/C][C]0.8949[/C][C]0[/C][C]0.7793[/C][/ROW]
[ROW][C]51[/C][C]16793894.2[/C][C]14937786.5117[/C][C]11720176.5072[/C][C]18155396.5161[/C][C]0.1291[/C][C]0.2343[/C][C]4e-04[/C][C]0.665[/C][/ROW]
[ROW][C]52[/C][C]16014007.43[/C][C]12803697.5267[/C][C]8496010.9405[/C][C]17111384.1129[/C][C]0.072[/C][C]0.0347[/C][C]0.0232[/C][C]0.257[/C][/ROW]
[ROW][C]53[/C][C]16867867.15[/C][C]11699283.835[/C][C]6952815.3265[/C][C]16445752.3434[/C][C]0.0164[/C][C]0.0374[/C][C]0.0445[/C][C]0.1472[/C][/ROW]
[ROW][C]54[/C][C]16014583.21[/C][C]11230454.3365[/C][C]5941116.3707[/C][C]16519792.3023[/C][C]0.0381[/C][C]0.0184[/C][C]0.0773[/C][C]0.1325[/C][/ROW]
[ROW][C]55[/C][C]15878594.85[/C][C]10770857.0596[/C][C]4732123.5942[/C][C]16809590.525[/C][C]0.0487[/C][C]0.0444[/C][C]0.1118[/C][C]0.1302[/C][/ROW]
[ROW][C]56[/C][C]18664899.14[/C][C]11594667.2002[/C][C]5160206.1344[/C][C]18029128.2661[/C][C]0.0156[/C][C]0.096[/C][C]0.1073[/C][C]0.2103[/C][/ROW]
[ROW][C]57[/C][C]17962530.06[/C][C]11431343.1371[/C][C]4483019.4019[/C][C]18379666.8724[/C][C]0.0327[/C][C]0.0207[/C][C]0.2054[/C][C]0.2142[/C][/ROW]
[ROW][C]58[/C][C]17332692.2[/C][C]10085079.7306[/C][C]2581096.7635[/C][C]17589062.6977[/C][C]0.0292[/C][C]0.0198[/C][C]0.1607[/C][C]0.139[/C][/ROW]
[ROW][C]59[/C][C]19542066.35[/C][C]11603312.0642[/C][C]3734883.8873[/C][C]19471740.2411[/C][C]0.024[/C][C]0.0768[/C][C]0.168[/C][C]0.2558[/C][/ROW]
[ROW][C]60[/C][C]17203555.19[/C][C]10340396.9065[/C][C]2008251.4372[/C][C]18672542.3758[/C][C]0.0532[/C][C]0.0152[/C][C]0.1796[/C][C]0.1796[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105054&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105054&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[48])
3620159479.84-------
3718203628.31-------
3821289464.94-------
3920432335.71-------
4017180395.07-------
4115816786.32-------
4215071819.75-------
4314521120.61-------
4415668789.39-------
4514346884.11-------
4613881008.13-------
4715465943.69-------
4814238232.92-------
4913557713.2112531393.622310201699.39614861087.84870.19390.075500.0755
5016127590.2915322623.175612562045.171418083201.17990.28380.894900.7793
5116793894.214937786.511711720176.507218155396.51610.12910.23434e-040.665
5216014007.4312803697.52678496010.940517111384.11290.0720.03470.02320.257
5316867867.1511699283.8356952815.326516445752.34340.01640.03740.04450.1472
5416014583.2111230454.33655941116.370716519792.30230.03810.01840.07730.1325
5515878594.8510770857.05964732123.594216809590.5250.04870.04440.11180.1302
5618664899.1411594667.20025160206.134418029128.26610.01560.0960.10730.2103
5717962530.0611431343.13714483019.401918379666.87240.03270.02070.20540.2142
5817332692.210085079.73062581096.763517589062.69770.02920.01980.16070.139
5919542066.3511603312.06423734883.887319471740.24110.0240.07680.1680.2558
6017203555.1910340396.90652008251.437218672542.37580.05320.01520.17960.1796







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.09490.081901053331896011.8000
500.09190.05250.0672647972055202.773850651975607.289922307.9614
510.10990.12430.08623445135750682.141715479900632.241309763.2995
520.17170.25070.127410306089675275.33863132344293.001965485.2694
530.2070.44180.190226714253484466.18433356572327.612904024.2031
540.24030.4260.229522887889078295.610842445323322.33292786.8627
550.2860.47420.264526088985335404.513020522467905.53608396.1074
560.28310.60980.307749988179682400.917641479619717.44200176.1415
570.31010.57130.336942656402621520.120420915508806.64518950.7088
580.37960.71860.375152527886506272.423631612608553.24861235.708
590.3460.68420.403263023819609859.527212722335944.65216581.4799
600.41110.66370.424947102941624112.628870240609958.65373103.4431

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0949 & 0.0819 & 0 & 1053331896011.80 & 0 & 0 \tabularnewline
50 & 0.0919 & 0.0525 & 0.0672 & 647972055202.773 & 850651975607.289 & 922307.9614 \tabularnewline
51 & 0.1099 & 0.1243 & 0.0862 & 3445135750682.14 & 1715479900632.24 & 1309763.2995 \tabularnewline
52 & 0.1717 & 0.2507 & 0.1274 & 10306089675275.3 & 3863132344293.00 & 1965485.2694 \tabularnewline
53 & 0.207 & 0.4418 & 0.1902 & 26714253484466.1 & 8433356572327.61 & 2904024.2031 \tabularnewline
54 & 0.2403 & 0.426 & 0.2295 & 22887889078295.6 & 10842445323322.3 & 3292786.8627 \tabularnewline
55 & 0.286 & 0.4742 & 0.2645 & 26088985335404.5 & 13020522467905.5 & 3608396.1074 \tabularnewline
56 & 0.2831 & 0.6098 & 0.3077 & 49988179682400.9 & 17641479619717.4 & 4200176.1415 \tabularnewline
57 & 0.3101 & 0.5713 & 0.3369 & 42656402621520.1 & 20420915508806.6 & 4518950.7088 \tabularnewline
58 & 0.3796 & 0.7186 & 0.3751 & 52527886506272.4 & 23631612608553.2 & 4861235.708 \tabularnewline
59 & 0.346 & 0.6842 & 0.4032 & 63023819609859.5 & 27212722335944.6 & 5216581.4799 \tabularnewline
60 & 0.4111 & 0.6637 & 0.4249 & 47102941624112.6 & 28870240609958.6 & 5373103.4431 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105054&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]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]49[/C][C]0.0949[/C][C]0.0819[/C][C]0[/C][C]1053331896011.80[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0919[/C][C]0.0525[/C][C]0.0672[/C][C]647972055202.773[/C][C]850651975607.289[/C][C]922307.9614[/C][/ROW]
[ROW][C]51[/C][C]0.1099[/C][C]0.1243[/C][C]0.0862[/C][C]3445135750682.14[/C][C]1715479900632.24[/C][C]1309763.2995[/C][/ROW]
[ROW][C]52[/C][C]0.1717[/C][C]0.2507[/C][C]0.1274[/C][C]10306089675275.3[/C][C]3863132344293.00[/C][C]1965485.2694[/C][/ROW]
[ROW][C]53[/C][C]0.207[/C][C]0.4418[/C][C]0.1902[/C][C]26714253484466.1[/C][C]8433356572327.61[/C][C]2904024.2031[/C][/ROW]
[ROW][C]54[/C][C]0.2403[/C][C]0.426[/C][C]0.2295[/C][C]22887889078295.6[/C][C]10842445323322.3[/C][C]3292786.8627[/C][/ROW]
[ROW][C]55[/C][C]0.286[/C][C]0.4742[/C][C]0.2645[/C][C]26088985335404.5[/C][C]13020522467905.5[/C][C]3608396.1074[/C][/ROW]
[ROW][C]56[/C][C]0.2831[/C][C]0.6098[/C][C]0.3077[/C][C]49988179682400.9[/C][C]17641479619717.4[/C][C]4200176.1415[/C][/ROW]
[ROW][C]57[/C][C]0.3101[/C][C]0.5713[/C][C]0.3369[/C][C]42656402621520.1[/C][C]20420915508806.6[/C][C]4518950.7088[/C][/ROW]
[ROW][C]58[/C][C]0.3796[/C][C]0.7186[/C][C]0.3751[/C][C]52527886506272.4[/C][C]23631612608553.2[/C][C]4861235.708[/C][/ROW]
[ROW][C]59[/C][C]0.346[/C][C]0.6842[/C][C]0.4032[/C][C]63023819609859.5[/C][C]27212722335944.6[/C][C]5216581.4799[/C][/ROW]
[ROW][C]60[/C][C]0.4111[/C][C]0.6637[/C][C]0.4249[/C][C]47102941624112.6[/C][C]28870240609958.6[/C][C]5373103.4431[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105054&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105054&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.PEMAPESq.EMSERMSE
490.09490.081901053331896011.8000
500.09190.05250.0672647972055202.773850651975607.289922307.9614
510.10990.12430.08623445135750682.141715479900632.241309763.2995
520.17170.25070.127410306089675275.33863132344293.001965485.2694
530.2070.44180.190226714253484466.18433356572327.612904024.2031
540.24030.4260.229522887889078295.610842445323322.33292786.8627
550.2860.47420.264526088985335404.513020522467905.53608396.1074
560.28310.60980.307749988179682400.917641479619717.44200176.1415
570.31010.57130.336942656402621520.120420915508806.64518950.7088
580.37960.71860.375152527886506272.423631612608553.24861235.708
590.3460.68420.403263023819609859.527212722335944.65216581.4799
600.41110.66370.424947102941624112.628870240609958.65373103.4431



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 1 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 1 ; par9 = 1 ; 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.mape <- array(0, dim=fx)
perf.mape1 <- 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)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[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.mse[1] = abs(perf.se[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.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[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',7,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,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',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.se[i],4))
a<-table.element(a,round(perf.mse1[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')