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, 21 Dec 2008 07:44:46 -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/21/t1229870744xy5ai562wsf21g7.htm/, Retrieved Fri, 17 May 2024 07:01:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35613, Retrieved Fri, 17 May 2024 07:01:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact170
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [blog 1e tijdreeks...] [2008-10-13 19:23:31] [7173087adebe3e3a714c80ea2417b3eb]
-   PD  [Univariate Data Series] [tijdreeksen opnie...] [2008-10-19 17:13:12] [7173087adebe3e3a714c80ea2417b3eb]
-   PD    [Univariate Data Series] [tijdreeksen opnie...] [2008-10-19 18:55:20] [7173087adebe3e3a714c80ea2417b3eb]
- RM        [Central Tendency] [central tendency ...] [2008-10-19 19:10:37] [7173087adebe3e3a714c80ea2417b3eb]
- RMP         [ARIMA Backward Selection] [arima backward st...] [2008-12-08 22:03:24] [7173087adebe3e3a714c80ea2417b3eb]
- RMPD            [ARIMA Forecasting] [Forecasting insch...] [2008-12-21 14:44:46] [9ba97de59bb4d2edf0cfeac4ca7d2b73] [Current]
Feedback Forum

Post a new message
Dataseries X:
58608
46865
51378
46235
47206
45382
41227
33795
31295
42625
33625
21538
56421
53152
53536
52408
41454
38271
35306
26414
31917
38030
27534
18387
50556
43901
48572
43899
37532
40357
35489
29027
34485
42598
30306
26451
47460
50104
61465
53726
39477
43895
31481
29896
33842
39120
33702
25094
51442
45594
52518
48564
41745
49585
32747
33379
35645
37034
35681
20972
58552
54955
65540
51570
51145
46641
35704
33253
35193
41668
34865
21210
56126
49231
59723
48103
47472
50497
40059
34149
36860
46356
36577
23872




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35613&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]1 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=35613&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35613&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 time1 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])
6020972-------
6158552-------
6254955-------
6365540-------
6451570-------
6551145-------
6646641-------
6735704-------
6833253-------
6935193-------
7041668-------
7134865-------
7221210-------
735612655086.689446510.972163662.40680.406110.21421
744923150870.749741860.702759880.79680.36070.12650.18711
755972360024.080650970.119369078.0420.4740.99030.11621
764810350292.138141233.628159350.64810.31790.02060.39111
774747247194.169938135.187656253.15220.4760.42210.19631
785049747875.070138816.038856934.10150.28530.53470.60531
794005934462.262725403.226343521.29920.1133e-040.39410.9979
803414933305.714824246.677842364.75180.42760.0720.50450.9956
813686035382.670726323.633744441.70770.37460.60520.51640.9989
824635639722.863930663.826948781.9010.07560.73220.33691
833657735207.509626148.472544266.54660.38350.00790.52950.9988
842387221110.097812051.060830169.13480.27514e-040.49140.4914

