Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 17 Dec 2008 05:42:38 -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/2008/Dec/17/t1229517846c8wk63k7gs2d7xc.htm/, Retrieved Sun, 19 May 2024 06:31:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34318, Retrieved Sun, 19 May 2024 06:31:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact167
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [PACF paper d=0 D=1] [2008-12-17 10:36:38] [11edab5c4db3615abbf782b1c6e7cacf]
- RMP     [ARIMA Forecasting] [arima forecasting ] [2008-12-17 12:42:38] [e1dd70d3b1099218056e8ae5041dcc2f] [Current]
Feedback Forum

Post a new message
Dataseries X:
12.5
14.8
15.9
14.8
12.9
14.3
14.2
15.9
15.3
15.5
15.1
15
12.1
15.8
16.9
15.1
13.7
14.8
14.7
16
15.4
15
15.5
15.1
11.7
16.3
16.7
15
14.9
14.6
15.3
17.9
16.4
15.4
17.9
15.9
13.9
17.8
17.9
17.4
16.7
16
16.6
19.1
17.8
17.2
18.6
16.3
15.1
19.2
17.7
19.1
18
17.5
17.8
21.1
17.2
19.4
19.8
17.6
16.2
19.5
19.9
20
17.3
18.9
18.6
21.4
18.6
19.8
20.8
19.6
17.7
19.8
22.2
20.7
17.9
21.2
21.4
21.7
23.2
21.5
22.9
23.2
18.6




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34318&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]3 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=34318&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34318&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 time3 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[73])
6116.2-------
6219.5-------
6319.9-------
6420-------
6517.3-------
6618.9-------
6718.6-------
6821.4-------
6918.6-------
7019.8-------
7120.8-------
7219.6-------
7317.7-------
7419.820.818119.480622.15570.067910.97331
7522.221.201819.861922.54170.07210.97980.97161
7620.721.140119.719322.56080.27190.07180.94211
7717.918.984917.541720.42810.07030.00990.98890.9595
7821.219.940518.458621.42240.04790.99650.91560.9985
7921.419.869318.357121.38150.02360.04230.950.9975
8021.722.602821.058624.14690.12590.93660.93661
8123.220.112918.538821.68691e-040.02410.97020.9987
8221.520.905719.302322.50910.23380.00250.91171
8322.921.969620.337823.60130.13190.71360.921
8423.220.459918.800622.11926e-040.0020.84510.9994
8518.618.734517.048520.42060.437900.88540.8854

