Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 21 Dec 2007 04:59:48 -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/2007/Dec/21/t1198237309qjneydvex5yhumr.htm/, Retrieved Tue, 07 May 2024 19:48:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4797, Retrieved Tue, 07 May 2024 19:48:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact245
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-21 11:59:48] [a1fadf46580e43815db2830b4560d35f] [Current]
Feedback Forum

Post a new message
Dataseries X:
41086
39690
43129
37863
35953
29133
24693
22205
21725
27192
21790
13253
37702
30364
32609
30212
29965
28352
25814
22414
20506
28806
22228
13971
36845
35338
35022
34777
26887
23970
22780
17351
21382
24561
17409
11514
31514
27071
29462
26105
22397
23843
21705
18089
20764
25316
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698




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

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4797&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4797&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4797&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 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[60])
4815548-------
4928029-------
5029383-------
5136438-------
5232034-------
5322679-------
5424319-------
5518004-------
5617537-------
5720366-------
5822782-------
5919169-------
6013807-------
612974328695.681924814.865432576.49840.298410.63181
622559125959.441521850.626430068.25660.43020.03550.05121
632909631485.416627145.165935825.66730.14030.99610.01271
642648227568.635522532.757932604.51310.33620.27610.04111
652240522637.851117486.617627789.08450.46470.07180.49380.9996
662704426305.138420874.644731735.63210.39490.92040.76331
671797021387.646115690.679327084.61290.11980.02580.87780.9954
681873020549.713114740.038226359.38810.26960.80790.84530.9885
691968421357.14115339.759127374.52290.29290.80390.62660.993
701978526224.908120079.836432369.97980.020.98150.86391
711847921400.51615145.301627655.73040.180.69360.75780.9913
721069817602.0211213.24823990.79190.01710.39390.87780.8778

