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 computationSun, 19 Dec 2010 11:03:01 +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/19/t1292756495h6lvxfpckra31m2.htm/, Retrieved Sun, 05 May 2024 01:05:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112279, Retrieved Sun, 05 May 2024 01:05:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact125
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Classical Decomposition] [HPC Retail Sales] [2008-03-02 16:19:32] [74be16979710d4c4e7c6647856088456]
- RMPD    [ARIMA Forecasting] [arima huwelijken] [2010-12-19 11:03:01] [3f56c8f677e988de577e4e00a8180a48] [Current]
Feedback Forum

Post a new message
Dataseries X:
3111
3995
5245
5588
10681
10516
7496
9935
10249
6271
3616
3724
2886
3318
4166
6401
9209
9820
7470
8207
9564
5309
3385
3706
2733
3045
3449
5542
10072
9418
7516
7840
10081
4956
3641
3970
2931
3170
3889
4850
8037
12370
6712
7297
10613
5184
3506
3810
2692
3073
3713
4555
7807
10869
9682
7704
9826
5456
3677
3431
2765
3483
3445
6081
8767
9407
6551
12480
9530
5960
3252
3717
2642
2989
3607
5366
8898
9435
7328
8594
11349
5797
3621
3851




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112279&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112279&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112279&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'Gwilym Jenkins' @ 72.249.127.135







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[72])
603431-------
612765-------
623483-------
633445-------
646081-------
658767-------
669407-------
676551-------
6812480-------
699530-------
705960-------
713252-------
723717-------
7326422855.6843688.25915023.10960.42340.2180.53270.218
7429893634.92131405.53435864.30830.28510.80870.55310.4712
7536073577.72181325.31125830.13240.48980.69580.5460.4518
7653666219.74143966.61468472.86820.22880.98850.5480.9853
7788988903.85416646.398511161.30960.4980.99890.54731
7894359544.44587284.126811804.76480.46220.71240.54741
7973286688.26034424.65728951.86330.28980.00870.54730.995
80859412617.318410350.57214884.06483e-0410.54731
81113499667.30027397.372511937.22790.07320.8230.54721
8257976097.30593824.21478370.39710.397800.54710.9799
8336213389.30411113.04965665.55860.42090.01910.54710.3889
8438513854.30471574.89266133.71680.49890.57950.5470.547

