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 computationTue, 16 Dec 2008 11:49:00 -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/16/t1229453385fngcst6w37qb9j9.htm/, Retrieved Wed, 15 May 2024 02:13:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34102, Retrieved Wed, 15 May 2024 02:13:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact184
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Uitvoer.Nederland] [2008-12-03 15:11:10] [988ab43f527fc78aae41c84649095267]
-   P   [Univariate Data Series] [Export From Belgi...] [2008-12-03 15:52:29] [988ab43f527fc78aae41c84649095267]
- RMP     [ARIMA Forecasting] [ARIMA Forecasting] [2008-12-11 16:07:50] [988ab43f527fc78aae41c84649095267]
-   P       [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 16:40:55] [988ab43f527fc78aae41c84649095267]
-   PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:49:00] [5d823194959040fa9b19b8c8302177e6] [Current]
Feedback Forum

Post a new message
Dataseries X:
156.3
151.5
159.1
166.9
160.5
162.8
178.9
148.5
184.1
197
186.8
139.2
162.7
187.5
235.8
219.4
212.4
220.2
197.5
185.6
232.4
223.8
219.4
191.4
210.4
212.6
274.4
256
227.6
261.7
237
234.9
310.6
274.2
288.1
242.5
271.7
282.2
317.4
280.3
322.6
328.2
280.7
288.8
347.9
360.1
348
275.7
332.6
340.8
390.5
351.2
377.4
413.5
366.9
364.8
388
429.8
423.6
326.4




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34102&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34102&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34102&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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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])
36242.5-------
37271.7-------
38282.2-------
39317.4-------
40280.3-------
41322.6-------
42328.2-------
43280.7-------
44288.8-------
45347.9-------
46360.1-------
47348-------
48275.7-------
49332.6335.426296.5096374.34240.44340.99870.99930.9987
50340.8334.3155291.4856377.14540.38330.53130.99150.9963
51390.5356.9118312.9972400.82640.06690.7640.96110.9999
52351.2333.9461281.8899386.00230.2580.01660.97830.9858
53377.4369.4807314.7164424.24490.38840.74350.95330.9996
54413.5368.8699312.4773425.26250.06040.38340.92130.9994
55366.9327.612267.1252388.09870.10150.00270.93580.9537
56364.8331.6343269.0357394.23280.14950.13480.91010.9601
57388387.4252323.1695451.68080.4930.75490.8860.9997
58429.8402.0992335.2981468.90040.20820.66040.89110.9999
59423.6387.4025318.8997455.90520.15020.11260.87020.9993
60326.4313.1216243.1339383.10940.3550.0010.85270.8527

