Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 18 Dec 2007 08:33:46 -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/18/t1197991051hnobjgcwi6dd28m.htm/, Retrieved Sat, 04 May 2024 08:52:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4543, Retrieved Sat, 04 May 2024 08:52:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordstijdreeks met outliers
Estimated Impact194
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting...] [2007-12-18 15:33:46] [bebbf4ab6ac77d61a56e6916ab0650f9] [Current]
Feedback Forum

Post a new message
Dataseries X:
75.9
77.7
86.9
90.7
91
89.5
92.5
94.1
98.5
96.8
91.2
97.1
104.9
110.9
104.8
94.1
95.8
99.3
101.1
104
99
105.4
107.1
110.7
117.1
118.7
126.5
127.5
134.6
131.8
135.9
142.7
141.7
153.4
145
137.7
148.3
152.2
169.4
168.6
161.1
174.1
179
190.6
190
181.6
174.8
180.5
196.8
193.8
197
216.3
221.4
217.9
229.7
227.4
204.2
196.6
198.8
207.5
190.7
201.6
210.5
223.5
223.8
231.2
244




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 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=4543&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]3 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=4543&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4543&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 time3 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[55])
43179-------
44190.6-------
45190-------
46181.6-------
47174.8-------
48180.5-------
49196.8-------
50193.8-------
51197-------
52216.3-------
53221.4-------
54217.9-------
55229.7-------
56227.4230.8171208.7816255.17830.39170.53580.99940.5358
57204.2230.7609200.2335265.94240.06950.57430.98840.5236
58196.6229.9561193.2723273.60260.06710.87630.98510.5046
59198.8229.279187.5914280.23070.12050.89560.98190.4935
60207.5229.8481183.655287.65980.22430.85370.95280.502
61190.7231.3887180.9689295.8560.1080.76620.85350.5205
62201.6231.1142177.2296301.38190.20520.87020.8510.5157
63210.5231.4068174.231307.34550.29470.77910.81270.5176
64223.5233.0839172.4985314.94840.40930.70560.65610.5323
65223.8233.504170.0184320.69540.41370.5890.60720.5341
66231.2233.2167167.1996325.29980.48290.57940.62780.5298
67244234.1689165.4164331.49720.42150.52380.53590.5359

