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 computationMon, 20 Dec 2010 20:44:58 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/20/t1292877870dv533uzt4dobguz.htm/, Retrieved Sat, 04 May 2024 04:14:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113135, Retrieved Sat, 04 May 2024 04:14:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact134
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [] [2010-12-13 08:35:23] [21eff0c210342db4afbdafe426a7c254]
-   PD  [(Partial) Autocorrelation Function] [] [2010-12-13 09:29:04] [21eff0c210342db4afbdafe426a7c254]
-    D    [(Partial) Autocorrelation Function] [] [2010-12-13 10:05:17] [21eff0c210342db4afbdafe426a7c254]
- RM D      [ARIMA Forecasting] [] [2010-12-13 10:48:48] [21eff0c210342db4afbdafe426a7c254]
- RMPD        [Univariate Data Series] [] [2010-12-13 20:53:52] [21eff0c210342db4afbdafe426a7c254]
- RMPD          [Histogram] [] [2010-12-14 14:33:39] [21eff0c210342db4afbdafe426a7c254]
- RMPD            [Univariate Explorative Data Analysis] [] [2010-12-16 14:27:05] [de4adef75375d243bafd27c3fb0ddf4c]
- RMPD                [ARIMA Forecasting] [] [2010-12-20 20:44:58] [13a73be5002723d89d3723d5fe97baf8] [Current]
Feedback Forum

Post a new message
Dataseries X:
21.3
21.1
20.6
20.5
20.5
20.8
21.1
21.3
21.3
21.1
20.9
19.9
19.8
19.5
19.6
19.6
19.7
20.2
19.7
19.3
18.9
18.4
18
17.8
17.8
17.7
17.5
17.4
17.1
17.1
17.2
17.8
18.6
18.9
18.9
18.7
18.6
19.1
20.3
21.1
21.6
21.5
21.5
21.7
21.9
22.2
22.6
22.5
23.2
23.6
23.8
23.9
23.8
23.5
23.3
23.2
23.5
23.5
23.5
23.3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113135&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[48])
3618.7-------
3718.6-------
3819.1-------
3920.3-------
4021.1-------
4121.6-------
4221.5-------
4321.5-------
4421.7-------
4521.9-------
4622.2-------
4722.6-------
4822.5-------
4923.222.523621.926223.12110.01320.530910.5309
5023.622.540921.390223.69150.03560.130810.5277
5123.822.751621.012824.49030.11860.16940.99710.6116
5223.922.999520.793625.20550.21180.23850.95430.6714
5323.823.274920.676825.8730.3460.31860.89680.7206
5423.523.490220.546526.43390.49740.41830.90740.7451
5523.323.666120.365426.96690.41390.53930.90080.7557
5623.223.811720.116927.50650.37280.6070.86870.7567
5723.523.965219.829328.10110.41280.64160.83610.7563
5823.524.135719.526128.74530.39350.60650.79480.7566
5923.524.325719.225629.42570.37550.62450.74640.7585
6023.324.521918.925830.1180.33430.63980.76060.7606

