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 07:38:07 -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/t1197814906jmwhk0j2hj5rbeb.htm/, Retrieved Thu, 02 May 2024 07:06:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4193, Retrieved Thu, 02 May 2024 07:06:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact192
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-16 14:38:07] [2cdb7403ed3391afb545b8c0d20da37e] [Current]
Feedback Forum

Post a new message
Dataseries X:
115.9
112.9
126.3
116.8
112
129.7
113.6
115.7
119.5
125.8
129.6
128
112.8
101.6
123.9
118.8
109.1
130.6
112.4
111
116.2
119.8
117.2
127.3
107.7
97.5
120.1
110.6
111.3
119.8
105.5
108.7
128.7
119.5
121.1
128.4
108.8
107.5
125.6
102.9
107.5
120.4
104.3
100.6
121.9
112.7
124.9
123.9
102.2
104.9
109.8
98.9
107.3
112.6
104
110.6
100.8
103.8
117
108.4
95.5
96.9
103.9
101.1
100.6
104.3
98
99.5
97.4
105.6
117.5
107.4
97.8
91.5
107.7
100.1
96.6
106.8
98
98.6




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 4 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4193&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4193&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4193&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 time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
56110.6-------
57100.8-------
58103.8-------
59117-------
60108.4-------
6195.5-------
6296.9-------
63103.9-------
64101.1-------
65100.6-------
66104.3-------
6798-------
6899.5-------
6997.4103.153896.2766111.27690.08250.8110.7150.811
70105.6103.369496.4115111.6020.29770.92240.45920.8215
71117.5106.258498.7463115.22950.0070.55720.00950.9301
72107.4107.566598.4558118.8820.48850.04270.44260.9188
7397.895.592988.4697104.190.30740.00360.50850.1865
7491.594.368287.3032102.90310.25510.21530.28050.1193
75107.7106.928497.0369119.49430.45210.99190.68170.8767
76100.196.087788.1431105.89850.21140.01020.15830.2477
7796.696.548888.3714106.70530.49610.24660.21720.2845
78106.8104.722194.6417117.67010.37660.89060.52550.7854
799894.834386.6003105.12370.27320.01130.27320.1871
8098.692.386284.4853102.22240.10780.13160.07820.0782

