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, 20 Dec 2009 09:27:27 -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/2009/Dec/20/t1261326476o9wr3hxic3u065l.htm/, Retrieved Sat, 27 Apr 2024 08:05:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69940, Retrieved Sat, 27 Apr 2024 08:05:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact160
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper - Arima For...] [2008-12-14 14:14:00] [7a664918911e34206ce9d0436dd7c1c8]
-   P   [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-15 14:52:51] [12d343c4448a5f9e527bb31caeac580b]
-  MPD      [ARIMA Forecasting] [paper 10] [2009-12-20 16:27:27] [71c065898bd1c08eef04509b4bcee039] [Current]
Feedback Forum

Post a new message
Dataseries X:
31,48
29,90
33,84
39,12
33,70
25,09
51,44
45,59
52,52
48,56
41,75
49,59
32,75
33,38
35,65
37,03
35,68
20,97
58,55
54,96
65,54
51,57
51,15
46,64
35,70
33,25
35,19
41,67
34,87
21,21
56,13
49,23
59,72
48,10
47,47
50,50
40,06
34,15
36,86
46,36
36,58
23,87
57,28
56,39
57,66
62,30
48,93
51,17
39,64
33,21
38,13
43,29
30,60
21,96
48,03
46,15
50,74
48,11
38,39
44,11




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=69940&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=69940&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69940&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[48])
3650.5-------
3740.06-------
3834.15-------
3936.86-------
4046.36-------
4136.58-------
4223.87-------
4357.28-------
4456.39-------
4557.66-------
4662.3-------
4748.93-------
4851.17-------
4939.6441.210731.951350.47010.36980.01750.59620.0175
5033.2135.008225.064544.95190.36150.18060.56727e-04
5138.1337.896225.704950.08760.4850.77440.56620.0164
5243.2947.287934.123560.45230.27580.91360.55490.2816
5330.637.573823.006752.14090.1740.22090.55320.0337
5421.9624.82379.265540.38190.35910.23340.54785e-04
5548.0358.258141.606674.90960.114310.54580.7979
5646.1557.353239.769874.93670.10590.85070.54280.7547
5750.7458.632340.1177.15460.20180.90670.5410.7851
5848.1163.266843.882482.65120.06270.89740.53890.8894
5938.3949.900129.672170.12810.13240.56890.53740.451
6044.1152.138131.11173.16520.22710.90.5360.536

