Free Statistics

of Irreproducible Research!

Author's title

ARIMA Forecast Totaal # niet-werkende werkzoekende mannen in het Vlaams gew...

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 15 Dec 2008 03:56:57 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/15/t12293386985dxshqzjk4vedqp.htm/, Retrieved Wed, 15 May 2024 03:40:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33658, Retrieved Wed, 15 May 2024 03:40:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsARIMA Forecast Totaal niet-werkende werkzoekende mannen Vlaams gewest aangepast
Estimated Impact188
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [ARIMA Backward Selection] [] [2008-12-07 14:04:55] [74be16979710d4c4e7c6647856088456]
F RMPD  [(Partial) Autocorrelation Function] [] [2008-12-08 19:38:58] [a4ee3bef49b119f4bd2e925060c84f5e]
- RMPD    [ARIMA Forecasting] [] [2008-12-13 11:19:07] [a4ee3bef49b119f4bd2e925060c84f5e]
- RMPD      [ARIMA Backward Selection] [] [2008-12-14 13:52:19] [a4ee3bef49b119f4bd2e925060c84f5e]
- RMP           [ARIMA Forecasting] [ARIMA Forecast To...] [2008-12-15 10:56:57] [f4b2017b314c03698059f43b95818e67] [Current]
Feedback Forum

Post a new message
Dataseries X:
106099
103235
98857
101107
102700
101477
99639
96622
94697
95093
112885
121162
113624
111632
106707
108827
108413
106249
104861
102382
100320
100228
117089
121523
114948
112831
107605
108928
101993
102850
99925
101536
99450
98305
110159
109483
106810
96279
91982
90276
90999
86622
83117
80367
77550
77443
92844
92175
84822
81632
78872
81485
80651
78192
76844
76335
71415
73899
86822
86371
83469
82662




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 5 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33658&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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33658&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33658&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 time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[50])
3896279-------
3991982-------
4090276-------
4190999-------
4286622-------
4383117-------
4480367-------
4577550-------
4677443-------
4792844-------
4892175-------
4984822-------
5081632-------
517887277090.579471881.717782299.44110.25130.043700.0437
528148577906.191770539.749885272.63360.17050.39865e-040.1608
538065178351.741569329.73187373.7520.30870.2480.0030.238
547819275801.033665383.315186218.75210.32640.18080.02090.1363
557684473496.395561849.034685143.75640.28660.21470.05270.0855
567633570861.030358101.988783620.07190.20020.1790.07210.049
577141568580.850254799.513782362.18660.34340.13510.1010.0317
587389968611.322953878.458783344.1870.24090.35460.120.0416
598682285130.669769504.1124100757.22710.4160.92050.16670.6696
608637188885.2172413.3778105357.04220.38240.5970.34770.8059
618346981838.322764562.527199114.11840.42660.30350.36750.5093
628266279686.125661685.978197686.27320.3730.34020.41610.4161

