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 computationFri, 11 Dec 2009 10:57:23 -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/11/t1260554539hu2bq07gofgbb65.htm/, Retrieved Sun, 28 Apr 2024 23:44:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66619, Retrieved Sun, 28 Apr 2024 23:44:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact136
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2009-12-11 17:57:23] [9f6463b67b1eb7bae5c03a796abf0348] [Current]
-   PD    [ARIMA Forecasting] [Paper: Arima-fore...] [2009-12-30 19:00:36] [03d5b865e91ca35b5a5d21b8d6da5aba]
Feedback Forum

Post a new message
Dataseries X:
12610
10862
52929
56902
81776
87876
82103
72846
60632
33521
15342
7758
8668
13082
38157
58263
81153
88476
72329
75845
61108
37665
12755
2793
12935
19533
33404
52074
70735
69702
61656
82993
53990
32283
15686
2713
12842
19244
48488
54464
84192
84458
85793
75163
68212
49233
24302
5402
15058
33559
70358
85934
94452
129305
113882
107256
94274
57842
26611
14521




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66619&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])
362713-------
3712842-------
3819244-------
3948488-------
4054464-------
4184192-------
4284458-------
4385793-------
4475163-------
4568212-------
4649233-------
4724302-------
485402-------
491505818276.56310325.064129754.9670.29130.9860.82330.986
503355926353.785215660.664641333.61430.17290.93030.82390.9969
517035861699.688441116.929888592.02650.2640.97990.83221
528593468753.485746019.198376.39290.12780.45770.82781
5394452103379.68772074.377143146.47190.330.80510.82791
54129305103686.778771746.4969144452.04050.1090.67150.82241
55113882105227.402772379.1418147308.39650.34340.1310.81731
5610725692930.645762470.1556132514.78840.23910.14980.81051
579427484849.756755925.9643122897.69880.31370.12420.80431
585784262581.241639178.850694351.53070.3850.02530.79490.9998
592661132610.115718084.462553807.84560.28960.00980.77880.9941
60145218478.66683295.459817689.60840.09931e-040.74370.7437

