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, 29 Dec 2009 08:27:01 -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/29/t1262100468nm7bis0n42kku9o.htm/, Retrieved Fri, 03 May 2024 04:56:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=71143, Retrieved Fri, 03 May 2024 04:56:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact235
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Shw10: ARIMA Fore...] [2009-12-04 15:42:20] [3c8b83428ce260cd44df892bb7619588]
-    D  [ARIMA Forecasting] [Shw10: Forecastin...] [2009-12-05 10:55:15] [3c8b83428ce260cd44df892bb7619588]
-   PD    [ARIMA Forecasting] [arima forecasting] [2009-12-28 20:48:56] [b5ba85a7ae9f50cb97d92cbc56161b32]
-   PD        [ARIMA Forecasting] [arima forecasting] [2009-12-29 15:27:01] [454b2df2fae01897bad5ff38ed3cc924] [Current]
Feedback Forum

Post a new message
Dataseries X:
8.7
8.2
8.3
8.5
8.6
8.5
8.2
8.1
7.9
8.6
8.7
8.7
8.5
8.4
8.5
8.7
8.7
8.6
8.5
8.3
8
8.2
8.1
8.1
8
7.9
7.9
8
8
7.9
8
7.7
7.2
7.5
7.3
7
7
7
7.2
7.3
7.1
6.8
6.4
6.1
6.5
7.7
7.9
7.5
6.9
6.6
6.9
7.7
8
8
7.7
7.3
7.4
8.1
8.3
8.2




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71143&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 time2 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])
367-------
377-------
387-------
397.2-------
407.3-------
417.1-------
426.8-------
436.4-------
446.1-------
456.5-------
467.7-------
477.9-------
487.5-------
496.97.43876.95257.92490.01490.40240.96150.4024
506.67.77396.67258.87530.01840.940.91580.687
516.98.4676.73910.19490.03780.98290.92470.8636
527.78.93166.659411.20380.1440.96020.92030.8916
5388.92456.111211.73790.25980.80320.89820.8395
5488.79755.362712.23240.32450.67550.87280.7705
557.78.78164.619212.9440.30530.64360.8690.7269
567.38.84283.894413.79120.27060.67460.86130.7026
577.49.35483.605415.10420.25260.75820.83480.7364
588.110.57994.015817.14410.22950.82880.80510.8211
598.310.89543.478518.31220.24640.770.78570.8152
608.210.77092.4519.09190.27240.71970.77950.7795