\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[73]) \tabularnewline
61 & 16.2 & - & - & - & - & - & - & - \tabularnewline
62 & 19.5 & - & - & - & - & - & - & - \tabularnewline
63 & 19.9 & - & - & - & - & - & - & - \tabularnewline
64 & 20 & - & - & - & - & - & - & - \tabularnewline
65 & 17.3 & - & - & - & - & - & - & - \tabularnewline
66 & 18.9 & - & - & - & - & - & - & - \tabularnewline
67 & 18.6 & - & - & - & - & - & - & - \tabularnewline
68 & 21.4 & - & - & - & - & - & - & - \tabularnewline
69 & 18.6 & - & - & - & - & - & - & - \tabularnewline
70 & 19.8 & - & - & - & - & - & - & - \tabularnewline
71 & 20.8 & - & - & - & - & - & - & - \tabularnewline
72 & 19.6 & - & - & - & - & - & - & - \tabularnewline
73 & 17.7 & - & - & - & - & - & - & - \tabularnewline
74 & 19.8 & 20.8181 & 19.4806 & 22.1557 & 0.0679 & 1 & 0.9733 & 1 \tabularnewline
75 & 22.2 & 21.2018 & 19.8619 & 22.5417 & 0.0721 & 0.9798 & 0.9716 & 1 \tabularnewline
76 & 20.7 & 21.1401 & 19.7193 & 22.5608 & 0.2719 & 0.0718 & 0.9421 & 1 \tabularnewline
77 & 17.9 & 18.9849 & 17.5417 & 20.4281 & 0.0703 & 0.0099 & 0.9889 & 0.9595 \tabularnewline
78 & 21.2 & 19.9405 & 18.4586 & 21.4224 & 0.0479 & 0.9965 & 0.9156 & 0.9985 \tabularnewline
79 & 21.4 & 19.8693 & 18.3571 & 21.3815 & 0.0236 & 0.0423 & 0.95 & 0.9975 \tabularnewline
80 & 21.7 & 22.6028 & 21.0586 & 24.1469 & 0.1259 & 0.9366 & 0.9366 & 1 \tabularnewline
81 & 23.2 & 20.1129 & 18.5388 & 21.6869 & 1e-04 & 0.0241 & 0.9702 & 0.9987 \tabularnewline
82 & 21.5 & 20.9057 & 19.3023 & 22.5091 & 0.2338 & 0.0025 & 0.9117 & 1 \tabularnewline
83 & 22.9 & 21.9696 & 20.3378 & 23.6013 & 0.1319 & 0.7136 & 0.92 & 1 \tabularnewline
84 & 23.2 & 20.4599 & 18.8006 & 22.1192 & 6e-04 & 0.002 & 0.8451 & 0.9994 \tabularnewline
85 & 18.6 & 18.7345 & 17.0485 & 20.4206 & 0.4379 & 0 & 0.8854 & 0.8854 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34318&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[73])[/C][/ROW]
[ROW][C]61[/C][C]16.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]19.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]19.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]20[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]17.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]18.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]18.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]21.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]18.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]19.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]20.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]19.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]17.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]19.8[/C][C]20.8181[/C][C]19.4806[/C][C]22.1557[/C][C]0.0679[/C][C]1[/C][C]0.9733[/C][C]1[/C][/ROW]
[ROW][C]75[/C][C]22.2[/C][C]21.2018[/C][C]19.8619[/C][C]22.5417[/C][C]0.0721[/C][C]0.9798[/C][C]0.9716[/C][C]1[/C][/ROW]
[ROW][C]76[/C][C]20.7[/C][C]21.1401[/C][C]19.7193[/C][C]22.5608[/C][C]0.2719[/C][C]0.0718[/C][C]0.9421[/C][C]1[/C][/ROW]
[ROW][C]77[/C][C]17.9[/C][C]18.9849[/C][C]17.5417[/C][C]20.4281[/C][C]0.0703[/C][C]0.0099[/C][C]0.9889[/C][C]0.9595[/C][/ROW]
[ROW][C]78[/C][C]21.2[/C][C]19.9405[/C][C]18.4586[/C][C]21.4224[/C][C]0.0479[/C][C]0.9965[/C][C]0.9156[/C][C]0.9985[/C][/ROW]
[ROW][C]79[/C][C]21.4[/C][C]19.8693[/C][C]18.3571[/C][C]21.3815[/C][C]0.0236[/C][C]0.0423[/C][C]0.95[/C][C]0.9975[/C][/ROW]
[ROW][C]80[/C][C]21.7[/C][C]22.6028[/C][C]21.0586[/C][C]24.1469[/C][C]0.1259[/C][C]0.9366[/C][C]0.9366[/C][C]1[/C][/ROW]
[ROW][C]81[/C][C]23.2[/C][C]20.1129[/C][C]18.5388[/C][C]21.6869[/C][C]1e-04[/C][C]0.0241[/C][C]0.9702[/C][C]0.9987[/C][/ROW]
[ROW][C]82[/C][C]21.5[/C][C]20.9057[/C][C]19.3023[/C][C]22.5091[/C][C]0.2338[/C][C]0.0025[/C][C]0.9117[/C][C]1[/C][/ROW]
[ROW][C]83[/C][C]22.9[/C][C]21.9696[/C][C]20.3378[/C][C]23.6013[/C][C]0.1319[/C][C]0.7136[/C][C]0.92[/C][C]1[/C][/ROW]
[ROW][C]84[/C][C]23.2[/C][C]20.4599[/C][C]18.8006[/C][C]22.1192[/C][C]6e-04[/C][C]0.002[/C][C]0.8451[/C][C]0.9994[/C][/ROW]
[ROW][C]85[/C][C]18.6[/C][C]18.7345[/C][C]17.0485[/C][C]20.4206[/C][C]0.4379[/C][C]0[/C][C]0.8854[/C][C]0.8854[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34318&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34318&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[73])
6116.2-------
6219.5-------
6319.9-------
6420-------
6517.3-------
6618.9-------
6718.6-------
6821.4-------
6918.6-------
7019.8-------
7120.8-------
7219.6-------
7317.7-------
7419.820.818119.480622.15570.067910.97331
7522.221.201819.861922.54170.07210.97980.97161
7620.721.140119.719322.56080.27190.07180.94211
7717.918.984917.541720.42810.07030.00990.98890.9595
7821.219.940518.458621.42240.04790.99650.91560.9985
7921.419.869318.357121.38150.02360.04230.950.9975
8021.722.602821.058624.14690.12590.93660.93661
8123.220.112918.538821.68691e-040.02410.97020.9987
8221.520.905719.302322.50910.23380.00250.91171
8322.921.969620.337823.60130.13190.71360.921
8423.220.459918.800622.11926e-040.0020.84510.9994
8518.618.734517.048520.42060.437900.88540.8854







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
740.0328-0.04890.00411.03660.08640.2939
750.03220.04710.00390.99640.0830.2882
760.0343-0.02080.00170.19370.01610.127
770.0388-0.05710.00481.17710.09810.3132
780.03790.06320.00531.58630.13220.3636
790.03880.0770.00642.3430.19520.4419
800.0349-0.03990.00330.8150.06790.2606
810.03990.15350.01289.53040.79420.8912
820.03910.02840.00240.35320.02940.1716
830.03790.04240.00350.86570.07210.2686
840.04140.13390.01127.50810.62570.791
850.0459-0.00726e-040.01810.00150.0388

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
74 & 0.0328 & -0.0489 & 0.0041 & 1.0366 & 0.0864 & 0.2939 \tabularnewline
75 & 0.0322 & 0.0471 & 0.0039 & 0.9964 & 0.083 & 0.2882 \tabularnewline
76 & 0.0343 & -0.0208 & 0.0017 & 0.1937 & 0.0161 & 0.127 \tabularnewline
77 & 0.0388 & -0.0571 & 0.0048 & 1.1771 & 0.0981 & 0.3132 \tabularnewline
78 & 0.0379 & 0.0632 & 0.0053 & 1.5863 & 0.1322 & 0.3636 \tabularnewline
79 & 0.0388 & 0.077 & 0.0064 & 2.343 & 0.1952 & 0.4419 \tabularnewline
80 & 0.0349 & -0.0399 & 0.0033 & 0.815 & 0.0679 & 0.2606 \tabularnewline
81 & 0.0399 & 0.1535 & 0.0128 & 9.5304 & 0.7942 & 0.8912 \tabularnewline
82 & 0.0391 & 0.0284 & 0.0024 & 0.3532 & 0.0294 & 0.1716 \tabularnewline
83 & 0.0379 & 0.0424 & 0.0035 & 0.8657 & 0.0721 & 0.2686 \tabularnewline
84 & 0.0414 & 0.1339 & 0.0112 & 7.5081 & 0.6257 & 0.791 \tabularnewline
85 & 0.0459 & -0.0072 & 6e-04 & 0.0181 & 0.0015 & 0.0388 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34318&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]74[/C][C]0.0328[/C][C]-0.0489[/C][C]0.0041[/C][C]1.0366[/C][C]0.0864[/C][C]0.2939[/C][/ROW]
[ROW][C]75[/C][C]0.0322[/C][C]0.0471[/C][C]0.0039[/C][C]0.9964[/C][C]0.083[/C][C]0.2882[/C][/ROW]
[ROW][C]76[/C][C]0.0343[/C][C]-0.0208[/C][C]0.0017[/C][C]0.1937[/C][C]0.0161[/C][C]0.127[/C][/ROW]
[ROW][C]77[/C][C]0.0388[/C][C]-0.0571[/C][C]0.0048[/C][C]1.1771[/C][C]0.0981[/C][C]0.3132[/C][/ROW]
[ROW][C]78[/C][C]0.0379[/C][C]0.0632[/C][C]0.0053[/C][C]1.5863[/C][C]0.1322[/C][C]0.3636[/C][/ROW]
[ROW][C]79[/C][C]0.0388[/C][C]0.077[/C][C]0.0064[/C][C]2.343[/C][C]0.1952[/C][C]0.4419[/C][/ROW]
[ROW][C]80[/C][C]0.0349[/C][C]-0.0399[/C][C]0.0033[/C][C]0.815[/C][C]0.0679[/C][C]0.2606[/C][/ROW]
[ROW][C]81[/C][C]0.0399[/C][C]0.1535[/C][C]0.0128[/C][C]9.5304[/C][C]0.7942[/C][C]0.8912[/C][/ROW]
[ROW][C]82[/C][C]0.0391[/C][C]0.0284[/C][C]0.0024[/C][C]0.3532[/C][C]0.0294[/C][C]0.1716[/C][/ROW]
[ROW][C]83[/C][C]0.0379[/C][C]0.0424[/C][C]0.0035[/C][C]0.8657[/C][C]0.0721[/C][C]0.2686[/C][/ROW]
[ROW][C]84[/C][C]0.0414[/C][C]0.1339[/C][C]0.0112[/C][C]7.5081[/C][C]0.6257[/C][C]0.791[/C][/ROW]
[ROW][C]85[/C][C]0.0459[/C][C]-0.0072[/C][C]6e-04[/C][C]0.0181[/C][C]0.0015[/C][C]0.0388[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34318&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34318&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
740.0328-0.04890.00411.03660.08640.2939
750.03220.04710.00390.99640.0830.2882
760.0343-0.02080.00170.19370.01610.127
770.0388-0.05710.00481.17710.09810.3132
780.03790.06320.00531.58630.13220.3636
790.03880.0770.00642.3430.19520.4419
800.0349-0.03990.00330.8150.06790.2606
810.03990.15350.01289.53040.79420.8912
820.03910.02840.00240.35320.02940.1716
830.03790.04240.00350.86570.07210.2686
840.04140.13390.01127.50810.62570.791
850.0459-0.00726e-040.01810.00150.0388



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