\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 & 2713 & - & - & - & - & - & - & - \tabularnewline
37 & 12842 & - & - & - & - & - & - & - \tabularnewline
38 & 19244 & - & - & - & - & - & - & - \tabularnewline
39 & 48488 & - & - & - & - & - & - & - \tabularnewline
40 & 54464 & - & - & - & - & - & - & - \tabularnewline
41 & 84192 & - & - & - & - & - & - & - \tabularnewline
42 & 84458 & - & - & - & - & - & - & - \tabularnewline
43 & 85793 & - & - & - & - & - & - & - \tabularnewline
44 & 75163 & - & - & - & - & - & - & - \tabularnewline
45 & 68212 & - & - & - & - & - & - & - \tabularnewline
46 & 49233 & - & - & - & - & - & - & - \tabularnewline
47 & 24302 & - & - & - & - & - & - & - \tabularnewline
48 & 5402 & - & - & - & - & - & - & - \tabularnewline
49 & 15058 & 18276.563 & 10325.0641 & 29754.967 & 0.2913 & 0.986 & 0.8233 & 0.986 \tabularnewline
50 & 33559 & 26353.7852 & 15660.6646 & 41333.6143 & 0.1729 & 0.9303 & 0.8239 & 0.9969 \tabularnewline
51 & 70358 & 61699.6884 & 41116.9298 & 88592.0265 & 0.264 & 0.9799 & 0.8322 & 1 \tabularnewline
52 & 85934 & 68753.4857 & 46019.1 & 98376.3929 & 0.1278 & 0.4577 & 0.8278 & 1 \tabularnewline
53 & 94452 & 103379.687 & 72074.377 & 143146.4719 & 0.33 & 0.8051 & 0.8279 & 1 \tabularnewline
54 & 129305 & 103686.7787 & 71746.4969 & 144452.0405 & 0.109 & 0.6715 & 0.8224 & 1 \tabularnewline
55 & 113882 & 105227.4027 & 72379.1418 & 147308.3965 & 0.3434 & 0.131 & 0.8173 & 1 \tabularnewline
56 & 107256 & 92930.6457 & 62470.1556 & 132514.7884 & 0.2391 & 0.1498 & 0.8105 & 1 \tabularnewline
57 & 94274 & 84849.7567 & 55925.9643 & 122897.6988 & 0.3137 & 0.1242 & 0.8043 & 1 \tabularnewline
58 & 57842 & 62581.2416 & 39178.8506 & 94351.5307 & 0.385 & 0.0253 & 0.7949 & 0.9998 \tabularnewline
59 & 26611 & 32610.1157 & 18084.4625 & 53807.8456 & 0.2896 & 0.0098 & 0.7788 & 0.9941 \tabularnewline
60 & 14521 & 8478.6668 & 3295.4598 & 17689.6084 & 0.0993 & 1e-04 & 0.7437 & 0.7437 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66619&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]2713[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]12842[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]19244[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]48488[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]54464[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]84192[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]84458[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]85793[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]75163[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]68212[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]49233[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]24302[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]5402[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]15058[/C][C]18276.563[/C][C]10325.0641[/C][C]29754.967[/C][C]0.2913[/C][C]0.986[/C][C]0.8233[/C][C]0.986[/C][/ROW]
[ROW][C]50[/C][C]33559[/C][C]26353.7852[/C][C]15660.6646[/C][C]41333.6143[/C][C]0.1729[/C][C]0.9303[/C][C]0.8239[/C][C]0.9969[/C][/ROW]
[ROW][C]51[/C][C]70358[/C][C]61699.6884[/C][C]41116.9298[/C][C]88592.0265[/C][C]0.264[/C][C]0.9799[/C][C]0.8322[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]85934[/C][C]68753.4857[/C][C]46019.1[/C][C]98376.3929[/C][C]0.1278[/C][C]0.4577[/C][C]0.8278[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]94452[/C][C]103379.687[/C][C]72074.377[/C][C]143146.4719[/C][C]0.33[/C][C]0.8051[/C][C]0.8279[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]129305[/C][C]103686.7787[/C][C]71746.4969[/C][C]144452.0405[/C][C]0.109[/C][C]0.6715[/C][C]0.8224[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]113882[/C][C]105227.4027[/C][C]72379.1418[/C][C]147308.3965[/C][C]0.3434[/C][C]0.131[/C][C]0.8173[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]107256[/C][C]92930.6457[/C][C]62470.1556[/C][C]132514.7884[/C][C]0.2391[/C][C]0.1498[/C][C]0.8105[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]94274[/C][C]84849.7567[/C][C]55925.9643[/C][C]122897.6988[/C][C]0.3137[/C][C]0.1242[/C][C]0.8043[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]57842[/C][C]62581.2416[/C][C]39178.8506[/C][C]94351.5307[/C][C]0.385[/C][C]0.0253[/C][C]0.7949[/C][C]0.9998[/C][/ROW]
[ROW][C]59[/C][C]26611[/C][C]32610.1157[/C][C]18084.4625[/C][C]53807.8456[/C][C]0.2896[/C][C]0.0098[/C][C]0.7788[/C][C]0.9941[/C][/ROW]
[ROW][C]60[/C][C]14521[/C][C]8478.6668[/C][C]3295.4598[/C][C]17689.6084[/C][C]0.0993[/C][C]1e-04[/C][C]0.7437[/C][C]0.7437[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66619&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66619&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])
362713-------
3712842-------
3819244-------
3948488-------
4054464-------
4184192-------
4284458-------
4385793-------
4475163-------
4568212-------
4649233-------
4724302-------
485402-------
491505818276.56310325.064129754.9670.29130.9860.82330.986
503355926353.785215660.664641333.61430.17290.93030.82390.9969
517035861699.688441116.929888592.02650.2640.97990.83221
528593468753.485746019.198376.39290.12780.45770.82781
5394452103379.68772074.377143146.47190.330.80510.82791
54129305103686.778771746.4969144452.04050.1090.67150.82241
55113882105227.402772379.1418147308.39650.34340.1310.81731
5610725692930.645762470.1556132514.78840.23910.14980.81051
579427484849.756755925.9643122897.69880.31370.12420.80431
585784262581.241639178.850694351.53070.3850.02530.79490.9998
592661132610.115718084.462553807.84560.28960.00980.77880.9941
60145218478.66683295.459817689.60840.09931e-040.74370.7437







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.3204-0.1761010359147.651700
500.290.27340.224851915120.219931137133.93585580.0658
510.22240.14030.196674966360.585845746876.15256763.6437
520.21980.24990.2099295170072.4033108102675.215210397.2436
530.1963-0.08640.185279703595.9666102422859.365510120.4179
540.20060.24710.1955656293260.9894194734592.969513954.7337
550.2040.08220.179374902054.2757177615658.870413327.2525
560.21730.15420.1762205215774.7559181065673.356113456.0646
570.22880.11110.16988816361.0152170815749.762613069.6499
580.259-0.07570.159622460411.1332155980215.899712489.204
590.3317-0.1840.161835989389.0577145071958.91412044.5821
600.55430.71270.207736509791.1007136025111.596311662.9804

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.3204 & -0.1761 & 0 & 10359147.6517 & 0 & 0 \tabularnewline
50 & 0.29 & 0.2734 & 0.2248 & 51915120.2199 & 31137133.9358 & 5580.0658 \tabularnewline
51 & 0.2224 & 0.1403 & 0.1966 & 74966360.5858 & 45746876.1525 & 6763.6437 \tabularnewline
52 & 0.2198 & 0.2499 & 0.2099 & 295170072.4033 & 108102675.2152 & 10397.2436 \tabularnewline
53 & 0.1963 & -0.0864 & 0.1852 & 79703595.9666 & 102422859.3655 & 10120.4179 \tabularnewline
54 & 0.2006 & 0.2471 & 0.1955 & 656293260.9894 & 194734592.9695 & 13954.7337 \tabularnewline
55 & 0.204 & 0.0822 & 0.1793 & 74902054.2757 & 177615658.8704 & 13327.2525 \tabularnewline
56 & 0.2173 & 0.1542 & 0.1762 & 205215774.7559 & 181065673.3561 & 13456.0646 \tabularnewline
57 & 0.2288 & 0.1111 & 0.169 & 88816361.0152 & 170815749.7626 & 13069.6499 \tabularnewline
58 & 0.259 & -0.0757 & 0.1596 & 22460411.1332 & 155980215.8997 & 12489.204 \tabularnewline
59 & 0.3317 & -0.184 & 0.1618 & 35989389.0577 & 145071958.914 & 12044.5821 \tabularnewline
60 & 0.5543 & 0.7127 & 0.2077 & 36509791.1007 & 136025111.5963 & 11662.9804 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66619&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.3204[/C][C]-0.1761[/C][C]0[/C][C]10359147.6517[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.29[/C][C]0.2734[/C][C]0.2248[/C][C]51915120.2199[/C][C]31137133.9358[/C][C]5580.0658[/C][/ROW]
[ROW][C]51[/C][C]0.2224[/C][C]0.1403[/C][C]0.1966[/C][C]74966360.5858[/C][C]45746876.1525[/C][C]6763.6437[/C][/ROW]
[ROW][C]52[/C][C]0.2198[/C][C]0.2499[/C][C]0.2099[/C][C]295170072.4033[/C][C]108102675.2152[/C][C]10397.2436[/C][/ROW]
[ROW][C]53[/C][C]0.1963[/C][C]-0.0864[/C][C]0.1852[/C][C]79703595.9666[/C][C]102422859.3655[/C][C]10120.4179[/C][/ROW]
[ROW][C]54[/C][C]0.2006[/C][C]0.2471[/C][C]0.1955[/C][C]656293260.9894[/C][C]194734592.9695[/C][C]13954.7337[/C][/ROW]
[ROW][C]55[/C][C]0.204[/C][C]0.0822[/C][C]0.1793[/C][C]74902054.2757[/C][C]177615658.8704[/C][C]13327.2525[/C][/ROW]
[ROW][C]56[/C][C]0.2173[/C][C]0.1542[/C][C]0.1762[/C][C]205215774.7559[/C][C]181065673.3561[/C][C]13456.0646[/C][/ROW]
[ROW][C]57[/C][C]0.2288[/C][C]0.1111[/C][C]0.169[/C][C]88816361.0152[/C][C]170815749.7626[/C][C]13069.6499[/C][/ROW]
[ROW][C]58[/C][C]0.259[/C][C]-0.0757[/C][C]0.1596[/C][C]22460411.1332[/C][C]155980215.8997[/C][C]12489.204[/C][/ROW]
[ROW][C]59[/C][C]0.3317[/C][C]-0.184[/C][C]0.1618[/C][C]35989389.0577[/C][C]145071958.914[/C][C]12044.5821[/C][/ROW]
[ROW][C]60[/C][C]0.5543[/C][C]0.7127[/C][C]0.2077[/C][C]36509791.1007[/C][C]136025111.5963[/C][C]11662.9804[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66619&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66619&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.3204-0.1761010359147.651700
500.290.27340.224851915120.219931137133.93585580.0658
510.22240.14030.196674966360.585845746876.15256763.6437
520.21980.24990.2099295170072.4033108102675.215210397.2436
530.1963-0.08640.185279703595.9666102422859.365510120.4179
540.20060.24710.1955656293260.9894194734592.969513954.7337
550.2040.08220.179374902054.2757177615658.870413327.2525
560.21730.15420.1762205215774.7559181065673.356113456.0646
570.22880.11110.16988816361.0152170815749.762613069.6499
580.259-0.07570.159622460411.1332155980215.899712489.204
590.3317-0.1840.161835989389.0577145071958.91412044.5821
600.55430.71270.207736509791.1007136025111.596311662.9804



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