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 computationWed, 30 Dec 2009 07:38:50 -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/30/t12621842587xhykisnh7wyy06.htm/, Retrieved Mon, 29 Apr 2024 03:52:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=71302, Retrieved Mon, 29 Apr 2024 03:52:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact128
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-07 09:54:52] [b98453cac15ba1066b407e146608df68]
-   PD  [ARIMA Forecasting] [WS10] [2009-12-11 16:05:20] [90e6802d28d0afa9b030a19cd25ed2b0]
- R P     [ARIMA Forecasting] [Verbetering works...] [2009-12-16 13:53:31] [7c2a5b25a196bd646844b8f5223c9b3e]
-             [ARIMA Forecasting] [Workshop9] [2009-12-30 14:38:50] [40cfc51151e9382b81a5fb0c269b074d] [Current]
Feedback Forum

Post a new message
Dataseries X:
286602
283042
276687
277915
277128
277103
275037
270150
267140
264993
287259
291186
292300
288186
281477
282656
280190
280408
276836
275216
274352
271311
289802
290726
292300
278506
269826
265861
269034
264176
255198
253353
246057
235372
258556
260993
254663
250643
243422
247105
248541
245039
237080
237085
225554
226839
247934
248333
246969
245098
246263
255765
264319
268347
273046
273963
267430
271993
292710
295881
293299




Summary of computational 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 computational 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=71302&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]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=71302&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71302&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 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[49])
37254663-------
38250643-------
39243422-------
40247105-------
41248541-------
42245039-------
43237080-------
44237085-------
45225554-------
46226839-------
47247934-------
48248333-------
49246969-------
50245098240190.1032233193.3229247186.88360.08460.02880.00170.0288
51246263232451.926223329.5746241574.27740.00150.00330.00929e-04
52255765233116.8422221747.8854244485.799100.01170.00790.0085
53264319233449.0525219380.7922247517.312909e-040.01770.0298
54268347231168.9752215059.2131247278.7373000.04580.0273
55273046225292.3022207160.89243423.7145000.10130.0096
56273963223334.4294203280.1732243388.6855000.08950.0104
57267430217297.4085195534.0021239060.8149000.22860.0038
58271993213742.005190329.2149237154.7951000.13640.0027
59292710235138.0528210193.5293260082.576300.00190.15730.1763
60295881237084.8251210709.6488263460.0014000.20160.2313
61293299235650.6904207891.9582263409.4227000.21210.2121