\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[72]) \tabularnewline
60 & 3431 & - & - & - & - & - & - & - \tabularnewline
61 & 2765 & - & - & - & - & - & - & - \tabularnewline
62 & 3483 & - & - & - & - & - & - & - \tabularnewline
63 & 3445 & - & - & - & - & - & - & - \tabularnewline
64 & 6081 & - & - & - & - & - & - & - \tabularnewline
65 & 8767 & - & - & - & - & - & - & - \tabularnewline
66 & 9407 & - & - & - & - & - & - & - \tabularnewline
67 & 6551 & - & - & - & - & - & - & - \tabularnewline
68 & 12480 & - & - & - & - & - & - & - \tabularnewline
69 & 9530 & - & - & - & - & - & - & - \tabularnewline
70 & 5960 & - & - & - & - & - & - & - \tabularnewline
71 & 3252 & - & - & - & - & - & - & - \tabularnewline
72 & 3717 & - & - & - & - & - & - & - \tabularnewline
73 & 2642 & 2855.6843 & 688.2591 & 5023.1096 & 0.4234 & 0.218 & 0.5327 & 0.218 \tabularnewline
74 & 2989 & 3634.9213 & 1405.5343 & 5864.3083 & 0.2851 & 0.8087 & 0.5531 & 0.4712 \tabularnewline
75 & 3607 & 3577.7218 & 1325.3112 & 5830.1324 & 0.4898 & 0.6958 & 0.546 & 0.4518 \tabularnewline
76 & 5366 & 6219.7414 & 3966.6146 & 8472.8682 & 0.2288 & 0.9885 & 0.548 & 0.9853 \tabularnewline
77 & 8898 & 8903.8541 & 6646.3985 & 11161.3096 & 0.498 & 0.9989 & 0.5473 & 1 \tabularnewline
78 & 9435 & 9544.4458 & 7284.1268 & 11804.7648 & 0.4622 & 0.7124 & 0.5474 & 1 \tabularnewline
79 & 7328 & 6688.2603 & 4424.6572 & 8951.8633 & 0.2898 & 0.0087 & 0.5473 & 0.995 \tabularnewline
80 & 8594 & 12617.3184 & 10350.572 & 14884.0648 & 3e-04 & 1 & 0.5473 & 1 \tabularnewline
81 & 11349 & 9667.3002 & 7397.3725 & 11937.2279 & 0.0732 & 0.823 & 0.5472 & 1 \tabularnewline
82 & 5797 & 6097.3059 & 3824.2147 & 8370.3971 & 0.3978 & 0 & 0.5471 & 0.9799 \tabularnewline
83 & 3621 & 3389.3041 & 1113.0496 & 5665.5586 & 0.4209 & 0.0191 & 0.5471 & 0.3889 \tabularnewline
84 & 3851 & 3854.3047 & 1574.8926 & 6133.7168 & 0.4989 & 0.5795 & 0.547 & 0.547 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112279&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[72])[/C][/ROW]
[ROW][C]60[/C][C]3431[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]2765[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]3483[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]3445[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]6081[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]8767[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]9407[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]6551[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]12480[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]9530[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]5960[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]3252[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]3717[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]2642[/C][C]2855.6843[/C][C]688.2591[/C][C]5023.1096[/C][C]0.4234[/C][C]0.218[/C][C]0.5327[/C][C]0.218[/C][/ROW]
[ROW][C]74[/C][C]2989[/C][C]3634.9213[/C][C]1405.5343[/C][C]5864.3083[/C][C]0.2851[/C][C]0.8087[/C][C]0.5531[/C][C]0.4712[/C][/ROW]
[ROW][C]75[/C][C]3607[/C][C]3577.7218[/C][C]1325.3112[/C][C]5830.1324[/C][C]0.4898[/C][C]0.6958[/C][C]0.546[/C][C]0.4518[/C][/ROW]
[ROW][C]76[/C][C]5366[/C][C]6219.7414[/C][C]3966.6146[/C][C]8472.8682[/C][C]0.2288[/C][C]0.9885[/C][C]0.548[/C][C]0.9853[/C][/ROW]
[ROW][C]77[/C][C]8898[/C][C]8903.8541[/C][C]6646.3985[/C][C]11161.3096[/C][C]0.498[/C][C]0.9989[/C][C]0.5473[/C][C]1[/C][/ROW]
[ROW][C]78[/C][C]9435[/C][C]9544.4458[/C][C]7284.1268[/C][C]11804.7648[/C][C]0.4622[/C][C]0.7124[/C][C]0.5474[/C][C]1[/C][/ROW]
[ROW][C]79[/C][C]7328[/C][C]6688.2603[/C][C]4424.6572[/C][C]8951.8633[/C][C]0.2898[/C][C]0.0087[/C][C]0.5473[/C][C]0.995[/C][/ROW]
[ROW][C]80[/C][C]8594[/C][C]12617.3184[/C][C]10350.572[/C][C]14884.0648[/C][C]3e-04[/C][C]1[/C][C]0.5473[/C][C]1[/C][/ROW]
[ROW][C]81[/C][C]11349[/C][C]9667.3002[/C][C]7397.3725[/C][C]11937.2279[/C][C]0.0732[/C][C]0.823[/C][C]0.5472[/C][C]1[/C][/ROW]
[ROW][C]82[/C][C]5797[/C][C]6097.3059[/C][C]3824.2147[/C][C]8370.3971[/C][C]0.3978[/C][C]0[/C][C]0.5471[/C][C]0.9799[/C][/ROW]
[ROW][C]83[/C][C]3621[/C][C]3389.3041[/C][C]1113.0496[/C][C]5665.5586[/C][C]0.4209[/C][C]0.0191[/C][C]0.5471[/C][C]0.3889[/C][/ROW]
[ROW][C]84[/C][C]3851[/C][C]3854.3047[/C][C]1574.8926[/C][C]6133.7168[/C][C]0.4989[/C][C]0.5795[/C][C]0.547[/C][C]0.547[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112279&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112279&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[72])
603431-------
612765-------
623483-------
633445-------
646081-------
658767-------
669407-------
676551-------
6812480-------
699530-------
705960-------
713252-------
723717-------
7326422855.6843688.25915023.10960.42340.2180.53270.218
7429893634.92131405.53435864.30830.28510.80870.55310.4712
7536073577.72181325.31125830.13240.48980.69580.5460.4518
7653666219.74143966.61468472.86820.22880.98850.5480.9853
7788988903.85416646.398511161.30960.4980.99890.54731
7894359544.44587284.126811804.76480.46220.71240.54741
7973286688.26034424.65728951.86330.28980.00870.54730.995
80859412617.318410350.57214884.06483e-0410.54731
81113499667.30027397.372511937.22790.07320.8230.54721
8257976097.30593824.21478370.39710.397800.54710.9799
8336213389.30411113.04965665.55860.42090.01910.54710.3889
8438513854.30471574.89266133.71680.49890.57950.5470.547







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.3872-0.0748045660.995800
740.3129-0.17770.1263417214.3385231437.6671481.0797
750.32120.00820.0869857.2136154577.516393.1635
760.1848-0.13730.0995728874.3467298151.7236546.0327
770.1294-7e-040.079734.2701238528.2329488.3935
780.1208-0.01150.068311978.3821200769.9245448.0736
790.17270.09570.0722409266.9186230555.2094480.1616
800.0917-0.31890.103116187091.26432225122.21621491.6844
810.11980.1740.1112828114.2092292121.32651513.9753
820.1902-0.04930.104890183.64572071927.55851439.4192
830.34270.06840.101553682.97731888450.77831374.2091
840.3017-9e-040.093110.9211731080.79021315.7054

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.3872 & -0.0748 & 0 & 45660.9958 & 0 & 0 \tabularnewline
74 & 0.3129 & -0.1777 & 0.1263 & 417214.3385 & 231437.6671 & 481.0797 \tabularnewline
75 & 0.3212 & 0.0082 & 0.0869 & 857.2136 & 154577.516 & 393.1635 \tabularnewline
76 & 0.1848 & -0.1373 & 0.0995 & 728874.3467 & 298151.7236 & 546.0327 \tabularnewline
77 & 0.1294 & -7e-04 & 0.0797 & 34.2701 & 238528.2329 & 488.3935 \tabularnewline
78 & 0.1208 & -0.0115 & 0.0683 & 11978.3821 & 200769.9245 & 448.0736 \tabularnewline
79 & 0.1727 & 0.0957 & 0.0722 & 409266.9186 & 230555.2094 & 480.1616 \tabularnewline
80 & 0.0917 & -0.3189 & 0.1031 & 16187091.2643 & 2225122.2162 & 1491.6844 \tabularnewline
81 & 0.1198 & 0.174 & 0.111 & 2828114.209 & 2292121.3265 & 1513.9753 \tabularnewline
82 & 0.1902 & -0.0493 & 0.1048 & 90183.6457 & 2071927.5585 & 1439.4192 \tabularnewline
83 & 0.3427 & 0.0684 & 0.1015 & 53682.9773 & 1888450.7783 & 1374.2091 \tabularnewline
84 & 0.3017 & -9e-04 & 0.0931 & 10.921 & 1731080.7902 & 1315.7054 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112279&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]73[/C][C]0.3872[/C][C]-0.0748[/C][C]0[/C][C]45660.9958[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.3129[/C][C]-0.1777[/C][C]0.1263[/C][C]417214.3385[/C][C]231437.6671[/C][C]481.0797[/C][/ROW]
[ROW][C]75[/C][C]0.3212[/C][C]0.0082[/C][C]0.0869[/C][C]857.2136[/C][C]154577.516[/C][C]393.1635[/C][/ROW]
[ROW][C]76[/C][C]0.1848[/C][C]-0.1373[/C][C]0.0995[/C][C]728874.3467[/C][C]298151.7236[/C][C]546.0327[/C][/ROW]
[ROW][C]77[/C][C]0.1294[/C][C]-7e-04[/C][C]0.0797[/C][C]34.2701[/C][C]238528.2329[/C][C]488.3935[/C][/ROW]
[ROW][C]78[/C][C]0.1208[/C][C]-0.0115[/C][C]0.0683[/C][C]11978.3821[/C][C]200769.9245[/C][C]448.0736[/C][/ROW]
[ROW][C]79[/C][C]0.1727[/C][C]0.0957[/C][C]0.0722[/C][C]409266.9186[/C][C]230555.2094[/C][C]480.1616[/C][/ROW]
[ROW][C]80[/C][C]0.0917[/C][C]-0.3189[/C][C]0.1031[/C][C]16187091.2643[/C][C]2225122.2162[/C][C]1491.6844[/C][/ROW]
[ROW][C]81[/C][C]0.1198[/C][C]0.174[/C][C]0.111[/C][C]2828114.209[/C][C]2292121.3265[/C][C]1513.9753[/C][/ROW]
[ROW][C]82[/C][C]0.1902[/C][C]-0.0493[/C][C]0.1048[/C][C]90183.6457[/C][C]2071927.5585[/C][C]1439.4192[/C][/ROW]
[ROW][C]83[/C][C]0.3427[/C][C]0.0684[/C][C]0.1015[/C][C]53682.9773[/C][C]1888450.7783[/C][C]1374.2091[/C][/ROW]
[ROW][C]84[/C][C]0.3017[/C][C]-9e-04[/C][C]0.0931[/C][C]10.921[/C][C]1731080.7902[/C][C]1315.7054[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112279&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112279&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
730.3872-0.0748045660.995800
740.3129-0.17770.1263417214.3385231437.6671481.0797
750.32120.00820.0869857.2136154577.516393.1635
760.1848-0.13730.0995728874.3467298151.7236546.0327
770.1294-7e-040.079734.2701238528.2329488.3935
780.1208-0.01150.068311978.3821200769.9245448.0736
790.17270.09570.0722409266.9186230555.2094480.1616
800.0917-0.31890.103116187091.26432225122.21621491.6844
810.11980.1740.1112828114.2092292121.32651513.9753
820.1902-0.04930.104890183.64572071927.55851439.4192
830.34270.06840.101553682.97731888450.77831374.2091
840.3017-9e-040.093110.9211731080.79021315.7054



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