\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 & 242.5 & - & - & - & - & - & - & - \tabularnewline
37 & 271.7 & - & - & - & - & - & - & - \tabularnewline
38 & 282.2 & - & - & - & - & - & - & - \tabularnewline
39 & 317.4 & - & - & - & - & - & - & - \tabularnewline
40 & 280.3 & - & - & - & - & - & - & - \tabularnewline
41 & 322.6 & - & - & - & - & - & - & - \tabularnewline
42 & 328.2 & - & - & - & - & - & - & - \tabularnewline
43 & 280.7 & - & - & - & - & - & - & - \tabularnewline
44 & 288.8 & - & - & - & - & - & - & - \tabularnewline
45 & 347.9 & - & - & - & - & - & - & - \tabularnewline
46 & 360.1 & - & - & - & - & - & - & - \tabularnewline
47 & 348 & - & - & - & - & - & - & - \tabularnewline
48 & 275.7 & - & - & - & - & - & - & - \tabularnewline
49 & 332.6 & 335.426 & 296.5096 & 374.3424 & 0.4434 & 0.9987 & 0.9993 & 0.9987 \tabularnewline
50 & 340.8 & 334.3155 & 291.4856 & 377.1454 & 0.3833 & 0.5313 & 0.9915 & 0.9963 \tabularnewline
51 & 390.5 & 356.9118 & 312.9972 & 400.8264 & 0.0669 & 0.764 & 0.9611 & 0.9999 \tabularnewline
52 & 351.2 & 333.9461 & 281.8899 & 386.0023 & 0.258 & 0.0166 & 0.9783 & 0.9858 \tabularnewline
53 & 377.4 & 369.4807 & 314.7164 & 424.2449 & 0.3884 & 0.7435 & 0.9533 & 0.9996 \tabularnewline
54 & 413.5 & 368.8699 & 312.4773 & 425.2625 & 0.0604 & 0.3834 & 0.9213 & 0.9994 \tabularnewline
55 & 366.9 & 327.612 & 267.1252 & 388.0987 & 0.1015 & 0.0027 & 0.9358 & 0.9537 \tabularnewline
56 & 364.8 & 331.6343 & 269.0357 & 394.2328 & 0.1495 & 0.1348 & 0.9101 & 0.9601 \tabularnewline
57 & 388 & 387.4252 & 323.1695 & 451.6808 & 0.493 & 0.7549 & 0.886 & 0.9997 \tabularnewline
58 & 429.8 & 402.0992 & 335.2981 & 468.9004 & 0.2082 & 0.6604 & 0.8911 & 0.9999 \tabularnewline
59 & 423.6 & 387.4025 & 318.8997 & 455.9052 & 0.1502 & 0.1126 & 0.8702 & 0.9993 \tabularnewline
60 & 326.4 & 313.1216 & 243.1339 & 383.1094 & 0.355 & 0.001 & 0.8527 & 0.8527 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34102&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]242.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]271.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]282.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]317.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]280.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]322.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]328.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]280.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]288.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]347.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]360.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]348[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]275.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]332.6[/C][C]335.426[/C][C]296.5096[/C][C]374.3424[/C][C]0.4434[/C][C]0.9987[/C][C]0.9993[/C][C]0.9987[/C][/ROW]
[ROW][C]50[/C][C]340.8[/C][C]334.3155[/C][C]291.4856[/C][C]377.1454[/C][C]0.3833[/C][C]0.5313[/C][C]0.9915[/C][C]0.9963[/C][/ROW]
[ROW][C]51[/C][C]390.5[/C][C]356.9118[/C][C]312.9972[/C][C]400.8264[/C][C]0.0669[/C][C]0.764[/C][C]0.9611[/C][C]0.9999[/C][/ROW]
[ROW][C]52[/C][C]351.2[/C][C]333.9461[/C][C]281.8899[/C][C]386.0023[/C][C]0.258[/C][C]0.0166[/C][C]0.9783[/C][C]0.9858[/C][/ROW]
[ROW][C]53[/C][C]377.4[/C][C]369.4807[/C][C]314.7164[/C][C]424.2449[/C][C]0.3884[/C][C]0.7435[/C][C]0.9533[/C][C]0.9996[/C][/ROW]
[ROW][C]54[/C][C]413.5[/C][C]368.8699[/C][C]312.4773[/C][C]425.2625[/C][C]0.0604[/C][C]0.3834[/C][C]0.9213[/C][C]0.9994[/C][/ROW]
[ROW][C]55[/C][C]366.9[/C][C]327.612[/C][C]267.1252[/C][C]388.0987[/C][C]0.1015[/C][C]0.0027[/C][C]0.9358[/C][C]0.9537[/C][/ROW]
[ROW][C]56[/C][C]364.8[/C][C]331.6343[/C][C]269.0357[/C][C]394.2328[/C][C]0.1495[/C][C]0.1348[/C][C]0.9101[/C][C]0.9601[/C][/ROW]
[ROW][C]57[/C][C]388[/C][C]387.4252[/C][C]323.1695[/C][C]451.6808[/C][C]0.493[/C][C]0.7549[/C][C]0.886[/C][C]0.9997[/C][/ROW]
[ROW][C]58[/C][C]429.8[/C][C]402.0992[/C][C]335.2981[/C][C]468.9004[/C][C]0.2082[/C][C]0.6604[/C][C]0.8911[/C][C]0.9999[/C][/ROW]
[ROW][C]59[/C][C]423.6[/C][C]387.4025[/C][C]318.8997[/C][C]455.9052[/C][C]0.1502[/C][C]0.1126[/C][C]0.8702[/C][C]0.9993[/C][/ROW]
[ROW][C]60[/C][C]326.4[/C][C]313.1216[/C][C]243.1339[/C][C]383.1094[/C][C]0.355[/C][C]0.001[/C][C]0.8527[/C][C]0.8527[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34102&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34102&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])
36242.5-------
37271.7-------
38282.2-------
39317.4-------
40280.3-------
41322.6-------
42328.2-------
43280.7-------
44288.8-------
45347.9-------
46360.1-------
47348-------
48275.7-------
49332.6335.426296.5096374.34240.44340.99870.99930.9987
50340.8334.3155291.4856377.14540.38330.53130.99150.9963
51390.5356.9118312.9972400.82640.06690.7640.96110.9999
52351.2333.9461281.8899386.00230.2580.01660.97830.9858
53377.4369.4807314.7164424.24490.38840.74350.95330.9996
54413.5368.8699312.4773425.26250.06040.38340.92130.9994
55366.9327.612267.1252388.09870.10150.00270.93580.9537
56364.8331.6343269.0357394.23280.14950.13480.91010.9601
57388387.4252323.1695451.68080.4930.75490.8860.9997
58429.8402.0992335.2981468.90040.20820.66040.89110.9999
59423.6387.4025318.8997455.90520.15020.11260.87020.9993
60326.4313.1216243.1339383.10940.3550.0010.85270.8527







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0592-0.00847e-047.98610.66550.8158
500.06540.01940.001642.04843.5041.8719
510.06280.09410.00781128.168294.0149.6961
520.07950.05170.0043297.698124.80824.9808
530.07560.02140.001862.71565.22632.2861
540.0780.1210.01011991.8439165.98712.8836
550.09420.11990.011543.5509128.629211.3415
560.09630.10.00831099.966791.66399.5741
570.08460.00151e-040.33040.02750.1659
580.08480.06890.0057767.331963.94437.9965
590.09020.09340.00781310.2621109.188510.4493
600.1140.04240.0035176.314914.69293.8331

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0592 & -0.0084 & 7e-04 & 7.9861 & 0.6655 & 0.8158 \tabularnewline
50 & 0.0654 & 0.0194 & 0.0016 & 42.0484 & 3.504 & 1.8719 \tabularnewline
51 & 0.0628 & 0.0941 & 0.0078 & 1128.1682 & 94.014 & 9.6961 \tabularnewline
52 & 0.0795 & 0.0517 & 0.0043 & 297.6981 & 24.8082 & 4.9808 \tabularnewline
53 & 0.0756 & 0.0214 & 0.0018 & 62.7156 & 5.2263 & 2.2861 \tabularnewline
54 & 0.078 & 0.121 & 0.0101 & 1991.8439 & 165.987 & 12.8836 \tabularnewline
55 & 0.0942 & 0.1199 & 0.01 & 1543.5509 & 128.6292 & 11.3415 \tabularnewline
56 & 0.0963 & 0.1 & 0.0083 & 1099.9667 & 91.6639 & 9.5741 \tabularnewline
57 & 0.0846 & 0.0015 & 1e-04 & 0.3304 & 0.0275 & 0.1659 \tabularnewline
58 & 0.0848 & 0.0689 & 0.0057 & 767.3319 & 63.9443 & 7.9965 \tabularnewline
59 & 0.0902 & 0.0934 & 0.0078 & 1310.2621 & 109.1885 & 10.4493 \tabularnewline
60 & 0.114 & 0.0424 & 0.0035 & 176.3149 & 14.6929 & 3.8331 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34102&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.0592[/C][C]-0.0084[/C][C]7e-04[/C][C]7.9861[/C][C]0.6655[/C][C]0.8158[/C][/ROW]
[ROW][C]50[/C][C]0.0654[/C][C]0.0194[/C][C]0.0016[/C][C]42.0484[/C][C]3.504[/C][C]1.8719[/C][/ROW]
[ROW][C]51[/C][C]0.0628[/C][C]0.0941[/C][C]0.0078[/C][C]1128.1682[/C][C]94.014[/C][C]9.6961[/C][/ROW]
[ROW][C]52[/C][C]0.0795[/C][C]0.0517[/C][C]0.0043[/C][C]297.6981[/C][C]24.8082[/C][C]4.9808[/C][/ROW]
[ROW][C]53[/C][C]0.0756[/C][C]0.0214[/C][C]0.0018[/C][C]62.7156[/C][C]5.2263[/C][C]2.2861[/C][/ROW]
[ROW][C]54[/C][C]0.078[/C][C]0.121[/C][C]0.0101[/C][C]1991.8439[/C][C]165.987[/C][C]12.8836[/C][/ROW]
[ROW][C]55[/C][C]0.0942[/C][C]0.1199[/C][C]0.01[/C][C]1543.5509[/C][C]128.6292[/C][C]11.3415[/C][/ROW]
[ROW][C]56[/C][C]0.0963[/C][C]0.1[/C][C]0.0083[/C][C]1099.9667[/C][C]91.6639[/C][C]9.5741[/C][/ROW]
[ROW][C]57[/C][C]0.0846[/C][C]0.0015[/C][C]1e-04[/C][C]0.3304[/C][C]0.0275[/C][C]0.1659[/C][/ROW]
[ROW][C]58[/C][C]0.0848[/C][C]0.0689[/C][C]0.0057[/C][C]767.3319[/C][C]63.9443[/C][C]7.9965[/C][/ROW]
[ROW][C]59[/C][C]0.0902[/C][C]0.0934[/C][C]0.0078[/C][C]1310.2621[/C][C]109.1885[/C][C]10.4493[/C][/ROW]
[ROW][C]60[/C][C]0.114[/C][C]0.0424[/C][C]0.0035[/C][C]176.3149[/C][C]14.6929[/C][C]3.8331[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34102&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34102&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.0592-0.00847e-047.98610.66550.8158
500.06540.01940.001642.04843.5041.8719
510.06280.09410.00781128.168294.0149.6961
520.07950.05170.0043297.698124.80824.9808
530.07560.02140.001862.71565.22632.2861
540.0780.1210.01011991.8439165.98712.8836
550.09420.11990.011543.5509128.629211.3415
560.09630.10.00831099.966791.66399.5741
570.08460.00151e-040.33040.02750.1659
580.08480.06890.0057767.331963.94437.9965
590.09020.09340.00781310.2621109.188510.4493
600.1140.04240.0035176.314914.69293.8331



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