\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 & 20972 & - & - & - & - & - & - & - \tabularnewline
61 & 58552 & - & - & - & - & - & - & - \tabularnewline
62 & 54955 & - & - & - & - & - & - & - \tabularnewline
63 & 65540 & - & - & - & - & - & - & - \tabularnewline
64 & 51570 & - & - & - & - & - & - & - \tabularnewline
65 & 51145 & - & - & - & - & - & - & - \tabularnewline
66 & 46641 & - & - & - & - & - & - & - \tabularnewline
67 & 35704 & - & - & - & - & - & - & - \tabularnewline
68 & 33253 & - & - & - & - & - & - & - \tabularnewline
69 & 35193 & - & - & - & - & - & - & - \tabularnewline
70 & 41668 & - & - & - & - & - & - & - \tabularnewline
71 & 34865 & - & - & - & - & - & - & - \tabularnewline
72 & 21210 & - & - & - & - & - & - & - \tabularnewline
73 & 56126 & 55086.6894 & 46510.9721 & 63662.4068 & 0.4061 & 1 & 0.2142 & 1 \tabularnewline
74 & 49231 & 50870.7497 & 41860.7027 & 59880.7968 & 0.3607 & 0.1265 & 0.1871 & 1 \tabularnewline
75 & 59723 & 60024.0806 & 50970.1193 & 69078.042 & 0.474 & 0.9903 & 0.1162 & 1 \tabularnewline
76 & 48103 & 50292.1381 & 41233.6281 & 59350.6481 & 0.3179 & 0.0206 & 0.3911 & 1 \tabularnewline
77 & 47472 & 47194.1699 & 38135.1876 & 56253.1522 & 0.476 & 0.4221 & 0.1963 & 1 \tabularnewline
78 & 50497 & 47875.0701 & 38816.0388 & 56934.1015 & 0.2853 & 0.5347 & 0.6053 & 1 \tabularnewline
79 & 40059 & 34462.2627 & 25403.2263 & 43521.2992 & 0.113 & 3e-04 & 0.3941 & 0.9979 \tabularnewline
80 & 34149 & 33305.7148 & 24246.6778 & 42364.7518 & 0.4276 & 0.072 & 0.5045 & 0.9956 \tabularnewline
81 & 36860 & 35382.6707 & 26323.6337 & 44441.7077 & 0.3746 & 0.6052 & 0.5164 & 0.9989 \tabularnewline
82 & 46356 & 39722.8639 & 30663.8269 & 48781.901 & 0.0756 & 0.7322 & 0.3369 & 1 \tabularnewline
83 & 36577 & 35207.5096 & 26148.4725 & 44266.5466 & 0.3835 & 0.0079 & 0.5295 & 0.9988 \tabularnewline
84 & 23872 & 21110.0978 & 12051.0608 & 30169.1348 & 0.2751 & 4e-04 & 0.4914 & 0.4914 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35613&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]20972[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]58552[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]54955[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]65540[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]51570[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]51145[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]46641[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]35704[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]33253[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]35193[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]41668[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]34865[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]21210[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]56126[/C][C]55086.6894[/C][C]46510.9721[/C][C]63662.4068[/C][C]0.4061[/C][C]1[/C][C]0.2142[/C][C]1[/C][/ROW]
[ROW][C]74[/C][C]49231[/C][C]50870.7497[/C][C]41860.7027[/C][C]59880.7968[/C][C]0.3607[/C][C]0.1265[/C][C]0.1871[/C][C]1[/C][/ROW]
[ROW][C]75[/C][C]59723[/C][C]60024.0806[/C][C]50970.1193[/C][C]69078.042[/C][C]0.474[/C][C]0.9903[/C][C]0.1162[/C][C]1[/C][/ROW]
[ROW][C]76[/C][C]48103[/C][C]50292.1381[/C][C]41233.6281[/C][C]59350.6481[/C][C]0.3179[/C][C]0.0206[/C][C]0.3911[/C][C]1[/C][/ROW]
[ROW][C]77[/C][C]47472[/C][C]47194.1699[/C][C]38135.1876[/C][C]56253.1522[/C][C]0.476[/C][C]0.4221[/C][C]0.1963[/C][C]1[/C][/ROW]
[ROW][C]78[/C][C]50497[/C][C]47875.0701[/C][C]38816.0388[/C][C]56934.1015[/C][C]0.2853[/C][C]0.5347[/C][C]0.6053[/C][C]1[/C][/ROW]
[ROW][C]79[/C][C]40059[/C][C]34462.2627[/C][C]25403.2263[/C][C]43521.2992[/C][C]0.113[/C][C]3e-04[/C][C]0.3941[/C][C]0.9979[/C][/ROW]
[ROW][C]80[/C][C]34149[/C][C]33305.7148[/C][C]24246.6778[/C][C]42364.7518[/C][C]0.4276[/C][C]0.072[/C][C]0.5045[/C][C]0.9956[/C][/ROW]
[ROW][C]81[/C][C]36860[/C][C]35382.6707[/C][C]26323.6337[/C][C]44441.7077[/C][C]0.3746[/C][C]0.6052[/C][C]0.5164[/C][C]0.9989[/C][/ROW]
[ROW][C]82[/C][C]46356[/C][C]39722.8639[/C][C]30663.8269[/C][C]48781.901[/C][C]0.0756[/C][C]0.7322[/C][C]0.3369[/C][C]1[/C][/ROW]
[ROW][C]83[/C][C]36577[/C][C]35207.5096[/C][C]26148.4725[/C][C]44266.5466[/C][C]0.3835[/C][C]0.0079[/C][C]0.5295[/C][C]0.9988[/C][/ROW]
[ROW][C]84[/C][C]23872[/C][C]21110.0978[/C][C]12051.0608[/C][C]30169.1348[/C][C]0.2751[/C][C]4e-04[/C][C]0.4914[/C][C]0.4914[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35613&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35613&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])
6020972-------
6158552-------
6254955-------
6365540-------
6451570-------
6551145-------
6646641-------
6735704-------
6833253-------
6935193-------
7041668-------
7134865-------
7221210-------
735612655086.689446510.972163662.40680.406110.21421
744923150870.749741860.702759880.79680.36070.12650.18711
755972360024.080650970.119369078.0420.4740.99030.11621
764810350292.138141233.628159350.64810.31790.02060.39111
774747247194.169938135.187656253.15220.4760.42210.19631
785049747875.070138816.038856934.10150.28530.53470.60531
794005934462.262725403.226343521.29920.1133e-040.39410.9979
803414933305.714824246.677842364.75180.42760.0720.50450.9956
813686035382.670726323.633744441.70770.37460.60520.51640.9989
824635639722.863930663.826948781.9010.07560.73220.33691
833657735207.509626148.472544266.54660.38350.00790.52950.9988
842387221110.097812051.060830169.13480.27514e-040.49140.4914







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.07940.01890.00161080166.4790013.8725300.0231
740.0904-0.03220.00272688779.1708224064.9309473.355
750.077-0.0054e-0490649.54577554.128886.9145
760.0919-0.04350.00364792325.6118399360.4676631.9497
770.09790.00595e-0477189.57296432.464480.2026
780.09650.05480.00466874516.2084572876.3507756.886
790.13410.16240.013531323468.01132610289.00091615.6389
800.13880.02530.0021711129.944759260.8287243.4355
810.13060.04180.00352182501.8284181875.1524426.4682
820.11640.1670.013943998494.06363666541.1721914.8214
830.13130.03890.00321875504.0139156292.0012395.3378
840.21890.13080.01097628103.7331635675.3111797.2925

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0794 & 0.0189 & 0.0016 & 1080166.47 & 90013.8725 & 300.0231 \tabularnewline
74 & 0.0904 & -0.0322 & 0.0027 & 2688779.1708 & 224064.9309 & 473.355 \tabularnewline
75 & 0.077 & -0.005 & 4e-04 & 90649.5457 & 7554.1288 & 86.9145 \tabularnewline
76 & 0.0919 & -0.0435 & 0.0036 & 4792325.6118 & 399360.4676 & 631.9497 \tabularnewline
77 & 0.0979 & 0.0059 & 5e-04 & 77189.5729 & 6432.4644 & 80.2026 \tabularnewline
78 & 0.0965 & 0.0548 & 0.0046 & 6874516.2084 & 572876.3507 & 756.886 \tabularnewline
79 & 0.1341 & 0.1624 & 0.0135 & 31323468.0113 & 2610289.0009 & 1615.6389 \tabularnewline
80 & 0.1388 & 0.0253 & 0.0021 & 711129.9447 & 59260.8287 & 243.4355 \tabularnewline
81 & 0.1306 & 0.0418 & 0.0035 & 2182501.8284 & 181875.1524 & 426.4682 \tabularnewline
82 & 0.1164 & 0.167 & 0.0139 & 43998494.0636 & 3666541.172 & 1914.8214 \tabularnewline
83 & 0.1313 & 0.0389 & 0.0032 & 1875504.0139 & 156292.0012 & 395.3378 \tabularnewline
84 & 0.2189 & 0.1308 & 0.0109 & 7628103.7331 & 635675.3111 & 797.2925 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35613&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.0794[/C][C]0.0189[/C][C]0.0016[/C][C]1080166.47[/C][C]90013.8725[/C][C]300.0231[/C][/ROW]
[ROW][C]74[/C][C]0.0904[/C][C]-0.0322[/C][C]0.0027[/C][C]2688779.1708[/C][C]224064.9309[/C][C]473.355[/C][/ROW]
[ROW][C]75[/C][C]0.077[/C][C]-0.005[/C][C]4e-04[/C][C]90649.5457[/C][C]7554.1288[/C][C]86.9145[/C][/ROW]
[ROW][C]76[/C][C]0.0919[/C][C]-0.0435[/C][C]0.0036[/C][C]4792325.6118[/C][C]399360.4676[/C][C]631.9497[/C][/ROW]
[ROW][C]77[/C][C]0.0979[/C][C]0.0059[/C][C]5e-04[/C][C]77189.5729[/C][C]6432.4644[/C][C]80.2026[/C][/ROW]
[ROW][C]78[/C][C]0.0965[/C][C]0.0548[/C][C]0.0046[/C][C]6874516.2084[/C][C]572876.3507[/C][C]756.886[/C][/ROW]
[ROW][C]79[/C][C]0.1341[/C][C]0.1624[/C][C]0.0135[/C][C]31323468.0113[/C][C]2610289.0009[/C][C]1615.6389[/C][/ROW]
[ROW][C]80[/C][C]0.1388[/C][C]0.0253[/C][C]0.0021[/C][C]711129.9447[/C][C]59260.8287[/C][C]243.4355[/C][/ROW]
[ROW][C]81[/C][C]0.1306[/C][C]0.0418[/C][C]0.0035[/C][C]2182501.8284[/C][C]181875.1524[/C][C]426.4682[/C][/ROW]
[ROW][C]82[/C][C]0.1164[/C][C]0.167[/C][C]0.0139[/C][C]43998494.0636[/C][C]3666541.172[/C][C]1914.8214[/C][/ROW]
[ROW][C]83[/C][C]0.1313[/C][C]0.0389[/C][C]0.0032[/C][C]1875504.0139[/C][C]156292.0012[/C][C]395.3378[/C][/ROW]
[ROW][C]84[/C][C]0.2189[/C][C]0.1308[/C][C]0.0109[/C][C]7628103.7331[/C][C]635675.3111[/C][C]797.2925[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35613&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35613&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.07940.01890.00161080166.4790013.8725300.0231
740.0904-0.03220.00272688779.1708224064.9309473.355
750.077-0.0054e-0490649.54577554.128886.9145
760.0919-0.04350.00364792325.6118399360.4676631.9497
770.09790.00595e-0477189.57296432.464480.2026
780.09650.05480.00466874516.2084572876.3507756.886
790.13410.16240.013531323468.01132610289.00091615.6389
800.13880.02530.0021711129.944759260.8287243.4355
810.13060.04180.00352182501.8284181875.1524426.4682
820.11640.1670.013943998494.06363666541.1721914.8214
830.13130.03890.00321875504.0139156292.0012395.3378
840.21890.13080.01097628103.7331635675.3111797.2925



Parameters (Session):
par1 = 60 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; 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,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')