\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 & 7 & - & - & - & - & - & - & - \tabularnewline
37 & 7 & - & - & - & - & - & - & - \tabularnewline
38 & 7 & - & - & - & - & - & - & - \tabularnewline
39 & 7.2 & - & - & - & - & - & - & - \tabularnewline
40 & 7.3 & - & - & - & - & - & - & - \tabularnewline
41 & 7.1 & - & - & - & - & - & - & - \tabularnewline
42 & 6.8 & - & - & - & - & - & - & - \tabularnewline
43 & 6.4 & - & - & - & - & - & - & - \tabularnewline
44 & 6.1 & - & - & - & - & - & - & - \tabularnewline
45 & 6.5 & - & - & - & - & - & - & - \tabularnewline
46 & 7.7 & - & - & - & - & - & - & - \tabularnewline
47 & 7.9 & - & - & - & - & - & - & - \tabularnewline
48 & 7.5 & - & - & - & - & - & - & - \tabularnewline
49 & 6.9 & 7.4387 & 6.9525 & 7.9249 & 0.0149 & 0.4024 & 0.9615 & 0.4024 \tabularnewline
50 & 6.6 & 7.7739 & 6.6725 & 8.8753 & 0.0184 & 0.94 & 0.9158 & 0.687 \tabularnewline
51 & 6.9 & 8.467 & 6.739 & 10.1949 & 0.0378 & 0.9829 & 0.9247 & 0.8636 \tabularnewline
52 & 7.7 & 8.9316 & 6.6594 & 11.2038 & 0.144 & 0.9602 & 0.9203 & 0.8916 \tabularnewline
53 & 8 & 8.9245 & 6.1112 & 11.7379 & 0.2598 & 0.8032 & 0.8982 & 0.8395 \tabularnewline
54 & 8 & 8.7975 & 5.3627 & 12.2324 & 0.3245 & 0.6755 & 0.8728 & 0.7705 \tabularnewline
55 & 7.7 & 8.7816 & 4.6192 & 12.944 & 0.3053 & 0.6436 & 0.869 & 0.7269 \tabularnewline
56 & 7.3 & 8.8428 & 3.8944 & 13.7912 & 0.2706 & 0.6746 & 0.8613 & 0.7026 \tabularnewline
57 & 7.4 & 9.3548 & 3.6054 & 15.1042 & 0.2526 & 0.7582 & 0.8348 & 0.7364 \tabularnewline
58 & 8.1 & 10.5799 & 4.0158 & 17.1441 & 0.2295 & 0.8288 & 0.8051 & 0.8211 \tabularnewline
59 & 8.3 & 10.8954 & 3.4785 & 18.3122 & 0.2464 & 0.77 & 0.7857 & 0.8152 \tabularnewline
60 & 8.2 & 10.7709 & 2.45 & 19.0919 & 0.2724 & 0.7197 & 0.7795 & 0.7795 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71143&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]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]7.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]6.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]6.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]7.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]7.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]6.9[/C][C]7.4387[/C][C]6.9525[/C][C]7.9249[/C][C]0.0149[/C][C]0.4024[/C][C]0.9615[/C][C]0.4024[/C][/ROW]
[ROW][C]50[/C][C]6.6[/C][C]7.7739[/C][C]6.6725[/C][C]8.8753[/C][C]0.0184[/C][C]0.94[/C][C]0.9158[/C][C]0.687[/C][/ROW]
[ROW][C]51[/C][C]6.9[/C][C]8.467[/C][C]6.739[/C][C]10.1949[/C][C]0.0378[/C][C]0.9829[/C][C]0.9247[/C][C]0.8636[/C][/ROW]
[ROW][C]52[/C][C]7.7[/C][C]8.9316[/C][C]6.6594[/C][C]11.2038[/C][C]0.144[/C][C]0.9602[/C][C]0.9203[/C][C]0.8916[/C][/ROW]
[ROW][C]53[/C][C]8[/C][C]8.9245[/C][C]6.1112[/C][C]11.7379[/C][C]0.2598[/C][C]0.8032[/C][C]0.8982[/C][C]0.8395[/C][/ROW]
[ROW][C]54[/C][C]8[/C][C]8.7975[/C][C]5.3627[/C][C]12.2324[/C][C]0.3245[/C][C]0.6755[/C][C]0.8728[/C][C]0.7705[/C][/ROW]
[ROW][C]55[/C][C]7.7[/C][C]8.7816[/C][C]4.6192[/C][C]12.944[/C][C]0.3053[/C][C]0.6436[/C][C]0.869[/C][C]0.7269[/C][/ROW]
[ROW][C]56[/C][C]7.3[/C][C]8.8428[/C][C]3.8944[/C][C]13.7912[/C][C]0.2706[/C][C]0.6746[/C][C]0.8613[/C][C]0.7026[/C][/ROW]
[ROW][C]57[/C][C]7.4[/C][C]9.3548[/C][C]3.6054[/C][C]15.1042[/C][C]0.2526[/C][C]0.7582[/C][C]0.8348[/C][C]0.7364[/C][/ROW]
[ROW][C]58[/C][C]8.1[/C][C]10.5799[/C][C]4.0158[/C][C]17.1441[/C][C]0.2295[/C][C]0.8288[/C][C]0.8051[/C][C]0.8211[/C][/ROW]
[ROW][C]59[/C][C]8.3[/C][C]10.8954[/C][C]3.4785[/C][C]18.3122[/C][C]0.2464[/C][C]0.77[/C][C]0.7857[/C][C]0.8152[/C][/ROW]
[ROW][C]60[/C][C]8.2[/C][C]10.7709[/C][C]2.45[/C][C]19.0919[/C][C]0.2724[/C][C]0.7197[/C][C]0.7795[/C][C]0.7795[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71143&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71143&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])
367-------
377-------
387-------
397.2-------
407.3-------
417.1-------
426.8-------
436.4-------
446.1-------
456.5-------
467.7-------
477.9-------
487.5-------
496.97.43876.95257.92490.01490.40240.96150.4024
506.67.77396.67258.87530.01840.940.91580.687
516.98.4676.73910.19490.03780.98290.92470.8636
527.78.93166.659411.20380.1440.96020.92030.8916
5388.92456.111211.73790.25980.80320.89820.8395
5488.79755.362712.23240.32450.67550.87280.7705
557.78.78164.619212.9440.30530.64360.8690.7269
567.38.84283.894413.79120.27060.67460.86130.7026
577.49.35483.605415.10420.25260.75820.83480.7364
588.110.57994.015817.14410.22950.82880.80510.8211
598.310.89543.478518.31220.24640.770.78570.8152
608.210.77092.4519.09190.27240.71970.77950.7795







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0333-0.07240.0060.29020.02420.1555
500.0723-0.1510.01261.3780.11480.3389
510.1041-0.18510.01542.45530.20460.4523
520.1298-0.13790.01151.51680.12640.3555
530.1608-0.10360.00860.85480.07120.2669
540.1992-0.09070.00760.63610.0530.2302
550.2418-0.12320.01031.16990.09750.3122
560.2855-0.17450.01452.38030.19840.4454
570.3136-0.2090.01743.82140.31840.5643
580.3165-0.23440.01956.15010.51250.7159
590.3473-0.23820.01996.73590.56130.7492
600.3942-0.23870.01996.60980.55080.7422

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0333 & -0.0724 & 0.006 & 0.2902 & 0.0242 & 0.1555 \tabularnewline
50 & 0.0723 & -0.151 & 0.0126 & 1.378 & 0.1148 & 0.3389 \tabularnewline
51 & 0.1041 & -0.1851 & 0.0154 & 2.4553 & 0.2046 & 0.4523 \tabularnewline
52 & 0.1298 & -0.1379 & 0.0115 & 1.5168 & 0.1264 & 0.3555 \tabularnewline
53 & 0.1608 & -0.1036 & 0.0086 & 0.8548 & 0.0712 & 0.2669 \tabularnewline
54 & 0.1992 & -0.0907 & 0.0076 & 0.6361 & 0.053 & 0.2302 \tabularnewline
55 & 0.2418 & -0.1232 & 0.0103 & 1.1699 & 0.0975 & 0.3122 \tabularnewline
56 & 0.2855 & -0.1745 & 0.0145 & 2.3803 & 0.1984 & 0.4454 \tabularnewline
57 & 0.3136 & -0.209 & 0.0174 & 3.8214 & 0.3184 & 0.5643 \tabularnewline
58 & 0.3165 & -0.2344 & 0.0195 & 6.1501 & 0.5125 & 0.7159 \tabularnewline
59 & 0.3473 & -0.2382 & 0.0199 & 6.7359 & 0.5613 & 0.7492 \tabularnewline
60 & 0.3942 & -0.2387 & 0.0199 & 6.6098 & 0.5508 & 0.7422 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71143&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.0333[/C][C]-0.0724[/C][C]0.006[/C][C]0.2902[/C][C]0.0242[/C][C]0.1555[/C][/ROW]
[ROW][C]50[/C][C]0.0723[/C][C]-0.151[/C][C]0.0126[/C][C]1.378[/C][C]0.1148[/C][C]0.3389[/C][/ROW]
[ROW][C]51[/C][C]0.1041[/C][C]-0.1851[/C][C]0.0154[/C][C]2.4553[/C][C]0.2046[/C][C]0.4523[/C][/ROW]
[ROW][C]52[/C][C]0.1298[/C][C]-0.1379[/C][C]0.0115[/C][C]1.5168[/C][C]0.1264[/C][C]0.3555[/C][/ROW]
[ROW][C]53[/C][C]0.1608[/C][C]-0.1036[/C][C]0.0086[/C][C]0.8548[/C][C]0.0712[/C][C]0.2669[/C][/ROW]
[ROW][C]54[/C][C]0.1992[/C][C]-0.0907[/C][C]0.0076[/C][C]0.6361[/C][C]0.053[/C][C]0.2302[/C][/ROW]
[ROW][C]55[/C][C]0.2418[/C][C]-0.1232[/C][C]0.0103[/C][C]1.1699[/C][C]0.0975[/C][C]0.3122[/C][/ROW]
[ROW][C]56[/C][C]0.2855[/C][C]-0.1745[/C][C]0.0145[/C][C]2.3803[/C][C]0.1984[/C][C]0.4454[/C][/ROW]
[ROW][C]57[/C][C]0.3136[/C][C]-0.209[/C][C]0.0174[/C][C]3.8214[/C][C]0.3184[/C][C]0.5643[/C][/ROW]
[ROW][C]58[/C][C]0.3165[/C][C]-0.2344[/C][C]0.0195[/C][C]6.1501[/C][C]0.5125[/C][C]0.7159[/C][/ROW]
[ROW][C]59[/C][C]0.3473[/C][C]-0.2382[/C][C]0.0199[/C][C]6.7359[/C][C]0.5613[/C][C]0.7492[/C][/ROW]
[ROW][C]60[/C][C]0.3942[/C][C]-0.2387[/C][C]0.0199[/C][C]6.6098[/C][C]0.5508[/C][C]0.7422[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71143&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71143&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.0333-0.07240.0060.29020.02420.1555
500.0723-0.1510.01261.3780.11480.3389
510.1041-0.18510.01542.45530.20460.4523
520.1298-0.13790.01151.51680.12640.3555
530.1608-0.10360.00860.85480.07120.2669
540.1992-0.09070.00760.63610.0530.2302
550.2418-0.12320.01031.16990.09750.3122
560.2855-0.17450.01452.38030.19840.4454
570.3136-0.2090.01743.82140.31840.5643
580.3165-0.23440.01956.15010.51250.7159
590.3473-0.23820.01996.73590.56130.7492
600.3942-0.23870.01996.60980.55080.7422



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