\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 & 50.5 & - & - & - & - & - & - & - \tabularnewline
37 & 40.06 & - & - & - & - & - & - & - \tabularnewline
38 & 34.15 & - & - & - & - & - & - & - \tabularnewline
39 & 36.86 & - & - & - & - & - & - & - \tabularnewline
40 & 46.36 & - & - & - & - & - & - & - \tabularnewline
41 & 36.58 & - & - & - & - & - & - & - \tabularnewline
42 & 23.87 & - & - & - & - & - & - & - \tabularnewline
43 & 57.28 & - & - & - & - & - & - & - \tabularnewline
44 & 56.39 & - & - & - & - & - & - & - \tabularnewline
45 & 57.66 & - & - & - & - & - & - & - \tabularnewline
46 & 62.3 & - & - & - & - & - & - & - \tabularnewline
47 & 48.93 & - & - & - & - & - & - & - \tabularnewline
48 & 51.17 & - & - & - & - & - & - & - \tabularnewline
49 & 39.64 & 41.2107 & 31.9513 & 50.4701 & 0.3698 & 0.0175 & 0.5962 & 0.0175 \tabularnewline
50 & 33.21 & 35.0082 & 25.0645 & 44.9519 & 0.3615 & 0.1806 & 0.5672 & 7e-04 \tabularnewline
51 & 38.13 & 37.8962 & 25.7049 & 50.0876 & 0.485 & 0.7744 & 0.5662 & 0.0164 \tabularnewline
52 & 43.29 & 47.2879 & 34.1235 & 60.4523 & 0.2758 & 0.9136 & 0.5549 & 0.2816 \tabularnewline
53 & 30.6 & 37.5738 & 23.0067 & 52.1409 & 0.174 & 0.2209 & 0.5532 & 0.0337 \tabularnewline
54 & 21.96 & 24.8237 & 9.2655 & 40.3819 & 0.3591 & 0.2334 & 0.5478 & 5e-04 \tabularnewline
55 & 48.03 & 58.2581 & 41.6066 & 74.9096 & 0.1143 & 1 & 0.5458 & 0.7979 \tabularnewline
56 & 46.15 & 57.3532 & 39.7698 & 74.9367 & 0.1059 & 0.8507 & 0.5428 & 0.7547 \tabularnewline
57 & 50.74 & 58.6323 & 40.11 & 77.1546 & 0.2018 & 0.9067 & 0.541 & 0.7851 \tabularnewline
58 & 48.11 & 63.2668 & 43.8824 & 82.6512 & 0.0627 & 0.8974 & 0.5389 & 0.8894 \tabularnewline
59 & 38.39 & 49.9001 & 29.6721 & 70.1281 & 0.1324 & 0.5689 & 0.5374 & 0.451 \tabularnewline
60 & 44.11 & 52.1381 & 31.111 & 73.1652 & 0.2271 & 0.9 & 0.536 & 0.536 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69940&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]50.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]40.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]34.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]36.86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]46.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]36.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]23.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]57.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]56.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]57.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]62.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]48.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]51.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]39.64[/C][C]41.2107[/C][C]31.9513[/C][C]50.4701[/C][C]0.3698[/C][C]0.0175[/C][C]0.5962[/C][C]0.0175[/C][/ROW]
[ROW][C]50[/C][C]33.21[/C][C]35.0082[/C][C]25.0645[/C][C]44.9519[/C][C]0.3615[/C][C]0.1806[/C][C]0.5672[/C][C]7e-04[/C][/ROW]
[ROW][C]51[/C][C]38.13[/C][C]37.8962[/C][C]25.7049[/C][C]50.0876[/C][C]0.485[/C][C]0.7744[/C][C]0.5662[/C][C]0.0164[/C][/ROW]
[ROW][C]52[/C][C]43.29[/C][C]47.2879[/C][C]34.1235[/C][C]60.4523[/C][C]0.2758[/C][C]0.9136[/C][C]0.5549[/C][C]0.2816[/C][/ROW]
[ROW][C]53[/C][C]30.6[/C][C]37.5738[/C][C]23.0067[/C][C]52.1409[/C][C]0.174[/C][C]0.2209[/C][C]0.5532[/C][C]0.0337[/C][/ROW]
[ROW][C]54[/C][C]21.96[/C][C]24.8237[/C][C]9.2655[/C][C]40.3819[/C][C]0.3591[/C][C]0.2334[/C][C]0.5478[/C][C]5e-04[/C][/ROW]
[ROW][C]55[/C][C]48.03[/C][C]58.2581[/C][C]41.6066[/C][C]74.9096[/C][C]0.1143[/C][C]1[/C][C]0.5458[/C][C]0.7979[/C][/ROW]
[ROW][C]56[/C][C]46.15[/C][C]57.3532[/C][C]39.7698[/C][C]74.9367[/C][C]0.1059[/C][C]0.8507[/C][C]0.5428[/C][C]0.7547[/C][/ROW]
[ROW][C]57[/C][C]50.74[/C][C]58.6323[/C][C]40.11[/C][C]77.1546[/C][C]0.2018[/C][C]0.9067[/C][C]0.541[/C][C]0.7851[/C][/ROW]
[ROW][C]58[/C][C]48.11[/C][C]63.2668[/C][C]43.8824[/C][C]82.6512[/C][C]0.0627[/C][C]0.8974[/C][C]0.5389[/C][C]0.8894[/C][/ROW]
[ROW][C]59[/C][C]38.39[/C][C]49.9001[/C][C]29.6721[/C][C]70.1281[/C][C]0.1324[/C][C]0.5689[/C][C]0.5374[/C][C]0.451[/C][/ROW]
[ROW][C]60[/C][C]44.11[/C][C]52.1381[/C][C]31.111[/C][C]73.1652[/C][C]0.2271[/C][C]0.9[/C][C]0.536[/C][C]0.536[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69940&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69940&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])
3650.5-------
3740.06-------
3834.15-------
3936.86-------
4046.36-------
4136.58-------
4223.87-------
4357.28-------
4456.39-------
4557.66-------
4662.3-------
4748.93-------
4851.17-------
4939.6441.210731.951350.47010.36980.01750.59620.0175
5033.2135.008225.064544.95190.36150.18060.56727e-04
5138.1337.896225.704950.08760.4850.77440.56620.0164
5243.2947.287934.123560.45230.27580.91360.55490.2816
5330.637.573823.006752.14090.1740.22090.55320.0337
5421.9624.82379.265540.38190.35910.23340.54785e-04
5548.0358.258141.606674.90960.114310.54580.7979
5646.1557.353239.769874.93670.10590.85070.54280.7547
5750.7458.632340.1177.15460.20180.90670.5410.7851
5848.1163.266843.882482.65120.06270.89740.53890.8894
5938.3949.900129.672170.12810.13240.56890.53740.451
6044.1152.138131.11173.16520.22710.90.5360.536







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1146-0.03810.00322.46720.20560.4534
500.1449-0.05140.00433.23350.26950.5191
510.16410.00625e-040.05470.00460.0675
520.142-0.08450.00715.98311.33191.1541
530.1978-0.18560.015548.63394.05282.0132
540.3198-0.11540.00968.20070.68340.8267
550.1458-0.17560.0146104.61398.71782.9526
560.1564-0.19530.0163125.512710.45943.2341
570.1612-0.13460.011262.28815.19072.2783
580.1563-0.23960.02229.72819.1444.3754
590.2068-0.23070.0192132.483111.04033.3227
600.2058-0.1540.012864.45035.37092.3175

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1146 & -0.0381 & 0.0032 & 2.4672 & 0.2056 & 0.4534 \tabularnewline
50 & 0.1449 & -0.0514 & 0.0043 & 3.2335 & 0.2695 & 0.5191 \tabularnewline
51 & 0.1641 & 0.0062 & 5e-04 & 0.0547 & 0.0046 & 0.0675 \tabularnewline
52 & 0.142 & -0.0845 & 0.007 & 15.9831 & 1.3319 & 1.1541 \tabularnewline
53 & 0.1978 & -0.1856 & 0.0155 & 48.6339 & 4.0528 & 2.0132 \tabularnewline
54 & 0.3198 & -0.1154 & 0.0096 & 8.2007 & 0.6834 & 0.8267 \tabularnewline
55 & 0.1458 & -0.1756 & 0.0146 & 104.6139 & 8.7178 & 2.9526 \tabularnewline
56 & 0.1564 & -0.1953 & 0.0163 & 125.5127 & 10.4594 & 3.2341 \tabularnewline
57 & 0.1612 & -0.1346 & 0.0112 & 62.2881 & 5.1907 & 2.2783 \tabularnewline
58 & 0.1563 & -0.2396 & 0.02 & 229.728 & 19.144 & 4.3754 \tabularnewline
59 & 0.2068 & -0.2307 & 0.0192 & 132.4831 & 11.0403 & 3.3227 \tabularnewline
60 & 0.2058 & -0.154 & 0.0128 & 64.4503 & 5.3709 & 2.3175 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69940&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.1146[/C][C]-0.0381[/C][C]0.0032[/C][C]2.4672[/C][C]0.2056[/C][C]0.4534[/C][/ROW]
[ROW][C]50[/C][C]0.1449[/C][C]-0.0514[/C][C]0.0043[/C][C]3.2335[/C][C]0.2695[/C][C]0.5191[/C][/ROW]
[ROW][C]51[/C][C]0.1641[/C][C]0.0062[/C][C]5e-04[/C][C]0.0547[/C][C]0.0046[/C][C]0.0675[/C][/ROW]
[ROW][C]52[/C][C]0.142[/C][C]-0.0845[/C][C]0.007[/C][C]15.9831[/C][C]1.3319[/C][C]1.1541[/C][/ROW]
[ROW][C]53[/C][C]0.1978[/C][C]-0.1856[/C][C]0.0155[/C][C]48.6339[/C][C]4.0528[/C][C]2.0132[/C][/ROW]
[ROW][C]54[/C][C]0.3198[/C][C]-0.1154[/C][C]0.0096[/C][C]8.2007[/C][C]0.6834[/C][C]0.8267[/C][/ROW]
[ROW][C]55[/C][C]0.1458[/C][C]-0.1756[/C][C]0.0146[/C][C]104.6139[/C][C]8.7178[/C][C]2.9526[/C][/ROW]
[ROW][C]56[/C][C]0.1564[/C][C]-0.1953[/C][C]0.0163[/C][C]125.5127[/C][C]10.4594[/C][C]3.2341[/C][/ROW]
[ROW][C]57[/C][C]0.1612[/C][C]-0.1346[/C][C]0.0112[/C][C]62.2881[/C][C]5.1907[/C][C]2.2783[/C][/ROW]
[ROW][C]58[/C][C]0.1563[/C][C]-0.2396[/C][C]0.02[/C][C]229.728[/C][C]19.144[/C][C]4.3754[/C][/ROW]
[ROW][C]59[/C][C]0.2068[/C][C]-0.2307[/C][C]0.0192[/C][C]132.4831[/C][C]11.0403[/C][C]3.3227[/C][/ROW]
[ROW][C]60[/C][C]0.2058[/C][C]-0.154[/C][C]0.0128[/C][C]64.4503[/C][C]5.3709[/C][C]2.3175[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69940&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69940&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.1146-0.03810.00322.46720.20560.4534
500.1449-0.05140.00433.23350.26950.5191
510.16410.00625e-040.05470.00460.0675
520.142-0.08450.00715.98311.33191.1541
530.1978-0.18560.015548.63394.05282.0132
540.3198-0.11540.00968.20070.68340.8267
550.1458-0.17560.0146104.61398.71782.9526
560.1564-0.19530.0163125.512710.45943.2341
570.1612-0.13460.011262.28815.19072.2783
580.1563-0.23960.02229.72819.1444.3754
590.2068-0.23070.0192132.483111.04033.3227
600.2058-0.1540.012864.45035.37092.3175



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