\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 & 110.6 & - & - & - & - & - & - & - \tabularnewline
57 & 100.8 & - & - & - & - & - & - & - \tabularnewline
58 & 103.8 & - & - & - & - & - & - & - \tabularnewline
59 & 117 & - & - & - & - & - & - & - \tabularnewline
60 & 108.4 & - & - & - & - & - & - & - \tabularnewline
61 & 95.5 & - & - & - & - & - & - & - \tabularnewline
62 & 96.9 & - & - & - & - & - & - & - \tabularnewline
63 & 103.9 & - & - & - & - & - & - & - \tabularnewline
64 & 101.1 & - & - & - & - & - & - & - \tabularnewline
65 & 100.6 & - & - & - & - & - & - & - \tabularnewline
66 & 104.3 & - & - & - & - & - & - & - \tabularnewline
67 & 98 & - & - & - & - & - & - & - \tabularnewline
68 & 99.5 & - & - & - & - & - & - & - \tabularnewline
69 & 97.4 & 103.1538 & 96.2766 & 111.2769 & 0.0825 & 0.811 & 0.715 & 0.811 \tabularnewline
70 & 105.6 & 103.3694 & 96.4115 & 111.602 & 0.2977 & 0.9224 & 0.4592 & 0.8215 \tabularnewline
71 & 117.5 & 106.2584 & 98.7463 & 115.2295 & 0.007 & 0.5572 & 0.0095 & 0.9301 \tabularnewline
72 & 107.4 & 107.5665 & 98.4558 & 118.882 & 0.4885 & 0.0427 & 0.4426 & 0.9188 \tabularnewline
73 & 97.8 & 95.5929 & 88.4697 & 104.19 & 0.3074 & 0.0036 & 0.5085 & 0.1865 \tabularnewline
74 & 91.5 & 94.3682 & 87.3032 & 102.9031 & 0.2551 & 0.2153 & 0.2805 & 0.1193 \tabularnewline
75 & 107.7 & 106.9284 & 97.0369 & 119.4943 & 0.4521 & 0.9919 & 0.6817 & 0.8767 \tabularnewline
76 & 100.1 & 96.0877 & 88.1431 & 105.8985 & 0.2114 & 0.0102 & 0.1583 & 0.2477 \tabularnewline
77 & 96.6 & 96.5488 & 88.3714 & 106.7053 & 0.4961 & 0.2466 & 0.2172 & 0.2845 \tabularnewline
78 & 106.8 & 104.7221 & 94.6417 & 117.6701 & 0.3766 & 0.8906 & 0.5255 & 0.7854 \tabularnewline
79 & 98 & 94.8343 & 86.6003 & 105.1237 & 0.2732 & 0.0113 & 0.2732 & 0.1871 \tabularnewline
80 & 98.6 & 92.3862 & 84.4853 & 102.2224 & 0.1078 & 0.1316 & 0.0782 & 0.0782 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4193&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]110.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]100.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]103.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]108.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]95.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]96.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]103.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]101.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]100.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]104.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]99.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]97.4[/C][C]103.1538[/C][C]96.2766[/C][C]111.2769[/C][C]0.0825[/C][C]0.811[/C][C]0.715[/C][C]0.811[/C][/ROW]
[ROW][C]70[/C][C]105.6[/C][C]103.3694[/C][C]96.4115[/C][C]111.602[/C][C]0.2977[/C][C]0.9224[/C][C]0.4592[/C][C]0.8215[/C][/ROW]
[ROW][C]71[/C][C]117.5[/C][C]106.2584[/C][C]98.7463[/C][C]115.2295[/C][C]0.007[/C][C]0.5572[/C][C]0.0095[/C][C]0.9301[/C][/ROW]
[ROW][C]72[/C][C]107.4[/C][C]107.5665[/C][C]98.4558[/C][C]118.882[/C][C]0.4885[/C][C]0.0427[/C][C]0.4426[/C][C]0.9188[/C][/ROW]
[ROW][C]73[/C][C]97.8[/C][C]95.5929[/C][C]88.4697[/C][C]104.19[/C][C]0.3074[/C][C]0.0036[/C][C]0.5085[/C][C]0.1865[/C][/ROW]
[ROW][C]74[/C][C]91.5[/C][C]94.3682[/C][C]87.3032[/C][C]102.9031[/C][C]0.2551[/C][C]0.2153[/C][C]0.2805[/C][C]0.1193[/C][/ROW]
[ROW][C]75[/C][C]107.7[/C][C]106.9284[/C][C]97.0369[/C][C]119.4943[/C][C]0.4521[/C][C]0.9919[/C][C]0.6817[/C][C]0.8767[/C][/ROW]
[ROW][C]76[/C][C]100.1[/C][C]96.0877[/C][C]88.1431[/C][C]105.8985[/C][C]0.2114[/C][C]0.0102[/C][C]0.1583[/C][C]0.2477[/C][/ROW]
[ROW][C]77[/C][C]96.6[/C][C]96.5488[/C][C]88.3714[/C][C]106.7053[/C][C]0.4961[/C][C]0.2466[/C][C]0.2172[/C][C]0.2845[/C][/ROW]
[ROW][C]78[/C][C]106.8[/C][C]104.7221[/C][C]94.6417[/C][C]117.6701[/C][C]0.3766[/C][C]0.8906[/C][C]0.5255[/C][C]0.7854[/C][/ROW]
[ROW][C]79[/C][C]98[/C][C]94.8343[/C][C]86.6003[/C][C]105.1237[/C][C]0.2732[/C][C]0.0113[/C][C]0.2732[/C][C]0.1871[/C][/ROW]
[ROW][C]80[/C][C]98.6[/C][C]92.3862[/C][C]84.4853[/C][C]102.2224[/C][C]0.1078[/C][C]0.1316[/C][C]0.0782[/C][C]0.0782[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4193&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4193&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])
56110.6-------
57100.8-------
58103.8-------
59117-------
60108.4-------
6195.5-------
6296.9-------
63103.9-------
64101.1-------
65100.6-------
66104.3-------
6798-------
6899.5-------
6997.4103.153896.2766111.27690.08250.8110.7150.811
70105.6103.369496.4115111.6020.29770.92240.45920.8215
71117.5106.258498.7463115.22950.0070.55720.00950.9301
72107.4107.566598.4558118.8820.48850.04270.44260.9188
7397.895.592988.4697104.190.30740.00360.50850.1865
7491.594.368287.3032102.90310.25510.21530.28050.1193
75107.7106.928497.0369119.49430.45210.99190.68170.8767
76100.196.087788.1431105.89850.21140.01020.15830.2477
7796.696.548888.3714106.70530.49610.24660.21720.2845
78106.8104.722194.6417117.67010.37660.89060.52550.7854
799894.834386.6003105.12370.27320.01130.27320.1871
8098.692.386284.4853102.22240.10780.13160.07820.0782







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.0402-0.05580.004633.10642.75891.661
700.04060.02160.00184.97570.41460.6439
710.04310.10580.0088126.37310.53113.2452
720.0537-0.00151e-040.02770.00230.0481
730.04590.02310.00194.87110.40590.6371
740.0461-0.03040.00258.22640.68550.828
750.060.00726e-040.59540.04960.2228
760.05210.04180.003516.09851.34151.1582
770.05375e-0400.00262e-040.0148
780.06310.01980.00174.31780.35980.5998
790.05540.03340.002810.02150.83510.9138
800.05430.06730.005638.61133.21761.7938

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0402 & -0.0558 & 0.0046 & 33.1064 & 2.7589 & 1.661 \tabularnewline
70 & 0.0406 & 0.0216 & 0.0018 & 4.9757 & 0.4146 & 0.6439 \tabularnewline
71 & 0.0431 & 0.1058 & 0.0088 & 126.373 & 10.5311 & 3.2452 \tabularnewline
72 & 0.0537 & -0.0015 & 1e-04 & 0.0277 & 0.0023 & 0.0481 \tabularnewline
73 & 0.0459 & 0.0231 & 0.0019 & 4.8711 & 0.4059 & 0.6371 \tabularnewline
74 & 0.0461 & -0.0304 & 0.0025 & 8.2264 & 0.6855 & 0.828 \tabularnewline
75 & 0.06 & 0.0072 & 6e-04 & 0.5954 & 0.0496 & 0.2228 \tabularnewline
76 & 0.0521 & 0.0418 & 0.0035 & 16.0985 & 1.3415 & 1.1582 \tabularnewline
77 & 0.0537 & 5e-04 & 0 & 0.0026 & 2e-04 & 0.0148 \tabularnewline
78 & 0.0631 & 0.0198 & 0.0017 & 4.3178 & 0.3598 & 0.5998 \tabularnewline
79 & 0.0554 & 0.0334 & 0.0028 & 10.0215 & 0.8351 & 0.9138 \tabularnewline
80 & 0.0543 & 0.0673 & 0.0056 & 38.6113 & 3.2176 & 1.7938 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4193&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.0402[/C][C]-0.0558[/C][C]0.0046[/C][C]33.1064[/C][C]2.7589[/C][C]1.661[/C][/ROW]
[ROW][C]70[/C][C]0.0406[/C][C]0.0216[/C][C]0.0018[/C][C]4.9757[/C][C]0.4146[/C][C]0.6439[/C][/ROW]
[ROW][C]71[/C][C]0.0431[/C][C]0.1058[/C][C]0.0088[/C][C]126.373[/C][C]10.5311[/C][C]3.2452[/C][/ROW]
[ROW][C]72[/C][C]0.0537[/C][C]-0.0015[/C][C]1e-04[/C][C]0.0277[/C][C]0.0023[/C][C]0.0481[/C][/ROW]
[ROW][C]73[/C][C]0.0459[/C][C]0.0231[/C][C]0.0019[/C][C]4.8711[/C][C]0.4059[/C][C]0.6371[/C][/ROW]
[ROW][C]74[/C][C]0.0461[/C][C]-0.0304[/C][C]0.0025[/C][C]8.2264[/C][C]0.6855[/C][C]0.828[/C][/ROW]
[ROW][C]75[/C][C]0.06[/C][C]0.0072[/C][C]6e-04[/C][C]0.5954[/C][C]0.0496[/C][C]0.2228[/C][/ROW]
[ROW][C]76[/C][C]0.0521[/C][C]0.0418[/C][C]0.0035[/C][C]16.0985[/C][C]1.3415[/C][C]1.1582[/C][/ROW]
[ROW][C]77[/C][C]0.0537[/C][C]5e-04[/C][C]0[/C][C]0.0026[/C][C]2e-04[/C][C]0.0148[/C][/ROW]
[ROW][C]78[/C][C]0.0631[/C][C]0.0198[/C][C]0.0017[/C][C]4.3178[/C][C]0.3598[/C][C]0.5998[/C][/ROW]
[ROW][C]79[/C][C]0.0554[/C][C]0.0334[/C][C]0.0028[/C][C]10.0215[/C][C]0.8351[/C][C]0.9138[/C][/ROW]
[ROW][C]80[/C][C]0.0543[/C][C]0.0673[/C][C]0.0056[/C][C]38.6113[/C][C]3.2176[/C][C]1.7938[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4193&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4193&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.0402-0.05580.004633.10642.75891.661
700.04060.02160.00184.97570.41460.6439
710.04310.10580.0088126.37310.53113.2452
720.0537-0.00151e-040.02770.00230.0481
730.04590.02310.00194.87110.40590.6371
740.0461-0.03040.00258.22640.68550.828
750.060.00726e-040.59540.04960.2228
760.05210.04180.003516.09851.34151.1582
770.05375e-0400.00262e-040.0148
780.06310.01980.00174.31780.35980.5998
790.05540.03340.002810.02150.83510.9138
800.05430.06730.005638.61133.21761.7938



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