Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 04:15:26 -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/13/t11975436161k5j4lkjjyt1inv.htm/, Retrieved Sun, 05 May 2024 13:17:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3438, Retrieved Sun, 05 May 2024 13:17:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact193
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper voorspellin...] [2007-12-13 11:15:26] [cb172450b25aceeff04d58e88e905157] [Current]
Feedback Forum

Post a new message
Dataseries X:
773,9
795,9
836,3
876,1
851,7
692,4
877,3
536,8
705,9
951
755,7
695,5
744,8
672,1
666,6
760,8
756
604,4
883,9
527,9
756,2
812,9
655,6
707,6
612,6
659,2
833,4
727,8
797,2
753
762
613,7
759,2
816,4
736,8
680,1
736,5
637,2
801,9
772,3
897,3
792,1
826,8
666,8
906,6
871,4
891
739,2
833,6
715,6
871,6
751,6
1005,5
681,2
837,3
674,7
806,3
860,2
689,8
691,6




Summary of compuational 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 compuational 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=3438&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]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=3438&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3438&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 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])
36680.1-------
37736.5-------
38637.2-------
39801.9-------
40772.3-------
41897.3-------
42792.1-------
43826.8-------
44666.8-------
45906.6-------
46871.4-------
47891-------
48739.2-------
49833.6766.5201635.9097897.13060.15710.65910.67380.6591
50715.6766.1333635.3496896.9170.22440.1560.97330.6568
51871.6871.2804735.3471007.21380.49820.98760.84140.9716
52751.6834.17679.7982988.54190.14720.31730.78390.8861
531005.5934.8611779.47091090.25140.18650.98960.68220.9932
54681.2830.9877670.2379991.73740.03390.01670.68230.8685
55837.3867.2293700.03651034.42220.36280.98540.68220.9333
56674.7706.2781537.4597875.09650.35690.06410.67660.3511
57806.3892.7841720.1731065.39520.1630.99340.43770.9594
58860.2904.1312728.42491079.83750.3120.86240.64250.9671
59689.8872.7497695.38221050.11730.02160.55510.42010.93
60691.6759.4098579.5914939.22820.22990.7760.58720.5872