\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 & 15548 & - & - & - & - & - & - & - \tabularnewline
49 & 28029 & - & - & - & - & - & - & - \tabularnewline
50 & 29383 & - & - & - & - & - & - & - \tabularnewline
51 & 36438 & - & - & - & - & - & - & - \tabularnewline
52 & 32034 & - & - & - & - & - & - & - \tabularnewline
53 & 22679 & - & - & - & - & - & - & - \tabularnewline
54 & 24319 & - & - & - & - & - & - & - \tabularnewline
55 & 18004 & - & - & - & - & - & - & - \tabularnewline
56 & 17537 & - & - & - & - & - & - & - \tabularnewline
57 & 20366 & - & - & - & - & - & - & - \tabularnewline
58 & 22782 & - & - & - & - & - & - & - \tabularnewline
59 & 19169 & - & - & - & - & - & - & - \tabularnewline
60 & 13807 & - & - & - & - & - & - & - \tabularnewline
61 & 29743 & 28695.6819 & 24814.8654 & 32576.4984 & 0.2984 & 1 & 0.6318 & 1 \tabularnewline
62 & 25591 & 25959.4415 & 21850.6264 & 30068.2566 & 0.4302 & 0.0355 & 0.0512 & 1 \tabularnewline
63 & 29096 & 31485.4166 & 27145.1659 & 35825.6673 & 0.1403 & 0.9961 & 0.0127 & 1 \tabularnewline
64 & 26482 & 27568.6355 & 22532.7579 & 32604.5131 & 0.3362 & 0.2761 & 0.0411 & 1 \tabularnewline
65 & 22405 & 22637.8511 & 17486.6176 & 27789.0845 & 0.4647 & 0.0718 & 0.4938 & 0.9996 \tabularnewline
66 & 27044 & 26305.1384 & 20874.6447 & 31735.6321 & 0.3949 & 0.9204 & 0.7633 & 1 \tabularnewline
67 & 17970 & 21387.6461 & 15690.6793 & 27084.6129 & 0.1198 & 0.0258 & 0.8778 & 0.9954 \tabularnewline
68 & 18730 & 20549.7131 & 14740.0382 & 26359.3881 & 0.2696 & 0.8079 & 0.8453 & 0.9885 \tabularnewline
69 & 19684 & 21357.141 & 15339.7591 & 27374.5229 & 0.2929 & 0.8039 & 0.6266 & 0.993 \tabularnewline
70 & 19785 & 26224.9081 & 20079.8364 & 32369.9798 & 0.02 & 0.9815 & 0.8639 & 1 \tabularnewline
71 & 18479 & 21400.516 & 15145.3016 & 27655.7304 & 0.18 & 0.6936 & 0.7578 & 0.9913 \tabularnewline
72 & 10698 & 17602.02 & 11213.248 & 23990.7919 & 0.0171 & 0.3939 & 0.8778 & 0.8778 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4797&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]15548[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]28029[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]29383[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]36438[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]32034[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]22679[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]24319[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]18004[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]17537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]20366[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]22782[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]19169[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]13807[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]29743[/C][C]28695.6819[/C][C]24814.8654[/C][C]32576.4984[/C][C]0.2984[/C][C]1[/C][C]0.6318[/C][C]1[/C][/ROW]
[ROW][C]62[/C][C]25591[/C][C]25959.4415[/C][C]21850.6264[/C][C]30068.2566[/C][C]0.4302[/C][C]0.0355[/C][C]0.0512[/C][C]1[/C][/ROW]
[ROW][C]63[/C][C]29096[/C][C]31485.4166[/C][C]27145.1659[/C][C]35825.6673[/C][C]0.1403[/C][C]0.9961[/C][C]0.0127[/C][C]1[/C][/ROW]
[ROW][C]64[/C][C]26482[/C][C]27568.6355[/C][C]22532.7579[/C][C]32604.5131[/C][C]0.3362[/C][C]0.2761[/C][C]0.0411[/C][C]1[/C][/ROW]
[ROW][C]65[/C][C]22405[/C][C]22637.8511[/C][C]17486.6176[/C][C]27789.0845[/C][C]0.4647[/C][C]0.0718[/C][C]0.4938[/C][C]0.9996[/C][/ROW]
[ROW][C]66[/C][C]27044[/C][C]26305.1384[/C][C]20874.6447[/C][C]31735.6321[/C][C]0.3949[/C][C]0.9204[/C][C]0.7633[/C][C]1[/C][/ROW]
[ROW][C]67[/C][C]17970[/C][C]21387.6461[/C][C]15690.6793[/C][C]27084.6129[/C][C]0.1198[/C][C]0.0258[/C][C]0.8778[/C][C]0.9954[/C][/ROW]
[ROW][C]68[/C][C]18730[/C][C]20549.7131[/C][C]14740.0382[/C][C]26359.3881[/C][C]0.2696[/C][C]0.8079[/C][C]0.8453[/C][C]0.9885[/C][/ROW]
[ROW][C]69[/C][C]19684[/C][C]21357.141[/C][C]15339.7591[/C][C]27374.5229[/C][C]0.2929[/C][C]0.8039[/C][C]0.6266[/C][C]0.993[/C][/ROW]
[ROW][C]70[/C][C]19785[/C][C]26224.9081[/C][C]20079.8364[/C][C]32369.9798[/C][C]0.02[/C][C]0.9815[/C][C]0.8639[/C][C]1[/C][/ROW]
[ROW][C]71[/C][C]18479[/C][C]21400.516[/C][C]15145.3016[/C][C]27655.7304[/C][C]0.18[/C][C]0.6936[/C][C]0.7578[/C][C]0.9913[/C][/ROW]
[ROW][C]72[/C][C]10698[/C][C]17602.02[/C][C]11213.248[/C][C]23990.7919[/C][C]0.0171[/C][C]0.3939[/C][C]0.8778[/C][C]0.8778[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4797&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4797&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])
4815548-------
4928029-------
5029383-------
5136438-------
5232034-------
5322679-------
5424319-------
5518004-------
5617537-------
5720366-------
5822782-------
5919169-------
6013807-------
612974328695.681924814.865432576.49840.298410.63181
622559125959.441521850.626430068.25660.43020.03550.05121
632909631485.416627145.165935825.66730.14030.99610.01271
642648227568.635522532.757932604.51310.33620.27610.04111
652240522637.851117486.617627789.08450.46470.07180.49380.9996
662704426305.138420874.644731735.63210.39490.92040.76331
671797021387.646115690.679327084.61290.11980.02580.87780.9954
681873020549.713114740.038226359.38810.26960.80790.84530.9885
691968421357.14115339.759127374.52290.29290.80390.62660.993
701978526224.908120079.836432369.97980.020.98150.86391
711847921400.51615145.301627655.73040.180.69360.75780.9913
721069817602.0211213.24823990.79190.01710.39390.87780.8778







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0690.03650.0031096875.212891406.2677302.3347
620.0808-0.01420.0012135749.150211312.4292106.3599
630.0703-0.07590.00635709311.7988475775.9832689.7652
640.0932-0.03940.00331180776.805998398.0672313.6847
650.1161-0.01039e-0454219.61584518.301367.2183
660.10530.02810.0023545916.470145493.0392213.291
670.1359-0.15980.013311680304.6112973358.7176986.5894
680.1442-0.08860.00743311355.8457275946.3205525.3059
690.1438-0.07830.00652799400.7616233283.3968482.9942
700.1196-0.24560.020541472416.35713456034.69641859.0413
710.1491-0.13650.01148535255.7869711271.3156843.369
720.1852-0.39220.032747665491.5223972124.29351993.0189

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.069 & 0.0365 & 0.003 & 1096875.2128 & 91406.2677 & 302.3347 \tabularnewline
62 & 0.0808 & -0.0142 & 0.0012 & 135749.1502 & 11312.4292 & 106.3599 \tabularnewline
63 & 0.0703 & -0.0759 & 0.0063 & 5709311.7988 & 475775.9832 & 689.7652 \tabularnewline
64 & 0.0932 & -0.0394 & 0.0033 & 1180776.8059 & 98398.0672 & 313.6847 \tabularnewline
65 & 0.1161 & -0.0103 & 9e-04 & 54219.6158 & 4518.3013 & 67.2183 \tabularnewline
66 & 0.1053 & 0.0281 & 0.0023 & 545916.4701 & 45493.0392 & 213.291 \tabularnewline
67 & 0.1359 & -0.1598 & 0.0133 & 11680304.6112 & 973358.7176 & 986.5894 \tabularnewline
68 & 0.1442 & -0.0886 & 0.0074 & 3311355.8457 & 275946.3205 & 525.3059 \tabularnewline
69 & 0.1438 & -0.0783 & 0.0065 & 2799400.7616 & 233283.3968 & 482.9942 \tabularnewline
70 & 0.1196 & -0.2456 & 0.0205 & 41472416.3571 & 3456034.6964 & 1859.0413 \tabularnewline
71 & 0.1491 & -0.1365 & 0.0114 & 8535255.7869 & 711271.3156 & 843.369 \tabularnewline
72 & 0.1852 & -0.3922 & 0.0327 & 47665491.522 & 3972124.2935 & 1993.0189 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4797&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]61[/C][C]0.069[/C][C]0.0365[/C][C]0.003[/C][C]1096875.2128[/C][C]91406.2677[/C][C]302.3347[/C][/ROW]
[ROW][C]62[/C][C]0.0808[/C][C]-0.0142[/C][C]0.0012[/C][C]135749.1502[/C][C]11312.4292[/C][C]106.3599[/C][/ROW]
[ROW][C]63[/C][C]0.0703[/C][C]-0.0759[/C][C]0.0063[/C][C]5709311.7988[/C][C]475775.9832[/C][C]689.7652[/C][/ROW]
[ROW][C]64[/C][C]0.0932[/C][C]-0.0394[/C][C]0.0033[/C][C]1180776.8059[/C][C]98398.0672[/C][C]313.6847[/C][/ROW]
[ROW][C]65[/C][C]0.1161[/C][C]-0.0103[/C][C]9e-04[/C][C]54219.6158[/C][C]4518.3013[/C][C]67.2183[/C][/ROW]
[ROW][C]66[/C][C]0.1053[/C][C]0.0281[/C][C]0.0023[/C][C]545916.4701[/C][C]45493.0392[/C][C]213.291[/C][/ROW]
[ROW][C]67[/C][C]0.1359[/C][C]-0.1598[/C][C]0.0133[/C][C]11680304.6112[/C][C]973358.7176[/C][C]986.5894[/C][/ROW]
[ROW][C]68[/C][C]0.1442[/C][C]-0.0886[/C][C]0.0074[/C][C]3311355.8457[/C][C]275946.3205[/C][C]525.3059[/C][/ROW]
[ROW][C]69[/C][C]0.1438[/C][C]-0.0783[/C][C]0.0065[/C][C]2799400.7616[/C][C]233283.3968[/C][C]482.9942[/C][/ROW]
[ROW][C]70[/C][C]0.1196[/C][C]-0.2456[/C][C]0.0205[/C][C]41472416.3571[/C][C]3456034.6964[/C][C]1859.0413[/C][/ROW]
[ROW][C]71[/C][C]0.1491[/C][C]-0.1365[/C][C]0.0114[/C][C]8535255.7869[/C][C]711271.3156[/C][C]843.369[/C][/ROW]
[ROW][C]72[/C][C]0.1852[/C][C]-0.3922[/C][C]0.0327[/C][C]47665491.522[/C][C]3972124.2935[/C][C]1993.0189[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4797&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4797&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
610.0690.03650.0031096875.212891406.2677302.3347
620.0808-0.01420.0012135749.150211312.4292106.3599
630.0703-0.07590.00635709311.7988475775.9832689.7652
640.0932-0.03940.00331180776.805998398.0672313.6847
650.1161-0.01039e-0454219.61584518.301367.2183
660.10530.02810.0023545916.470145493.0392213.291
670.1359-0.15980.013311680304.6112973358.7176986.5894
680.1442-0.08860.00743311355.8457275946.3205525.3059
690.1438-0.07830.00652799400.7616233283.3968482.9942
700.1196-0.24560.020541472416.35713456034.69641859.0413
710.1491-0.13650.01148535255.7869711271.3156843.369
720.1852-0.39220.032747665491.5223972124.29351993.0189



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