\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[50]) \tabularnewline
38 & 96279 & - & - & - & - & - & - & - \tabularnewline
39 & 91982 & - & - & - & - & - & - & - \tabularnewline
40 & 90276 & - & - & - & - & - & - & - \tabularnewline
41 & 90999 & - & - & - & - & - & - & - \tabularnewline
42 & 86622 & - & - & - & - & - & - & - \tabularnewline
43 & 83117 & - & - & - & - & - & - & - \tabularnewline
44 & 80367 & - & - & - & - & - & - & - \tabularnewline
45 & 77550 & - & - & - & - & - & - & - \tabularnewline
46 & 77443 & - & - & - & - & - & - & - \tabularnewline
47 & 92844 & - & - & - & - & - & - & - \tabularnewline
48 & 92175 & - & - & - & - & - & - & - \tabularnewline
49 & 84822 & - & - & - & - & - & - & - \tabularnewline
50 & 81632 & - & - & - & - & - & - & - \tabularnewline
51 & 78872 & 77090.5794 & 71881.7177 & 82299.4411 & 0.2513 & 0.0437 & 0 & 0.0437 \tabularnewline
52 & 81485 & 77906.1917 & 70539.7498 & 85272.6336 & 0.1705 & 0.3986 & 5e-04 & 0.1608 \tabularnewline
53 & 80651 & 78351.7415 & 69329.731 & 87373.752 & 0.3087 & 0.248 & 0.003 & 0.238 \tabularnewline
54 & 78192 & 75801.0336 & 65383.3151 & 86218.7521 & 0.3264 & 0.1808 & 0.0209 & 0.1363 \tabularnewline
55 & 76844 & 73496.3955 & 61849.0346 & 85143.7564 & 0.2866 & 0.2147 & 0.0527 & 0.0855 \tabularnewline
56 & 76335 & 70861.0303 & 58101.9887 & 83620.0719 & 0.2002 & 0.179 & 0.0721 & 0.049 \tabularnewline
57 & 71415 & 68580.8502 & 54799.5137 & 82362.1866 & 0.3434 & 0.1351 & 0.101 & 0.0317 \tabularnewline
58 & 73899 & 68611.3229 & 53878.4587 & 83344.187 & 0.2409 & 0.3546 & 0.12 & 0.0416 \tabularnewline
59 & 86822 & 85130.6697 & 69504.1124 & 100757.2271 & 0.416 & 0.9205 & 0.1667 & 0.6696 \tabularnewline
60 & 86371 & 88885.21 & 72413.3778 & 105357.0422 & 0.3824 & 0.597 & 0.3477 & 0.8059 \tabularnewline
61 & 83469 & 81838.3227 & 64562.5271 & 99114.1184 & 0.4266 & 0.3035 & 0.3675 & 0.5093 \tabularnewline
62 & 82662 & 79686.1256 & 61685.9781 & 97686.2732 & 0.373 & 0.3402 & 0.4161 & 0.4161 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33658&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[50])[/C][/ROW]
[ROW][C]38[/C][C]96279[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]91982[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]90276[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]90999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]86622[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]83117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]80367[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]77550[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]77443[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]92844[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]92175[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]84822[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]81632[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]78872[/C][C]77090.5794[/C][C]71881.7177[/C][C]82299.4411[/C][C]0.2513[/C][C]0.0437[/C][C]0[/C][C]0.0437[/C][/ROW]
[ROW][C]52[/C][C]81485[/C][C]77906.1917[/C][C]70539.7498[/C][C]85272.6336[/C][C]0.1705[/C][C]0.3986[/C][C]5e-04[/C][C]0.1608[/C][/ROW]
[ROW][C]53[/C][C]80651[/C][C]78351.7415[/C][C]69329.731[/C][C]87373.752[/C][C]0.3087[/C][C]0.248[/C][C]0.003[/C][C]0.238[/C][/ROW]
[ROW][C]54[/C][C]78192[/C][C]75801.0336[/C][C]65383.3151[/C][C]86218.7521[/C][C]0.3264[/C][C]0.1808[/C][C]0.0209[/C][C]0.1363[/C][/ROW]
[ROW][C]55[/C][C]76844[/C][C]73496.3955[/C][C]61849.0346[/C][C]85143.7564[/C][C]0.2866[/C][C]0.2147[/C][C]0.0527[/C][C]0.0855[/C][/ROW]
[ROW][C]56[/C][C]76335[/C][C]70861.0303[/C][C]58101.9887[/C][C]83620.0719[/C][C]0.2002[/C][C]0.179[/C][C]0.0721[/C][C]0.049[/C][/ROW]
[ROW][C]57[/C][C]71415[/C][C]68580.8502[/C][C]54799.5137[/C][C]82362.1866[/C][C]0.3434[/C][C]0.1351[/C][C]0.101[/C][C]0.0317[/C][/ROW]
[ROW][C]58[/C][C]73899[/C][C]68611.3229[/C][C]53878.4587[/C][C]83344.187[/C][C]0.2409[/C][C]0.3546[/C][C]0.12[/C][C]0.0416[/C][/ROW]
[ROW][C]59[/C][C]86822[/C][C]85130.6697[/C][C]69504.1124[/C][C]100757.2271[/C][C]0.416[/C][C]0.9205[/C][C]0.1667[/C][C]0.6696[/C][/ROW]
[ROW][C]60[/C][C]86371[/C][C]88885.21[/C][C]72413.3778[/C][C]105357.0422[/C][C]0.3824[/C][C]0.597[/C][C]0.3477[/C][C]0.8059[/C][/ROW]
[ROW][C]61[/C][C]83469[/C][C]81838.3227[/C][C]64562.5271[/C][C]99114.1184[/C][C]0.4266[/C][C]0.3035[/C][C]0.3675[/C][C]0.5093[/C][/ROW]
[ROW][C]62[/C][C]82662[/C][C]79686.1256[/C][C]61685.9781[/C][C]97686.2732[/C][C]0.373[/C][C]0.3402[/C][C]0.4161[/C][C]0.4161[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33658&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33658&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[50])
3896279-------
3991982-------
4090276-------
4190999-------
4286622-------
4383117-------
4480367-------
4577550-------
4677443-------
4792844-------
4892175-------
4984822-------
5081632-------
517887277090.579471881.717782299.44110.25130.043700.0437
528148577906.191770539.749885272.63360.17050.39865e-040.1608
538065178351.741569329.73187373.7520.30870.2480.0030.238
547819275801.033665383.315186218.75210.32640.18080.02090.1363
557684473496.395561849.034685143.75640.28660.21470.05270.0855
567633570861.030358101.988783620.07190.20020.1790.07210.049
577141568580.850254799.513782362.18660.34340.13510.1010.0317
587389968611.322953878.458783344.1870.24090.35460.120.0416
598682285130.669769504.1124100757.22710.4160.92050.16670.6696
608637188885.2172413.3778105357.04220.38240.5970.34770.8059
618346981838.322764562.527199114.11840.42660.30350.36750.5093
628266279686.125661685.978197686.27320.3730.34020.41610.4161







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
510.03450.02310.00193173459.4505264454.9542514.2518
520.04820.04590.003812807869.03031067322.41921033.113
530.05870.02930.00245286589.5917440549.1326663.7388
540.07010.03150.00265716720.3958476393.3663690.2126
550.08090.04550.003811206455.9777933871.3315966.3702
560.09190.07720.006429964344.24052497028.68671580.1989
570.10250.04130.00348032405.3035669367.1086818.1486
580.10960.07710.006427959529.53372329960.79451526.4209
590.09370.01990.00172860598.1519238383.1793488.245
600.0945-0.02830.00246321251.9993526770.9999725.7899
610.10770.01990.00172659108.3449221592.3621470.736
620.11520.03730.00318855828.2165737985.6847859.0609

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
51 & 0.0345 & 0.0231 & 0.0019 & 3173459.4505 & 264454.9542 & 514.2518 \tabularnewline
52 & 0.0482 & 0.0459 & 0.0038 & 12807869.0303 & 1067322.4192 & 1033.113 \tabularnewline
53 & 0.0587 & 0.0293 & 0.0024 & 5286589.5917 & 440549.1326 & 663.7388 \tabularnewline
54 & 0.0701 & 0.0315 & 0.0026 & 5716720.3958 & 476393.3663 & 690.2126 \tabularnewline
55 & 0.0809 & 0.0455 & 0.0038 & 11206455.9777 & 933871.3315 & 966.3702 \tabularnewline
56 & 0.0919 & 0.0772 & 0.0064 & 29964344.2405 & 2497028.6867 & 1580.1989 \tabularnewline
57 & 0.1025 & 0.0413 & 0.0034 & 8032405.3035 & 669367.1086 & 818.1486 \tabularnewline
58 & 0.1096 & 0.0771 & 0.0064 & 27959529.5337 & 2329960.7945 & 1526.4209 \tabularnewline
59 & 0.0937 & 0.0199 & 0.0017 & 2860598.1519 & 238383.1793 & 488.245 \tabularnewline
60 & 0.0945 & -0.0283 & 0.0024 & 6321251.9993 & 526770.9999 & 725.7899 \tabularnewline
61 & 0.1077 & 0.0199 & 0.0017 & 2659108.3449 & 221592.3621 & 470.736 \tabularnewline
62 & 0.1152 & 0.0373 & 0.0031 & 8855828.2165 & 737985.6847 & 859.0609 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33658&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]51[/C][C]0.0345[/C][C]0.0231[/C][C]0.0019[/C][C]3173459.4505[/C][C]264454.9542[/C][C]514.2518[/C][/ROW]
[ROW][C]52[/C][C]0.0482[/C][C]0.0459[/C][C]0.0038[/C][C]12807869.0303[/C][C]1067322.4192[/C][C]1033.113[/C][/ROW]
[ROW][C]53[/C][C]0.0587[/C][C]0.0293[/C][C]0.0024[/C][C]5286589.5917[/C][C]440549.1326[/C][C]663.7388[/C][/ROW]
[ROW][C]54[/C][C]0.0701[/C][C]0.0315[/C][C]0.0026[/C][C]5716720.3958[/C][C]476393.3663[/C][C]690.2126[/C][/ROW]
[ROW][C]55[/C][C]0.0809[/C][C]0.0455[/C][C]0.0038[/C][C]11206455.9777[/C][C]933871.3315[/C][C]966.3702[/C][/ROW]
[ROW][C]56[/C][C]0.0919[/C][C]0.0772[/C][C]0.0064[/C][C]29964344.2405[/C][C]2497028.6867[/C][C]1580.1989[/C][/ROW]
[ROW][C]57[/C][C]0.1025[/C][C]0.0413[/C][C]0.0034[/C][C]8032405.3035[/C][C]669367.1086[/C][C]818.1486[/C][/ROW]
[ROW][C]58[/C][C]0.1096[/C][C]0.0771[/C][C]0.0064[/C][C]27959529.5337[/C][C]2329960.7945[/C][C]1526.4209[/C][/ROW]
[ROW][C]59[/C][C]0.0937[/C][C]0.0199[/C][C]0.0017[/C][C]2860598.1519[/C][C]238383.1793[/C][C]488.245[/C][/ROW]
[ROW][C]60[/C][C]0.0945[/C][C]-0.0283[/C][C]0.0024[/C][C]6321251.9993[/C][C]526770.9999[/C][C]725.7899[/C][/ROW]
[ROW][C]61[/C][C]0.1077[/C][C]0.0199[/C][C]0.0017[/C][C]2659108.3449[/C][C]221592.3621[/C][C]470.736[/C][/ROW]
[ROW][C]62[/C][C]0.1152[/C][C]0.0373[/C][C]0.0031[/C][C]8855828.2165[/C][C]737985.6847[/C][C]859.0609[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33658&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33658&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
510.03450.02310.00193173459.4505264454.9542514.2518
520.04820.04590.003812807869.03031067322.41921033.113
530.05870.02930.00245286589.5917440549.1326663.7388
540.07010.03150.00265716720.3958476393.3663690.2126
550.08090.04550.003811206455.9777933871.3315966.3702
560.09190.07720.006429964344.24052497028.68671580.1989
570.10250.04130.00348032405.3035669367.1086818.1486
580.10960.07710.006427959529.53372329960.79451526.4209
590.09370.01990.00172860598.1519238383.1793488.245
600.0945-0.02830.00246321251.9993526770.9999725.7899
610.10770.01990.00172659108.3449221592.3621470.736
620.11520.03730.00318855828.2165737985.6847859.0609



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 2 ; 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,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.mape <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')