\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 & 18.7 & - & - & - & - & - & - & - \tabularnewline
37 & 18.6 & - & - & - & - & - & - & - \tabularnewline
38 & 19.1 & - & - & - & - & - & - & - \tabularnewline
39 & 20.3 & - & - & - & - & - & - & - \tabularnewline
40 & 21.1 & - & - & - & - & - & - & - \tabularnewline
41 & 21.6 & - & - & - & - & - & - & - \tabularnewline
42 & 21.5 & - & - & - & - & - & - & - \tabularnewline
43 & 21.5 & - & - & - & - & - & - & - \tabularnewline
44 & 21.7 & - & - & - & - & - & - & - \tabularnewline
45 & 21.9 & - & - & - & - & - & - & - \tabularnewline
46 & 22.2 & - & - & - & - & - & - & - \tabularnewline
47 & 22.6 & - & - & - & - & - & - & - \tabularnewline
48 & 22.5 & - & - & - & - & - & - & - \tabularnewline
49 & 23.2 & 22.5236 & 21.9262 & 23.1211 & 0.0132 & 0.5309 & 1 & 0.5309 \tabularnewline
50 & 23.6 & 22.5409 & 21.3902 & 23.6915 & 0.0356 & 0.1308 & 1 & 0.5277 \tabularnewline
51 & 23.8 & 22.7516 & 21.0128 & 24.4903 & 0.1186 & 0.1694 & 0.9971 & 0.6116 \tabularnewline
52 & 23.9 & 22.9995 & 20.7936 & 25.2055 & 0.2118 & 0.2385 & 0.9543 & 0.6714 \tabularnewline
53 & 23.8 & 23.2749 & 20.6768 & 25.873 & 0.346 & 0.3186 & 0.8968 & 0.7206 \tabularnewline
54 & 23.5 & 23.4902 & 20.5465 & 26.4339 & 0.4974 & 0.4183 & 0.9074 & 0.7451 \tabularnewline
55 & 23.3 & 23.6661 & 20.3654 & 26.9669 & 0.4139 & 0.5393 & 0.9008 & 0.7557 \tabularnewline
56 & 23.2 & 23.8117 & 20.1169 & 27.5065 & 0.3728 & 0.607 & 0.8687 & 0.7567 \tabularnewline
57 & 23.5 & 23.9652 & 19.8293 & 28.1011 & 0.4128 & 0.6416 & 0.8361 & 0.7563 \tabularnewline
58 & 23.5 & 24.1357 & 19.5261 & 28.7453 & 0.3935 & 0.6065 & 0.7948 & 0.7566 \tabularnewline
59 & 23.5 & 24.3257 & 19.2256 & 29.4257 & 0.3755 & 0.6245 & 0.7464 & 0.7585 \tabularnewline
60 & 23.3 & 24.5219 & 18.9258 & 30.118 & 0.3343 & 0.6398 & 0.7606 & 0.7606 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113135&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]18.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]18.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]19.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]20.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]21.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]21.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]21.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]21.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]21.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]21.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]22.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]22.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]22.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]23.2[/C][C]22.5236[/C][C]21.9262[/C][C]23.1211[/C][C]0.0132[/C][C]0.5309[/C][C]1[/C][C]0.5309[/C][/ROW]
[ROW][C]50[/C][C]23.6[/C][C]22.5409[/C][C]21.3902[/C][C]23.6915[/C][C]0.0356[/C][C]0.1308[/C][C]1[/C][C]0.5277[/C][/ROW]
[ROW][C]51[/C][C]23.8[/C][C]22.7516[/C][C]21.0128[/C][C]24.4903[/C][C]0.1186[/C][C]0.1694[/C][C]0.9971[/C][C]0.6116[/C][/ROW]
[ROW][C]52[/C][C]23.9[/C][C]22.9995[/C][C]20.7936[/C][C]25.2055[/C][C]0.2118[/C][C]0.2385[/C][C]0.9543[/C][C]0.6714[/C][/ROW]
[ROW][C]53[/C][C]23.8[/C][C]23.2749[/C][C]20.6768[/C][C]25.873[/C][C]0.346[/C][C]0.3186[/C][C]0.8968[/C][C]0.7206[/C][/ROW]
[ROW][C]54[/C][C]23.5[/C][C]23.4902[/C][C]20.5465[/C][C]26.4339[/C][C]0.4974[/C][C]0.4183[/C][C]0.9074[/C][C]0.7451[/C][/ROW]
[ROW][C]55[/C][C]23.3[/C][C]23.6661[/C][C]20.3654[/C][C]26.9669[/C][C]0.4139[/C][C]0.5393[/C][C]0.9008[/C][C]0.7557[/C][/ROW]
[ROW][C]56[/C][C]23.2[/C][C]23.8117[/C][C]20.1169[/C][C]27.5065[/C][C]0.3728[/C][C]0.607[/C][C]0.8687[/C][C]0.7567[/C][/ROW]
[ROW][C]57[/C][C]23.5[/C][C]23.9652[/C][C]19.8293[/C][C]28.1011[/C][C]0.4128[/C][C]0.6416[/C][C]0.8361[/C][C]0.7563[/C][/ROW]
[ROW][C]58[/C][C]23.5[/C][C]24.1357[/C][C]19.5261[/C][C]28.7453[/C][C]0.3935[/C][C]0.6065[/C][C]0.7948[/C][C]0.7566[/C][/ROW]
[ROW][C]59[/C][C]23.5[/C][C]24.3257[/C][C]19.2256[/C][C]29.4257[/C][C]0.3755[/C][C]0.6245[/C][C]0.7464[/C][C]0.7585[/C][/ROW]
[ROW][C]60[/C][C]23.3[/C][C]24.5219[/C][C]18.9258[/C][C]30.118[/C][C]0.3343[/C][C]0.6398[/C][C]0.7606[/C][C]0.7606[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113135&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113135&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])
3618.7-------
3718.6-------
3819.1-------
3920.3-------
4021.1-------
4121.6-------
4221.5-------
4321.5-------
4421.7-------
4521.9-------
4622.2-------
4722.6-------
4822.5-------
4923.222.523621.926223.12110.01320.530910.5309
5023.622.540921.390223.69150.03560.130810.5277
5123.822.751621.012824.49030.11860.16940.99710.6116
5223.922.999520.793625.20550.21180.23850.95430.6714
5323.823.274920.676825.8730.3460.31860.89680.7206
5423.523.490220.546526.43390.49740.41830.90740.7451
5523.323.666120.365426.96690.41390.53930.90080.7557
5623.223.811720.116927.50650.37280.6070.86870.7567
5723.523.965219.829328.10110.41280.64160.83610.7563
5823.524.135719.526128.74530.39350.60650.79480.7566
5923.524.325719.225629.42570.37550.62450.74640.7585
6023.324.521918.925830.1180.33430.63980.76060.7606







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01350.0300.457500
500.0260.0470.03851.12180.78960.8886
510.0390.04610.0411.09920.89280.9449
520.04890.03920.04060.81090.87230.934
530.0570.02260.0370.27570.7530.8678
540.06394e-040.03091e-040.62750.7922
550.0712-0.01550.02870.13410.5570.7463
560.0792-0.02570.02830.37420.53420.7309
570.0881-0.01940.02730.21640.49890.7063
580.0974-0.02630.02720.40410.48940.6996
590.107-0.03390.02780.68170.50690.712
600.1164-0.04980.02971.4930.58910.7675

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0135 & 0.03 & 0 & 0.4575 & 0 & 0 \tabularnewline
50 & 0.026 & 0.047 & 0.0385 & 1.1218 & 0.7896 & 0.8886 \tabularnewline
51 & 0.039 & 0.0461 & 0.041 & 1.0992 & 0.8928 & 0.9449 \tabularnewline
52 & 0.0489 & 0.0392 & 0.0406 & 0.8109 & 0.8723 & 0.934 \tabularnewline
53 & 0.057 & 0.0226 & 0.037 & 0.2757 & 0.753 & 0.8678 \tabularnewline
54 & 0.0639 & 4e-04 & 0.0309 & 1e-04 & 0.6275 & 0.7922 \tabularnewline
55 & 0.0712 & -0.0155 & 0.0287 & 0.1341 & 0.557 & 0.7463 \tabularnewline
56 & 0.0792 & -0.0257 & 0.0283 & 0.3742 & 0.5342 & 0.7309 \tabularnewline
57 & 0.0881 & -0.0194 & 0.0273 & 0.2164 & 0.4989 & 0.7063 \tabularnewline
58 & 0.0974 & -0.0263 & 0.0272 & 0.4041 & 0.4894 & 0.6996 \tabularnewline
59 & 0.107 & -0.0339 & 0.0278 & 0.6817 & 0.5069 & 0.712 \tabularnewline
60 & 0.1164 & -0.0498 & 0.0297 & 1.493 & 0.5891 & 0.7675 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113135&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.0135[/C][C]0.03[/C][C]0[/C][C]0.4575[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.026[/C][C]0.047[/C][C]0.0385[/C][C]1.1218[/C][C]0.7896[/C][C]0.8886[/C][/ROW]
[ROW][C]51[/C][C]0.039[/C][C]0.0461[/C][C]0.041[/C][C]1.0992[/C][C]0.8928[/C][C]0.9449[/C][/ROW]
[ROW][C]52[/C][C]0.0489[/C][C]0.0392[/C][C]0.0406[/C][C]0.8109[/C][C]0.8723[/C][C]0.934[/C][/ROW]
[ROW][C]53[/C][C]0.057[/C][C]0.0226[/C][C]0.037[/C][C]0.2757[/C][C]0.753[/C][C]0.8678[/C][/ROW]
[ROW][C]54[/C][C]0.0639[/C][C]4e-04[/C][C]0.0309[/C][C]1e-04[/C][C]0.6275[/C][C]0.7922[/C][/ROW]
[ROW][C]55[/C][C]0.0712[/C][C]-0.0155[/C][C]0.0287[/C][C]0.1341[/C][C]0.557[/C][C]0.7463[/C][/ROW]
[ROW][C]56[/C][C]0.0792[/C][C]-0.0257[/C][C]0.0283[/C][C]0.3742[/C][C]0.5342[/C][C]0.7309[/C][/ROW]
[ROW][C]57[/C][C]0.0881[/C][C]-0.0194[/C][C]0.0273[/C][C]0.2164[/C][C]0.4989[/C][C]0.7063[/C][/ROW]
[ROW][C]58[/C][C]0.0974[/C][C]-0.0263[/C][C]0.0272[/C][C]0.4041[/C][C]0.4894[/C][C]0.6996[/C][/ROW]
[ROW][C]59[/C][C]0.107[/C][C]-0.0339[/C][C]0.0278[/C][C]0.6817[/C][C]0.5069[/C][C]0.712[/C][/ROW]
[ROW][C]60[/C][C]0.1164[/C][C]-0.0498[/C][C]0.0297[/C][C]1.493[/C][C]0.5891[/C][C]0.7675[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113135&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113135&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.01350.0300.457500
500.0260.0470.03851.12180.78960.8886
510.0390.04610.0411.09920.89280.9449
520.04890.03920.04060.81090.87230.934
530.0570.02260.0370.27570.7530.8678
540.06394e-040.03091e-040.62750.7922
550.0712-0.01550.02870.13410.5570.7463
560.0792-0.02570.02830.37420.53420.7309
570.0881-0.01940.02730.21640.49890.7063
580.0974-0.02630.02720.40410.48940.6996
590.107-0.03390.02780.68170.50690.712
600.1164-0.04980.02971.4930.58910.7675



Parameters (Session):
par1 = 48 ; par2 = 1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 2 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 0 ; 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,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')