\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 & 680.1 & - & - & - & - & - & - & - \tabularnewline
37 & 736.5 & - & - & - & - & - & - & - \tabularnewline
38 & 637.2 & - & - & - & - & - & - & - \tabularnewline
39 & 801.9 & - & - & - & - & - & - & - \tabularnewline
40 & 772.3 & - & - & - & - & - & - & - \tabularnewline
41 & 897.3 & - & - & - & - & - & - & - \tabularnewline
42 & 792.1 & - & - & - & - & - & - & - \tabularnewline
43 & 826.8 & - & - & - & - & - & - & - \tabularnewline
44 & 666.8 & - & - & - & - & - & - & - \tabularnewline
45 & 906.6 & - & - & - & - & - & - & - \tabularnewline
46 & 871.4 & - & - & - & - & - & - & - \tabularnewline
47 & 891 & - & - & - & - & - & - & - \tabularnewline
48 & 739.2 & - & - & - & - & - & - & - \tabularnewline
49 & 833.6 & 766.5201 & 635.9097 & 897.1306 & 0.1571 & 0.6591 & 0.6738 & 0.6591 \tabularnewline
50 & 715.6 & 766.1333 & 635.3496 & 896.917 & 0.2244 & 0.156 & 0.9733 & 0.6568 \tabularnewline
51 & 871.6 & 871.2804 & 735.347 & 1007.2138 & 0.4982 & 0.9876 & 0.8414 & 0.9716 \tabularnewline
52 & 751.6 & 834.17 & 679.7982 & 988.5419 & 0.1472 & 0.3173 & 0.7839 & 0.8861 \tabularnewline
53 & 1005.5 & 934.8611 & 779.4709 & 1090.2514 & 0.1865 & 0.9896 & 0.6822 & 0.9932 \tabularnewline
54 & 681.2 & 830.9877 & 670.2379 & 991.7374 & 0.0339 & 0.0167 & 0.6823 & 0.8685 \tabularnewline
55 & 837.3 & 867.2293 & 700.0365 & 1034.4222 & 0.3628 & 0.9854 & 0.6822 & 0.9333 \tabularnewline
56 & 674.7 & 706.2781 & 537.4597 & 875.0965 & 0.3569 & 0.0641 & 0.6766 & 0.3511 \tabularnewline
57 & 806.3 & 892.7841 & 720.173 & 1065.3952 & 0.163 & 0.9934 & 0.4377 & 0.9594 \tabularnewline
58 & 860.2 & 904.1312 & 728.4249 & 1079.8375 & 0.312 & 0.8624 & 0.6425 & 0.9671 \tabularnewline
59 & 689.8 & 872.7497 & 695.3822 & 1050.1173 & 0.0216 & 0.5551 & 0.4201 & 0.93 \tabularnewline
60 & 691.6 & 759.4098 & 579.5914 & 939.2282 & 0.2299 & 0.776 & 0.5872 & 0.5872 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3438&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]680.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]736.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]637.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]801.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]772.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]897.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]792.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]826.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]666.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]906.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]871.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]891[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]739.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]833.6[/C][C]766.5201[/C][C]635.9097[/C][C]897.1306[/C][C]0.1571[/C][C]0.6591[/C][C]0.6738[/C][C]0.6591[/C][/ROW]
[ROW][C]50[/C][C]715.6[/C][C]766.1333[/C][C]635.3496[/C][C]896.917[/C][C]0.2244[/C][C]0.156[/C][C]0.9733[/C][C]0.6568[/C][/ROW]
[ROW][C]51[/C][C]871.6[/C][C]871.2804[/C][C]735.347[/C][C]1007.2138[/C][C]0.4982[/C][C]0.9876[/C][C]0.8414[/C][C]0.9716[/C][/ROW]
[ROW][C]52[/C][C]751.6[/C][C]834.17[/C][C]679.7982[/C][C]988.5419[/C][C]0.1472[/C][C]0.3173[/C][C]0.7839[/C][C]0.8861[/C][/ROW]
[ROW][C]53[/C][C]1005.5[/C][C]934.8611[/C][C]779.4709[/C][C]1090.2514[/C][C]0.1865[/C][C]0.9896[/C][C]0.6822[/C][C]0.9932[/C][/ROW]
[ROW][C]54[/C][C]681.2[/C][C]830.9877[/C][C]670.2379[/C][C]991.7374[/C][C]0.0339[/C][C]0.0167[/C][C]0.6823[/C][C]0.8685[/C][/ROW]
[ROW][C]55[/C][C]837.3[/C][C]867.2293[/C][C]700.0365[/C][C]1034.4222[/C][C]0.3628[/C][C]0.9854[/C][C]0.6822[/C][C]0.9333[/C][/ROW]
[ROW][C]56[/C][C]674.7[/C][C]706.2781[/C][C]537.4597[/C][C]875.0965[/C][C]0.3569[/C][C]0.0641[/C][C]0.6766[/C][C]0.3511[/C][/ROW]
[ROW][C]57[/C][C]806.3[/C][C]892.7841[/C][C]720.173[/C][C]1065.3952[/C][C]0.163[/C][C]0.9934[/C][C]0.4377[/C][C]0.9594[/C][/ROW]
[ROW][C]58[/C][C]860.2[/C][C]904.1312[/C][C]728.4249[/C][C]1079.8375[/C][C]0.312[/C][C]0.8624[/C][C]0.6425[/C][C]0.9671[/C][/ROW]
[ROW][C]59[/C][C]689.8[/C][C]872.7497[/C][C]695.3822[/C][C]1050.1173[/C][C]0.0216[/C][C]0.5551[/C][C]0.4201[/C][C]0.93[/C][/ROW]
[ROW][C]60[/C][C]691.6[/C][C]759.4098[/C][C]579.5914[/C][C]939.2282[/C][C]0.2299[/C][C]0.776[/C][C]0.5872[/C][C]0.5872[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3438&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3438&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])
36680.1-------
37736.5-------
38637.2-------
39801.9-------
40772.3-------
41897.3-------
42792.1-------
43826.8-------
44666.8-------
45906.6-------
46871.4-------
47891-------
48739.2-------
49833.6766.5201635.9097897.13060.15710.65910.67380.6591
50715.6766.1333635.3496896.9170.22440.1560.97330.6568
51871.6871.2804735.3471007.21380.49820.98760.84140.9716
52751.6834.17679.7982988.54190.14720.31730.78390.8861
531005.5934.8611779.47091090.25140.18650.98960.68220.9932
54681.2830.9877670.2379991.73740.03390.01670.68230.8685
55837.3867.2293700.03651034.42220.36280.98540.68220.9333
56674.7706.2781537.4597875.09650.35690.06410.67660.3511
57806.3892.7841720.1731065.39520.1630.99340.43770.9594
58860.2904.1312728.42491079.83750.3120.86240.64250.9671
59689.8872.7497695.38221050.11730.02160.55510.42010.93
60691.6759.4098579.5914939.22820.22990.7760.58720.5872







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.08690.08750.00734499.7107374.975919.3643
500.0871-0.0660.00552553.6127212.801114.5877
510.07964e-0400.10220.00850.0923
520.0944-0.0990.00826817.8101568.150823.8359
530.08480.07560.00634989.8486415.820720.3917
540.0987-0.18030.01522436.34051869.69543.24
550.0984-0.03450.0029895.76574.64718.6399
560.122-0.04470.0037997.176883.09819.1158
570.0986-0.09690.00817479.4994623.291624.9658
580.0992-0.04860.0041929.9535160.829512.6819
590.1037-0.20960.017533470.60862789.217452.813
600.1208-0.08930.00744598.1689383.180719.575

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0869 & 0.0875 & 0.0073 & 4499.7107 & 374.9759 & 19.3643 \tabularnewline
50 & 0.0871 & -0.066 & 0.0055 & 2553.6127 & 212.8011 & 14.5877 \tabularnewline
51 & 0.0796 & 4e-04 & 0 & 0.1022 & 0.0085 & 0.0923 \tabularnewline
52 & 0.0944 & -0.099 & 0.0082 & 6817.8101 & 568.1508 & 23.8359 \tabularnewline
53 & 0.0848 & 0.0756 & 0.0063 & 4989.8486 & 415.8207 & 20.3917 \tabularnewline
54 & 0.0987 & -0.1803 & 0.015 & 22436.3405 & 1869.695 & 43.24 \tabularnewline
55 & 0.0984 & -0.0345 & 0.0029 & 895.765 & 74.6471 & 8.6399 \tabularnewline
56 & 0.122 & -0.0447 & 0.0037 & 997.1768 & 83.0981 & 9.1158 \tabularnewline
57 & 0.0986 & -0.0969 & 0.0081 & 7479.4994 & 623.2916 & 24.9658 \tabularnewline
58 & 0.0992 & -0.0486 & 0.004 & 1929.9535 & 160.8295 & 12.6819 \tabularnewline
59 & 0.1037 & -0.2096 & 0.0175 & 33470.6086 & 2789.2174 & 52.813 \tabularnewline
60 & 0.1208 & -0.0893 & 0.0074 & 4598.1689 & 383.1807 & 19.575 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3438&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.0869[/C][C]0.0875[/C][C]0.0073[/C][C]4499.7107[/C][C]374.9759[/C][C]19.3643[/C][/ROW]
[ROW][C]50[/C][C]0.0871[/C][C]-0.066[/C][C]0.0055[/C][C]2553.6127[/C][C]212.8011[/C][C]14.5877[/C][/ROW]
[ROW][C]51[/C][C]0.0796[/C][C]4e-04[/C][C]0[/C][C]0.1022[/C][C]0.0085[/C][C]0.0923[/C][/ROW]
[ROW][C]52[/C][C]0.0944[/C][C]-0.099[/C][C]0.0082[/C][C]6817.8101[/C][C]568.1508[/C][C]23.8359[/C][/ROW]
[ROW][C]53[/C][C]0.0848[/C][C]0.0756[/C][C]0.0063[/C][C]4989.8486[/C][C]415.8207[/C][C]20.3917[/C][/ROW]
[ROW][C]54[/C][C]0.0987[/C][C]-0.1803[/C][C]0.015[/C][C]22436.3405[/C][C]1869.695[/C][C]43.24[/C][/ROW]
[ROW][C]55[/C][C]0.0984[/C][C]-0.0345[/C][C]0.0029[/C][C]895.765[/C][C]74.6471[/C][C]8.6399[/C][/ROW]
[ROW][C]56[/C][C]0.122[/C][C]-0.0447[/C][C]0.0037[/C][C]997.1768[/C][C]83.0981[/C][C]9.1158[/C][/ROW]
[ROW][C]57[/C][C]0.0986[/C][C]-0.0969[/C][C]0.0081[/C][C]7479.4994[/C][C]623.2916[/C][C]24.9658[/C][/ROW]
[ROW][C]58[/C][C]0.0992[/C][C]-0.0486[/C][C]0.004[/C][C]1929.9535[/C][C]160.8295[/C][C]12.6819[/C][/ROW]
[ROW][C]59[/C][C]0.1037[/C][C]-0.2096[/C][C]0.0175[/C][C]33470.6086[/C][C]2789.2174[/C][C]52.813[/C][/ROW]
[ROW][C]60[/C][C]0.1208[/C][C]-0.0893[/C][C]0.0074[/C][C]4598.1689[/C][C]383.1807[/C][C]19.575[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3438&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3438&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.08690.08750.00734499.7107374.975919.3643
500.0871-0.0660.00552553.6127212.801114.5877
510.07964e-0400.10220.00850.0923
520.0944-0.0990.00826817.8101568.150823.8359
530.08480.07560.00634989.8486415.820720.3917
540.0987-0.18030.01522436.34051869.69543.24
550.0984-0.03450.0029895.76574.64718.6399
560.122-0.04470.0037997.176883.09819.1158
570.0986-0.09690.00817479.4994623.291624.9658
580.0992-0.04860.0041929.9535160.829512.6819
590.1037-0.20960.017533470.60862789.217452.813
600.1208-0.08930.00744598.1689383.180719.575



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