\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[49]) \tabularnewline
37 & 254663 & - & - & - & - & - & - & - \tabularnewline
38 & 250643 & - & - & - & - & - & - & - \tabularnewline
39 & 243422 & - & - & - & - & - & - & - \tabularnewline
40 & 247105 & - & - & - & - & - & - & - \tabularnewline
41 & 248541 & - & - & - & - & - & - & - \tabularnewline
42 & 245039 & - & - & - & - & - & - & - \tabularnewline
43 & 237080 & - & - & - & - & - & - & - \tabularnewline
44 & 237085 & - & - & - & - & - & - & - \tabularnewline
45 & 225554 & - & - & - & - & - & - & - \tabularnewline
46 & 226839 & - & - & - & - & - & - & - \tabularnewline
47 & 247934 & - & - & - & - & - & - & - \tabularnewline
48 & 248333 & - & - & - & - & - & - & - \tabularnewline
49 & 246969 & - & - & - & - & - & - & - \tabularnewline
50 & 245098 & 240190.1032 & 233193.3229 & 247186.8836 & 0.0846 & 0.0288 & 0.0017 & 0.0288 \tabularnewline
51 & 246263 & 232451.926 & 223329.5746 & 241574.2774 & 0.0015 & 0.0033 & 0.0092 & 9e-04 \tabularnewline
52 & 255765 & 233116.8422 & 221747.8854 & 244485.7991 & 0 & 0.0117 & 0.0079 & 0.0085 \tabularnewline
53 & 264319 & 233449.0525 & 219380.7922 & 247517.3129 & 0 & 9e-04 & 0.0177 & 0.0298 \tabularnewline
54 & 268347 & 231168.9752 & 215059.2131 & 247278.7373 & 0 & 0 & 0.0458 & 0.0273 \tabularnewline
55 & 273046 & 225292.3022 & 207160.89 & 243423.7145 & 0 & 0 & 0.1013 & 0.0096 \tabularnewline
56 & 273963 & 223334.4294 & 203280.1732 & 243388.6855 & 0 & 0 & 0.0895 & 0.0104 \tabularnewline
57 & 267430 & 217297.4085 & 195534.0021 & 239060.8149 & 0 & 0 & 0.2286 & 0.0038 \tabularnewline
58 & 271993 & 213742.005 & 190329.2149 & 237154.7951 & 0 & 0 & 0.1364 & 0.0027 \tabularnewline
59 & 292710 & 235138.0528 & 210193.5293 & 260082.5763 & 0 & 0.0019 & 0.1573 & 0.1763 \tabularnewline
60 & 295881 & 237084.8251 & 210709.6488 & 263460.0014 & 0 & 0 & 0.2016 & 0.2313 \tabularnewline
61 & 293299 & 235650.6904 & 207891.9582 & 263409.4227 & 0 & 0 & 0.2121 & 0.2121 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71302&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[49])[/C][/ROW]
[ROW][C]37[/C][C]254663[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]250643[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]243422[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]247105[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]248541[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]245039[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]237080[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]237085[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]225554[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]226839[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]247934[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]248333[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]246969[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]245098[/C][C]240190.1032[/C][C]233193.3229[/C][C]247186.8836[/C][C]0.0846[/C][C]0.0288[/C][C]0.0017[/C][C]0.0288[/C][/ROW]
[ROW][C]51[/C][C]246263[/C][C]232451.926[/C][C]223329.5746[/C][C]241574.2774[/C][C]0.0015[/C][C]0.0033[/C][C]0.0092[/C][C]9e-04[/C][/ROW]
[ROW][C]52[/C][C]255765[/C][C]233116.8422[/C][C]221747.8854[/C][C]244485.7991[/C][C]0[/C][C]0.0117[/C][C]0.0079[/C][C]0.0085[/C][/ROW]
[ROW][C]53[/C][C]264319[/C][C]233449.0525[/C][C]219380.7922[/C][C]247517.3129[/C][C]0[/C][C]9e-04[/C][C]0.0177[/C][C]0.0298[/C][/ROW]
[ROW][C]54[/C][C]268347[/C][C]231168.9752[/C][C]215059.2131[/C][C]247278.7373[/C][C]0[/C][C]0[/C][C]0.0458[/C][C]0.0273[/C][/ROW]
[ROW][C]55[/C][C]273046[/C][C]225292.3022[/C][C]207160.89[/C][C]243423.7145[/C][C]0[/C][C]0[/C][C]0.1013[/C][C]0.0096[/C][/ROW]
[ROW][C]56[/C][C]273963[/C][C]223334.4294[/C][C]203280.1732[/C][C]243388.6855[/C][C]0[/C][C]0[/C][C]0.0895[/C][C]0.0104[/C][/ROW]
[ROW][C]57[/C][C]267430[/C][C]217297.4085[/C][C]195534.0021[/C][C]239060.8149[/C][C]0[/C][C]0[/C][C]0.2286[/C][C]0.0038[/C][/ROW]
[ROW][C]58[/C][C]271993[/C][C]213742.005[/C][C]190329.2149[/C][C]237154.7951[/C][C]0[/C][C]0[/C][C]0.1364[/C][C]0.0027[/C][/ROW]
[ROW][C]59[/C][C]292710[/C][C]235138.0528[/C][C]210193.5293[/C][C]260082.5763[/C][C]0[/C][C]0.0019[/C][C]0.1573[/C][C]0.1763[/C][/ROW]
[ROW][C]60[/C][C]295881[/C][C]237084.8251[/C][C]210709.6488[/C][C]263460.0014[/C][C]0[/C][C]0[/C][C]0.2016[/C][C]0.2313[/C][/ROW]
[ROW][C]61[/C][C]293299[/C][C]235650.6904[/C][C]207891.9582[/C][C]263409.4227[/C][C]0[/C][C]0[/C][C]0.2121[/C][C]0.2121[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71302&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71302&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[49])
37254663-------
38250643-------
39243422-------
40247105-------
41248541-------
42245039-------
43237080-------
44237085-------
45225554-------
46226839-------
47247934-------
48248333-------
49246969-------
50245098240190.1032233193.3229247186.88360.08460.02880.00170.0288
51246263232451.926223329.5746241574.27740.00150.00330.00929e-04
52255765233116.8422221747.8854244485.799100.01170.00790.0085
53264319233449.0525219380.7922247517.312909e-040.01770.0298
54268347231168.9752215059.2131247278.7373000.04580.0273
55273046225292.3022207160.89243423.7145000.10130.0096
56273963223334.4294203280.1732243388.6855000.08950.0104
57267430217297.4085195534.0021239060.8149000.22860.0038
58271993213742.005190329.2149237154.7951000.13640.0027
59292710235138.0528210193.5293260082.576300.00190.15730.1763
60295881237084.8251210709.6488263460.0014000.20160.2313
61293299235650.6904207891.9582263409.4227000.21210.2121







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.01490.0204024087450.666900
510.020.05940.0399190745765.2156107416607.941210364.1984
520.02490.09720.059512939050.6275242590755.503315575.3252
530.03070.13220.0773952953657.1909420181480.925220498.3287
540.03560.16080.0941382205529.029612586290.54624750.4806
550.04110.2120.11372280415649.9144890557850.440729842.2159
560.04580.22670.12982563252165.6141129514181.179833608.2457
570.05110.23070.14242513276728.92771302484499.648236089.9501
580.05590.27250.15693393178418.95231534783824.015439176.3171
590.05410.24480.16573314529107.36571712758352.350441385.4848
600.05680.2480.17323456990183.42731871324882.448343258.8128
610.06010.24460.17913323327594.98631992325108.493144635.4692

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0149 & 0.0204 & 0 & 24087450.6669 & 0 & 0 \tabularnewline
51 & 0.02 & 0.0594 & 0.0399 & 190745765.2156 & 107416607.9412 & 10364.1984 \tabularnewline
52 & 0.0249 & 0.0972 & 0.059 & 512939050.6275 & 242590755.5033 & 15575.3252 \tabularnewline
53 & 0.0307 & 0.1322 & 0.0773 & 952953657.1909 & 420181480.9252 & 20498.3287 \tabularnewline
54 & 0.0356 & 0.1608 & 0.094 & 1382205529.029 & 612586290.546 & 24750.4806 \tabularnewline
55 & 0.0411 & 0.212 & 0.1137 & 2280415649.9144 & 890557850.4407 & 29842.2159 \tabularnewline
56 & 0.0458 & 0.2267 & 0.1298 & 2563252165.614 & 1129514181.1798 & 33608.2457 \tabularnewline
57 & 0.0511 & 0.2307 & 0.1424 & 2513276728.9277 & 1302484499.6482 & 36089.9501 \tabularnewline
58 & 0.0559 & 0.2725 & 0.1569 & 3393178418.9523 & 1534783824.0154 & 39176.3171 \tabularnewline
59 & 0.0541 & 0.2448 & 0.1657 & 3314529107.3657 & 1712758352.3504 & 41385.4848 \tabularnewline
60 & 0.0568 & 0.248 & 0.1732 & 3456990183.4273 & 1871324882.4483 & 43258.8128 \tabularnewline
61 & 0.0601 & 0.2446 & 0.1791 & 3323327594.9863 & 1992325108.4931 & 44635.4692 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71302&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]50[/C][C]0.0149[/C][C]0.0204[/C][C]0[/C][C]24087450.6669[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.02[/C][C]0.0594[/C][C]0.0399[/C][C]190745765.2156[/C][C]107416607.9412[/C][C]10364.1984[/C][/ROW]
[ROW][C]52[/C][C]0.0249[/C][C]0.0972[/C][C]0.059[/C][C]512939050.6275[/C][C]242590755.5033[/C][C]15575.3252[/C][/ROW]
[ROW][C]53[/C][C]0.0307[/C][C]0.1322[/C][C]0.0773[/C][C]952953657.1909[/C][C]420181480.9252[/C][C]20498.3287[/C][/ROW]
[ROW][C]54[/C][C]0.0356[/C][C]0.1608[/C][C]0.094[/C][C]1382205529.029[/C][C]612586290.546[/C][C]24750.4806[/C][/ROW]
[ROW][C]55[/C][C]0.0411[/C][C]0.212[/C][C]0.1137[/C][C]2280415649.9144[/C][C]890557850.4407[/C][C]29842.2159[/C][/ROW]
[ROW][C]56[/C][C]0.0458[/C][C]0.2267[/C][C]0.1298[/C][C]2563252165.614[/C][C]1129514181.1798[/C][C]33608.2457[/C][/ROW]
[ROW][C]57[/C][C]0.0511[/C][C]0.2307[/C][C]0.1424[/C][C]2513276728.9277[/C][C]1302484499.6482[/C][C]36089.9501[/C][/ROW]
[ROW][C]58[/C][C]0.0559[/C][C]0.2725[/C][C]0.1569[/C][C]3393178418.9523[/C][C]1534783824.0154[/C][C]39176.3171[/C][/ROW]
[ROW][C]59[/C][C]0.0541[/C][C]0.2448[/C][C]0.1657[/C][C]3314529107.3657[/C][C]1712758352.3504[/C][C]41385.4848[/C][/ROW]
[ROW][C]60[/C][C]0.0568[/C][C]0.248[/C][C]0.1732[/C][C]3456990183.4273[/C][C]1871324882.4483[/C][C]43258.8128[/C][/ROW]
[ROW][C]61[/C][C]0.0601[/C][C]0.2446[/C][C]0.1791[/C][C]3323327594.9863[/C][C]1992325108.4931[/C][C]44635.4692[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71302&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71302&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
500.01490.0204024087450.666900
510.020.05940.0399190745765.2156107416607.941210364.1984
520.02490.09720.059512939050.6275242590755.503315575.3252
530.03070.13220.0773952953657.1909420181480.925220498.3287
540.03560.16080.0941382205529.029612586290.54624750.4806
550.04110.2120.11372280415649.9144890557850.440729842.2159
560.04580.22670.12982563252165.6141129514181.179833608.2457
570.05110.23070.14242513276728.92771302484499.648236089.9501
580.05590.27250.15693393178418.95231534783824.015439176.3171
590.05410.24480.16573314529107.36571712758352.350441385.4848
600.05680.2480.17323456990183.42731871324882.448343258.8128
610.06010.24460.17913323327594.98631992325108.493144635.4692



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')