\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[55]) \tabularnewline
43 & 179 & - & - & - & - & - & - & - \tabularnewline
44 & 190.6 & - & - & - & - & - & - & - \tabularnewline
45 & 190 & - & - & - & - & - & - & - \tabularnewline
46 & 181.6 & - & - & - & - & - & - & - \tabularnewline
47 & 174.8 & - & - & - & - & - & - & - \tabularnewline
48 & 180.5 & - & - & - & - & - & - & - \tabularnewline
49 & 196.8 & - & - & - & - & - & - & - \tabularnewline
50 & 193.8 & - & - & - & - & - & - & - \tabularnewline
51 & 197 & - & - & - & - & - & - & - \tabularnewline
52 & 216.3 & - & - & - & - & - & - & - \tabularnewline
53 & 221.4 & - & - & - & - & - & - & - \tabularnewline
54 & 217.9 & - & - & - & - & - & - & - \tabularnewline
55 & 229.7 & - & - & - & - & - & - & - \tabularnewline
56 & 227.4 & 230.8171 & 208.7816 & 255.1783 & 0.3917 & 0.5358 & 0.9994 & 0.5358 \tabularnewline
57 & 204.2 & 230.7609 & 200.2335 & 265.9424 & 0.0695 & 0.5743 & 0.9884 & 0.5236 \tabularnewline
58 & 196.6 & 229.9561 & 193.2723 & 273.6026 & 0.0671 & 0.8763 & 0.9851 & 0.5046 \tabularnewline
59 & 198.8 & 229.279 & 187.5914 & 280.2307 & 0.1205 & 0.8956 & 0.9819 & 0.4935 \tabularnewline
60 & 207.5 & 229.8481 & 183.655 & 287.6598 & 0.2243 & 0.8537 & 0.9528 & 0.502 \tabularnewline
61 & 190.7 & 231.3887 & 180.9689 & 295.856 & 0.108 & 0.7662 & 0.8535 & 0.5205 \tabularnewline
62 & 201.6 & 231.1142 & 177.2296 & 301.3819 & 0.2052 & 0.8702 & 0.851 & 0.5157 \tabularnewline
63 & 210.5 & 231.4068 & 174.231 & 307.3455 & 0.2947 & 0.7791 & 0.8127 & 0.5176 \tabularnewline
64 & 223.5 & 233.0839 & 172.4985 & 314.9484 & 0.4093 & 0.7056 & 0.6561 & 0.5323 \tabularnewline
65 & 223.8 & 233.504 & 170.0184 & 320.6954 & 0.4137 & 0.589 & 0.6072 & 0.5341 \tabularnewline
66 & 231.2 & 233.2167 & 167.1996 & 325.2998 & 0.4829 & 0.5794 & 0.6278 & 0.5298 \tabularnewline
67 & 244 & 234.1689 & 165.4164 & 331.4972 & 0.4215 & 0.5238 & 0.5359 & 0.5359 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4543&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[55])[/C][/ROW]
[ROW][C]43[/C][C]179[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]190.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]190[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]181.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]174.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]180.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]196.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]193.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]197[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]216.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]221.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]217.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]229.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]227.4[/C][C]230.8171[/C][C]208.7816[/C][C]255.1783[/C][C]0.3917[/C][C]0.5358[/C][C]0.9994[/C][C]0.5358[/C][/ROW]
[ROW][C]57[/C][C]204.2[/C][C]230.7609[/C][C]200.2335[/C][C]265.9424[/C][C]0.0695[/C][C]0.5743[/C][C]0.9884[/C][C]0.5236[/C][/ROW]
[ROW][C]58[/C][C]196.6[/C][C]229.9561[/C][C]193.2723[/C][C]273.6026[/C][C]0.0671[/C][C]0.8763[/C][C]0.9851[/C][C]0.5046[/C][/ROW]
[ROW][C]59[/C][C]198.8[/C][C]229.279[/C][C]187.5914[/C][C]280.2307[/C][C]0.1205[/C][C]0.8956[/C][C]0.9819[/C][C]0.4935[/C][/ROW]
[ROW][C]60[/C][C]207.5[/C][C]229.8481[/C][C]183.655[/C][C]287.6598[/C][C]0.2243[/C][C]0.8537[/C][C]0.9528[/C][C]0.502[/C][/ROW]
[ROW][C]61[/C][C]190.7[/C][C]231.3887[/C][C]180.9689[/C][C]295.856[/C][C]0.108[/C][C]0.7662[/C][C]0.8535[/C][C]0.5205[/C][/ROW]
[ROW][C]62[/C][C]201.6[/C][C]231.1142[/C][C]177.2296[/C][C]301.3819[/C][C]0.2052[/C][C]0.8702[/C][C]0.851[/C][C]0.5157[/C][/ROW]
[ROW][C]63[/C][C]210.5[/C][C]231.4068[/C][C]174.231[/C][C]307.3455[/C][C]0.2947[/C][C]0.7791[/C][C]0.8127[/C][C]0.5176[/C][/ROW]
[ROW][C]64[/C][C]223.5[/C][C]233.0839[/C][C]172.4985[/C][C]314.9484[/C][C]0.4093[/C][C]0.7056[/C][C]0.6561[/C][C]0.5323[/C][/ROW]
[ROW][C]65[/C][C]223.8[/C][C]233.504[/C][C]170.0184[/C][C]320.6954[/C][C]0.4137[/C][C]0.589[/C][C]0.6072[/C][C]0.5341[/C][/ROW]
[ROW][C]66[/C][C]231.2[/C][C]233.2167[/C][C]167.1996[/C][C]325.2998[/C][C]0.4829[/C][C]0.5794[/C][C]0.6278[/C][C]0.5298[/C][/ROW]
[ROW][C]67[/C][C]244[/C][C]234.1689[/C][C]165.4164[/C][C]331.4972[/C][C]0.4215[/C][C]0.5238[/C][C]0.5359[/C][C]0.5359[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4543&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4543&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[55])
43179-------
44190.6-------
45190-------
46181.6-------
47174.8-------
48180.5-------
49196.8-------
50193.8-------
51197-------
52216.3-------
53221.4-------
54217.9-------
55229.7-------
56227.4230.8171208.7816255.17830.39170.53580.99940.5358
57204.2230.7609200.2335265.94240.06950.57430.98840.5236
58196.6229.9561193.2723273.60260.06710.87630.98510.5046
59198.8229.279187.5914280.23070.12050.89560.98190.4935
60207.5229.8481183.655287.65980.22430.85370.95280.502
61190.7231.3887180.9689295.8560.1080.76620.85350.5205
62201.6231.1142177.2296301.38190.20520.87020.8510.5157
63210.5231.4068174.231307.34550.29470.77910.81270.5176
64223.5233.0839172.4985314.94840.40930.70560.65610.5323
65223.8233.504170.0184320.69540.41370.5890.60720.5341
66231.2233.2167167.1996325.29980.48290.57940.62780.5298
67244234.1689165.4164331.49720.42150.52380.53590.5359







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
560.0538-0.01480.001211.67650.9730.9864
570.0778-0.11510.0096705.479658.797.6675
580.0968-0.14510.01211112.627592.7199.6291
590.1134-0.13290.0111928.969777.41418.7985
600.1283-0.09720.0081499.439841.626.4514
610.1421-0.17580.01471655.5677137.96411.7458
620.1551-0.12770.0106871.088272.59078.52
630.1674-0.09030.0075437.095436.42466.0353
640.1792-0.04110.003491.85157.65432.7666
650.1905-0.04160.003594.16747.84732.8013
660.2014-0.00867e-044.0670.33890.5822
670.21210.0420.003596.65048.05422.838

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
56 & 0.0538 & -0.0148 & 0.0012 & 11.6765 & 0.973 & 0.9864 \tabularnewline
57 & 0.0778 & -0.1151 & 0.0096 & 705.4796 & 58.79 & 7.6675 \tabularnewline
58 & 0.0968 & -0.1451 & 0.0121 & 1112.6275 & 92.719 & 9.6291 \tabularnewline
59 & 0.1134 & -0.1329 & 0.0111 & 928.9697 & 77.4141 & 8.7985 \tabularnewline
60 & 0.1283 & -0.0972 & 0.0081 & 499.4398 & 41.62 & 6.4514 \tabularnewline
61 & 0.1421 & -0.1758 & 0.0147 & 1655.5677 & 137.964 & 11.7458 \tabularnewline
62 & 0.1551 & -0.1277 & 0.0106 & 871.0882 & 72.5907 & 8.52 \tabularnewline
63 & 0.1674 & -0.0903 & 0.0075 & 437.0954 & 36.4246 & 6.0353 \tabularnewline
64 & 0.1792 & -0.0411 & 0.0034 & 91.8515 & 7.6543 & 2.7666 \tabularnewline
65 & 0.1905 & -0.0416 & 0.0035 & 94.1674 & 7.8473 & 2.8013 \tabularnewline
66 & 0.2014 & -0.0086 & 7e-04 & 4.067 & 0.3389 & 0.5822 \tabularnewline
67 & 0.2121 & 0.042 & 0.0035 & 96.6504 & 8.0542 & 2.838 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4543&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]56[/C][C]0.0538[/C][C]-0.0148[/C][C]0.0012[/C][C]11.6765[/C][C]0.973[/C][C]0.9864[/C][/ROW]
[ROW][C]57[/C][C]0.0778[/C][C]-0.1151[/C][C]0.0096[/C][C]705.4796[/C][C]58.79[/C][C]7.6675[/C][/ROW]
[ROW][C]58[/C][C]0.0968[/C][C]-0.1451[/C][C]0.0121[/C][C]1112.6275[/C][C]92.719[/C][C]9.6291[/C][/ROW]
[ROW][C]59[/C][C]0.1134[/C][C]-0.1329[/C][C]0.0111[/C][C]928.9697[/C][C]77.4141[/C][C]8.7985[/C][/ROW]
[ROW][C]60[/C][C]0.1283[/C][C]-0.0972[/C][C]0.0081[/C][C]499.4398[/C][C]41.62[/C][C]6.4514[/C][/ROW]
[ROW][C]61[/C][C]0.1421[/C][C]-0.1758[/C][C]0.0147[/C][C]1655.5677[/C][C]137.964[/C][C]11.7458[/C][/ROW]
[ROW][C]62[/C][C]0.1551[/C][C]-0.1277[/C][C]0.0106[/C][C]871.0882[/C][C]72.5907[/C][C]8.52[/C][/ROW]
[ROW][C]63[/C][C]0.1674[/C][C]-0.0903[/C][C]0.0075[/C][C]437.0954[/C][C]36.4246[/C][C]6.0353[/C][/ROW]
[ROW][C]64[/C][C]0.1792[/C][C]-0.0411[/C][C]0.0034[/C][C]91.8515[/C][C]7.6543[/C][C]2.7666[/C][/ROW]
[ROW][C]65[/C][C]0.1905[/C][C]-0.0416[/C][C]0.0035[/C][C]94.1674[/C][C]7.8473[/C][C]2.8013[/C][/ROW]
[ROW][C]66[/C][C]0.2014[/C][C]-0.0086[/C][C]7e-04[/C][C]4.067[/C][C]0.3389[/C][C]0.5822[/C][/ROW]
[ROW][C]67[/C][C]0.2121[/C][C]0.042[/C][C]0.0035[/C][C]96.6504[/C][C]8.0542[/C][C]2.838[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4543&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4543&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
560.0538-0.01480.001211.67650.9730.9864
570.0778-0.11510.0096705.479658.797.6675
580.0968-0.14510.01211112.627592.7199.6291
590.1134-0.13290.0111928.969777.41418.7985
600.1283-0.09720.0081499.439841.626.4514
610.1421-0.17580.01471655.5677137.96411.7458
620.1551-0.12770.0106871.088272.59078.52
630.1674-0.09030.0075437.095436.42466.0353
640.1792-0.04110.003491.85157.65432.7666
650.1905-0.04160.003594.16747.84732.8013
660.2014-0.00867e-044.0670.33890.5822
670.21210.0420.003596.65048.05422.838



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