Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 16 Dec 2007 02:23:12 -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/16/t1197796033sa9pse4fyiupjme.htm/, Retrieved Thu, 02 May 2024 06:57:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4114, Retrieved Thu, 02 May 2024 06:57:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsPaper G12 Totaal
Estimated Impact218
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper G12 Totaal] [2007-12-16 09:23:12] [ae3f0dfb5dab6ea17524363c550229d5] [Current]
Feedback Forum

Post a new message
Dataseries X:
106,7
110,2
125,9
100,1
106,4
114,8
81,3
87
104,2
108
105
94,5
92
95,9
108,8
103,4
102,1
110,1
83,2
82,7
106,8
113,7
102,5
96,6
92,1
95,6
102,3
98,6
98,2
104,5
84
73,8
103,9
106
97,2
102,6
89
93,8
116,7
106,8
98,5
118,7
90
91,9
113,3
113,1
104,1
108,7
96,7
101
116,9
105,8
99
129,4
83
88,9
115,9
104,2
113,4
112,2
100,8
107,3
126,6
102,9
117,9
128,8
87,5
93,8
122,7
126,2
124,6
116,7
115,2
111,1
129,9
113,3
118,5
133,5
102,1
102,4




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4114&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[68])
5688.9-------
57115.9-------
58104.2-------
59113.4-------
60112.2-------
61100.8-------
62107.3-------
63126.6-------
64102.9-------
65117.9-------
66128.8-------
6787.5-------
6893.8-------
69122.7118.2666107.0261130.68770.24210.99990.64560.9999
70126.2116.4491105.3487128.71910.05970.1590.97480.9999
71124.6114.3913102.9537127.09960.05770.03430.56080.9993
72116.7111.01398.4743125.14820.21520.02980.43460.9915
73115.2101.779690.2035114.84130.0220.01260.55840.8844
74111.1107.390594.6612121.83160.30730.14460.50490.9674
75129.9123.0712107.8457140.44630.22060.91160.34530.9995
76113.3109.38695.6107125.14610.31320.00540.79010.9737
77118.5110.282695.9947126.69720.16320.35930.18150.9755
78133.5124.7157108.176143.78430.18330.73860.33730.9993
79102.190.22178.0593104.27750.048800.64780.3089
80102.491.667979.0733106.26860.07480.08070.38740.3874

\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[68]) \tabularnewline
56 & 88.9 & - & - & - & - & - & - & - \tabularnewline
57 & 115.9 & - & - & - & - & - & - & - \tabularnewline
58 & 104.2 & - & - & - & - & - & - & - \tabularnewline
59 & 113.4 & - & - & - & - & - & - & - \tabularnewline
60 & 112.2 & - & - & - & - & - & - & - \tabularnewline
61 & 100.8 & - & - & - & - & - & - & - \tabularnewline
62 & 107.3 & - & - & - & - & - & - & - \tabularnewline
63 & 126.6 & - & - & - & - & - & - & - \tabularnewline
64 & 102.9 & - & - & - & - & - & - & - \tabularnewline
65 & 117.9 & - & - & - & - & - & - & - \tabularnewline
66 & 128.8 & - & - & - & - & - & - & - \tabularnewline
67 & 87.5 & - & - & - & - & - & - & - \tabularnewline
68 & 93.8 & - & - & - & - & - & - & - \tabularnewline
69 & 122.7 & 118.2666 & 107.0261 & 130.6877 & 0.2421 & 0.9999 & 0.6456 & 0.9999 \tabularnewline
70 & 126.2 & 116.4491 & 105.3487 & 128.7191 & 0.0597 & 0.159 & 0.9748 & 0.9999 \tabularnewline
71 & 124.6 & 114.3913 & 102.9537 & 127.0996 & 0.0577 & 0.0343 & 0.5608 & 0.9993 \tabularnewline
72 & 116.7 & 111.013 & 98.4743 & 125.1482 & 0.2152 & 0.0298 & 0.4346 & 0.9915 \tabularnewline
73 & 115.2 & 101.7796 & 90.2035 & 114.8413 & 0.022 & 0.0126 & 0.5584 & 0.8844 \tabularnewline
74 & 111.1 & 107.3905 & 94.6612 & 121.8316 & 0.3073 & 0.1446 & 0.5049 & 0.9674 \tabularnewline
75 & 129.9 & 123.0712 & 107.8457 & 140.4463 & 0.2206 & 0.9116 & 0.3453 & 0.9995 \tabularnewline
76 & 113.3 & 109.386 & 95.6107 & 125.1461 & 0.3132 & 0.0054 & 0.7901 & 0.9737 \tabularnewline
77 & 118.5 & 110.2826 & 95.9947 & 126.6972 & 0.1632 & 0.3593 & 0.1815 & 0.9755 \tabularnewline
78 & 133.5 & 124.7157 & 108.176 & 143.7843 & 0.1833 & 0.7386 & 0.3373 & 0.9993 \tabularnewline
79 & 102.1 & 90.221 & 78.0593 & 104.2775 & 0.0488 & 0 & 0.6478 & 0.3089 \tabularnewline
80 & 102.4 & 91.6679 & 79.0733 & 106.2686 & 0.0748 & 0.0807 & 0.3874 & 0.3874 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4114&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[68])[/C][/ROW]
[ROW][C]56[/C][C]88.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]115.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]104.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]113.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]112.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]100.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]107.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]126.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]102.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]117.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]128.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]87.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]93.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]122.7[/C][C]118.2666[/C][C]107.0261[/C][C]130.6877[/C][C]0.2421[/C][C]0.9999[/C][C]0.6456[/C][C]0.9999[/C][/ROW]
[ROW][C]70[/C][C]126.2[/C][C]116.4491[/C][C]105.3487[/C][C]128.7191[/C][C]0.0597[/C][C]0.159[/C][C]0.9748[/C][C]0.9999[/C][/ROW]
[ROW][C]71[/C][C]124.6[/C][C]114.3913[/C][C]102.9537[/C][C]127.0996[/C][C]0.0577[/C][C]0.0343[/C][C]0.5608[/C][C]0.9993[/C][/ROW]
[ROW][C]72[/C][C]116.7[/C][C]111.013[/C][C]98.4743[/C][C]125.1482[/C][C]0.2152[/C][C]0.0298[/C][C]0.4346[/C][C]0.9915[/C][/ROW]
[ROW][C]73[/C][C]115.2[/C][C]101.7796[/C][C]90.2035[/C][C]114.8413[/C][C]0.022[/C][C]0.0126[/C][C]0.5584[/C][C]0.8844[/C][/ROW]
[ROW][C]74[/C][C]111.1[/C][C]107.3905[/C][C]94.6612[/C][C]121.8316[/C][C]0.3073[/C][C]0.1446[/C][C]0.5049[/C][C]0.9674[/C][/ROW]
[ROW][C]75[/C][C]129.9[/C][C]123.0712[/C][C]107.8457[/C][C]140.4463[/C][C]0.2206[/C][C]0.9116[/C][C]0.3453[/C][C]0.9995[/C][/ROW]
[ROW][C]76[/C][C]113.3[/C][C]109.386[/C][C]95.6107[/C][C]125.1461[/C][C]0.3132[/C][C]0.0054[/C][C]0.7901[/C][C]0.9737[/C][/ROW]
[ROW][C]77[/C][C]118.5[/C][C]110.2826[/C][C]95.9947[/C][C]126.6972[/C][C]0.1632[/C][C]0.3593[/C][C]0.1815[/C][C]0.9755[/C][/ROW]
[ROW][C]78[/C][C]133.5[/C][C]124.7157[/C][C]108.176[/C][C]143.7843[/C][C]0.1833[/C][C]0.7386[/C][C]0.3373[/C][C]0.9993[/C][/ROW]
[ROW][C]79[/C][C]102.1[/C][C]90.221[/C][C]78.0593[/C][C]104.2775[/C][C]0.0488[/C][C]0[/C][C]0.6478[/C][C]0.3089[/C][/ROW]
[ROW][C]80[/C][C]102.4[/C][C]91.6679[/C][C]79.0733[/C][C]106.2686[/C][C]0.0748[/C][C]0.0807[/C][C]0.3874[/C][C]0.3874[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4114&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4114&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[68])
5688.9-------
57115.9-------
58104.2-------
59113.4-------
60112.2-------
61100.8-------
62107.3-------
63126.6-------
64102.9-------
65117.9-------
66128.8-------
6787.5-------
6893.8-------
69122.7118.2666107.0261130.68770.24210.99990.64560.9999
70126.2116.4491105.3487128.71910.05970.1590.97480.9999
71124.6114.3913102.9537127.09960.05770.03430.56080.9993
72116.7111.01398.4743125.14820.21520.02980.43460.9915
73115.2101.779690.2035114.84130.0220.01260.55840.8844
74111.1107.390594.6612121.83160.30730.14460.50490.9674
75129.9123.0712107.8457140.44630.22060.91160.34530.9995
76113.3109.38695.6107125.14610.31320.00540.79010.9737
77118.5110.282695.9947126.69720.16320.35930.18150.9755
78133.5124.7157108.176143.78430.18330.73860.33730.9993
79102.190.22178.0593104.27750.048800.64780.3089
80102.491.667979.0733106.26860.07480.08070.38740.3874







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.05360.03750.003119.65471.63791.2798
700.05380.08370.00795.08077.92342.8149
710.05670.08920.0074104.21718.68482.947
720.0650.05120.004332.3422.69521.6417
730.06550.13190.011180.106715.00893.8741
740.06860.03450.002913.76021.14671.0708
750.0720.05550.004646.63253.8861.9713
760.07350.03580.00315.31921.27661.1299
770.07590.07450.006267.5255.62712.3721
780.0780.07040.005977.16326.43032.5358
790.07950.13170.011141.110911.75923.4292
800.08130.11710.0098115.17739.59813.0981

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0536 & 0.0375 & 0.0031 & 19.6547 & 1.6379 & 1.2798 \tabularnewline
70 & 0.0538 & 0.0837 & 0.007 & 95.0807 & 7.9234 & 2.8149 \tabularnewline
71 & 0.0567 & 0.0892 & 0.0074 & 104.2171 & 8.6848 & 2.947 \tabularnewline
72 & 0.065 & 0.0512 & 0.0043 & 32.342 & 2.6952 & 1.6417 \tabularnewline
73 & 0.0655 & 0.1319 & 0.011 & 180.1067 & 15.0089 & 3.8741 \tabularnewline
74 & 0.0686 & 0.0345 & 0.0029 & 13.7602 & 1.1467 & 1.0708 \tabularnewline
75 & 0.072 & 0.0555 & 0.0046 & 46.6325 & 3.886 & 1.9713 \tabularnewline
76 & 0.0735 & 0.0358 & 0.003 & 15.3192 & 1.2766 & 1.1299 \tabularnewline
77 & 0.0759 & 0.0745 & 0.0062 & 67.525 & 5.6271 & 2.3721 \tabularnewline
78 & 0.078 & 0.0704 & 0.0059 & 77.1632 & 6.4303 & 2.5358 \tabularnewline
79 & 0.0795 & 0.1317 & 0.011 & 141.1109 & 11.7592 & 3.4292 \tabularnewline
80 & 0.0813 & 0.1171 & 0.0098 & 115.1773 & 9.5981 & 3.0981 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4114&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]69[/C][C]0.0536[/C][C]0.0375[/C][C]0.0031[/C][C]19.6547[/C][C]1.6379[/C][C]1.2798[/C][/ROW]
[ROW][C]70[/C][C]0.0538[/C][C]0.0837[/C][C]0.007[/C][C]95.0807[/C][C]7.9234[/C][C]2.8149[/C][/ROW]
[ROW][C]71[/C][C]0.0567[/C][C]0.0892[/C][C]0.0074[/C][C]104.2171[/C][C]8.6848[/C][C]2.947[/C][/ROW]
[ROW][C]72[/C][C]0.065[/C][C]0.0512[/C][C]0.0043[/C][C]32.342[/C][C]2.6952[/C][C]1.6417[/C][/ROW]
[ROW][C]73[/C][C]0.0655[/C][C]0.1319[/C][C]0.011[/C][C]180.1067[/C][C]15.0089[/C][C]3.8741[/C][/ROW]
[ROW][C]74[/C][C]0.0686[/C][C]0.0345[/C][C]0.0029[/C][C]13.7602[/C][C]1.1467[/C][C]1.0708[/C][/ROW]
[ROW][C]75[/C][C]0.072[/C][C]0.0555[/C][C]0.0046[/C][C]46.6325[/C][C]3.886[/C][C]1.9713[/C][/ROW]
[ROW][C]76[/C][C]0.0735[/C][C]0.0358[/C][C]0.003[/C][C]15.3192[/C][C]1.2766[/C][C]1.1299[/C][/ROW]
[ROW][C]77[/C][C]0.0759[/C][C]0.0745[/C][C]0.0062[/C][C]67.525[/C][C]5.6271[/C][C]2.3721[/C][/ROW]
[ROW][C]78[/C][C]0.078[/C][C]0.0704[/C][C]0.0059[/C][C]77.1632[/C][C]6.4303[/C][C]2.5358[/C][/ROW]
[ROW][C]79[/C][C]0.0795[/C][C]0.1317[/C][C]0.011[/C][C]141.1109[/C][C]11.7592[/C][C]3.4292[/C][/ROW]
[ROW][C]80[/C][C]0.0813[/C][C]0.1171[/C][C]0.0098[/C][C]115.1773[/C][C]9.5981[/C][C]3.0981[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4114&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4114&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
690.05360.03750.003119.65471.63791.2798
700.05380.08370.00795.08077.92342.8149
710.05670.08920.0074104.21718.68482.947
720.0650.05120.004332.3422.69521.6417
730.06550.13190.011180.106715.00893.8741
740.06860.03450.002913.76021.14671.0708
750.0720.05550.004646.63253.8861.9713
760.07350.03580.00315.31921.27661.1299
770.07590.07450.006267.5255.62712.3721
780.0780.07040.005977.16326.43032.5358
790.07950.13170.011141.110911.75923.4292
800.08130.11710.0098115.17739.59813.0981



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