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 computationFri, 03 Dec 2010 08:17:31 +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/03/t1291364151wz76itd7e9c40jw.htm/, Retrieved Tue, 07 May 2024 21:09:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=104532, Retrieved Tue, 07 May 2024 21:09:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact173
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [Univariate Data Series] [Identifying Integ...] [2009-11-22 12:08:06] [b98453cac15ba1066b407e146608df68]
- RMP         [Standard Deviation-Mean Plot] [Births] [2010-11-29 10:52:49] [b98453cac15ba1066b407e146608df68]
- RMP           [ARIMA Forecasting] [Births] [2010-11-29 20:53:49] [b98453cac15ba1066b407e146608df68]
-   PD            [ARIMA Forecasting] [ARIMA forecasting] [2010-12-03 07:18:57] [717f3d787904f94c39256c5c1fc72d4c]
-   PD                [ARIMA Forecasting] [ARIMA forecasting] [2010-12-03 08:17:31] [c1f1b5e209adb4577289f490325e36f2] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.6923
0.6886
0.6855
0.6745
0.6769
0.6758
0.6896
0.6843
0.6818
0.6774
0.6821
0.6885
0.6829
0.6796
0.6976
0.6924
0.6849
0.6921
0.6839
0.6727
0.6776
0.6692
0.6738
0.6740
0.6635
0.6737
0.6788
0.6828
0.6795
0.6740
0.6744
0.6764
0.6987
0.6967
0.7116
0.7357
0.7455
0.7639
0.7958
0.7864
0.7853
0.7903
0.7866
0.8039
0.7916
0.7903
0.8242
0.9567
0.8850
0.8865
0.9258
0.8948
0.8762
0.8527
0.8536
0.8805
0.9155
0.8961
0.9127
0.8857




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104532&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104532&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104532&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 time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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])
370.7455-------
380.7639-------
390.7958-------
400.7864-------
410.7853-------
420.7903-------
430.7866-------
440.8039-------
450.7916-------
460.7903-------
470.8242-------
480.9567-------
490.885-------
500.88650.89880.85160.9460.3050.716410.7164
510.92580.89610.83550.95680.16890.62220.99940.6404
520.89480.89660.8240.96920.48020.21560.99850.6233
530.87620.89650.81390.97920.31480.51650.99580.6078
540.85270.89660.80490.98820.17420.66840.98850.5976
550.85360.89660.79670.99640.19950.80540.98460.5898
560.88050.89660.78911.0040.38470.78350.95460.5835
570.91550.89660.78211.0110.37290.60830.96380.5784
580.89610.89660.77541.01770.4970.37960.95720.5742
590.91270.89660.76911.0240.4020.50280.86710.5706
600.88570.89660.76311.030.43660.40630.18850.5674

\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 & 0.7455 & - & - & - & - & - & - & - \tabularnewline
38 & 0.7639 & - & - & - & - & - & - & - \tabularnewline
39 & 0.7958 & - & - & - & - & - & - & - \tabularnewline
40 & 0.7864 & - & - & - & - & - & - & - \tabularnewline
41 & 0.7853 & - & - & - & - & - & - & - \tabularnewline
42 & 0.7903 & - & - & - & - & - & - & - \tabularnewline
43 & 0.7866 & - & - & - & - & - & - & - \tabularnewline
44 & 0.8039 & - & - & - & - & - & - & - \tabularnewline
45 & 0.7916 & - & - & - & - & - & - & - \tabularnewline
46 & 0.7903 & - & - & - & - & - & - & - \tabularnewline
47 & 0.8242 & - & - & - & - & - & - & - \tabularnewline
48 & 0.9567 & - & - & - & - & - & - & - \tabularnewline
49 & 0.885 & - & - & - & - & - & - & - \tabularnewline
50 & 0.8865 & 0.8988 & 0.8516 & 0.946 & 0.305 & 0.7164 & 1 & 0.7164 \tabularnewline
51 & 0.9258 & 0.8961 & 0.8355 & 0.9568 & 0.1689 & 0.6222 & 0.9994 & 0.6404 \tabularnewline
52 & 0.8948 & 0.8966 & 0.824 & 0.9692 & 0.4802 & 0.2156 & 0.9985 & 0.6233 \tabularnewline
53 & 0.8762 & 0.8965 & 0.8139 & 0.9792 & 0.3148 & 0.5165 & 0.9958 & 0.6078 \tabularnewline
54 & 0.8527 & 0.8966 & 0.8049 & 0.9882 & 0.1742 & 0.6684 & 0.9885 & 0.5976 \tabularnewline
55 & 0.8536 & 0.8966 & 0.7967 & 0.9964 & 0.1995 & 0.8054 & 0.9846 & 0.5898 \tabularnewline
56 & 0.8805 & 0.8966 & 0.7891 & 1.004 & 0.3847 & 0.7835 & 0.9546 & 0.5835 \tabularnewline
57 & 0.9155 & 0.8966 & 0.7821 & 1.011 & 0.3729 & 0.6083 & 0.9638 & 0.5784 \tabularnewline
58 & 0.8961 & 0.8966 & 0.7754 & 1.0177 & 0.497 & 0.3796 & 0.9572 & 0.5742 \tabularnewline
59 & 0.9127 & 0.8966 & 0.7691 & 1.024 & 0.402 & 0.5028 & 0.8671 & 0.5706 \tabularnewline
60 & 0.8857 & 0.8966 & 0.7631 & 1.03 & 0.4366 & 0.4063 & 0.1885 & 0.5674 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104532&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]0.7455[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]0.7639[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]0.7958[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]0.7864[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]0.7853[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]0.7903[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]0.7866[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]0.8039[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]0.7916[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]0.7903[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]0.8242[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]0.9567[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]0.885[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]0.8865[/C][C]0.8988[/C][C]0.8516[/C][C]0.946[/C][C]0.305[/C][C]0.7164[/C][C]1[/C][C]0.7164[/C][/ROW]
[ROW][C]51[/C][C]0.9258[/C][C]0.8961[/C][C]0.8355[/C][C]0.9568[/C][C]0.1689[/C][C]0.6222[/C][C]0.9994[/C][C]0.6404[/C][/ROW]
[ROW][C]52[/C][C]0.8948[/C][C]0.8966[/C][C]0.824[/C][C]0.9692[/C][C]0.4802[/C][C]0.2156[/C][C]0.9985[/C][C]0.6233[/C][/ROW]
[ROW][C]53[/C][C]0.8762[/C][C]0.8965[/C][C]0.8139[/C][C]0.9792[/C][C]0.3148[/C][C]0.5165[/C][C]0.9958[/C][C]0.6078[/C][/ROW]
[ROW][C]54[/C][C]0.8527[/C][C]0.8966[/C][C]0.8049[/C][C]0.9882[/C][C]0.1742[/C][C]0.6684[/C][C]0.9885[/C][C]0.5976[/C][/ROW]
[ROW][C]55[/C][C]0.8536[/C][C]0.8966[/C][C]0.7967[/C][C]0.9964[/C][C]0.1995[/C][C]0.8054[/C][C]0.9846[/C][C]0.5898[/C][/ROW]
[ROW][C]56[/C][C]0.8805[/C][C]0.8966[/C][C]0.7891[/C][C]1.004[/C][C]0.3847[/C][C]0.7835[/C][C]0.9546[/C][C]0.5835[/C][/ROW]
[ROW][C]57[/C][C]0.9155[/C][C]0.8966[/C][C]0.7821[/C][C]1.011[/C][C]0.3729[/C][C]0.6083[/C][C]0.9638[/C][C]0.5784[/C][/ROW]
[ROW][C]58[/C][C]0.8961[/C][C]0.8966[/C][C]0.7754[/C][C]1.0177[/C][C]0.497[/C][C]0.3796[/C][C]0.9572[/C][C]0.5742[/C][/ROW]
[ROW][C]59[/C][C]0.9127[/C][C]0.8966[/C][C]0.7691[/C][C]1.024[/C][C]0.402[/C][C]0.5028[/C][C]0.8671[/C][C]0.5706[/C][/ROW]
[ROW][C]60[/C][C]0.8857[/C][C]0.8966[/C][C]0.7631[/C][C]1.03[/C][C]0.4366[/C][C]0.4063[/C][C]0.1885[/C][C]0.5674[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104532&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104532&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])
370.7455-------
380.7639-------
390.7958-------
400.7864-------
410.7853-------
420.7903-------
430.7866-------
440.8039-------
450.7916-------
460.7903-------
470.8242-------
480.9567-------
490.885-------
500.88650.89880.85160.9460.3050.716410.7164
510.92580.89610.83550.95680.16890.62220.99940.6404
520.89480.89660.8240.96920.48020.21560.99850.6233
530.87620.89650.81390.97920.31480.51650.99580.6078
540.85270.89660.80490.98820.17420.66840.98850.5976
550.85360.89660.79670.99640.19950.80540.98460.5898
560.88050.89660.78911.0040.38470.78350.95460.5835
570.91550.89660.78211.0110.37290.60830.96380.5784
580.89610.89660.77541.01770.4970.37960.95720.5742
590.91270.89660.76911.0240.4020.50280.86710.5706
600.88570.89660.76311.030.43660.40630.18850.5674







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0268-0.013702e-0400
510.03450.03310.02349e-045e-040.0227
520.0413-0.00210.016303e-040.0186
530.047-0.02270.01794e-044e-040.019
540.0522-0.04890.02410.00197e-040.026
550.0568-0.04790.02810.00189e-040.0295
560.0611-0.01790.02663e-048e-040.028
570.06510.02110.02594e-047e-040.027
580.0689-5e-040.023106e-040.0255
590.07250.0180.02263e-046e-040.0247
600.0759-0.01210.02161e-046e-040.0238

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0268 & -0.0137 & 0 & 2e-04 & 0 & 0 \tabularnewline
51 & 0.0345 & 0.0331 & 0.0234 & 9e-04 & 5e-04 & 0.0227 \tabularnewline
52 & 0.0413 & -0.0021 & 0.0163 & 0 & 3e-04 & 0.0186 \tabularnewline
53 & 0.047 & -0.0227 & 0.0179 & 4e-04 & 4e-04 & 0.019 \tabularnewline
54 & 0.0522 & -0.0489 & 0.0241 & 0.0019 & 7e-04 & 0.026 \tabularnewline
55 & 0.0568 & -0.0479 & 0.0281 & 0.0018 & 9e-04 & 0.0295 \tabularnewline
56 & 0.0611 & -0.0179 & 0.0266 & 3e-04 & 8e-04 & 0.028 \tabularnewline
57 & 0.0651 & 0.0211 & 0.0259 & 4e-04 & 7e-04 & 0.027 \tabularnewline
58 & 0.0689 & -5e-04 & 0.0231 & 0 & 6e-04 & 0.0255 \tabularnewline
59 & 0.0725 & 0.018 & 0.0226 & 3e-04 & 6e-04 & 0.0247 \tabularnewline
60 & 0.0759 & -0.0121 & 0.0216 & 1e-04 & 6e-04 & 0.0238 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104532&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.0268[/C][C]-0.0137[/C][C]0[/C][C]2e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.0345[/C][C]0.0331[/C][C]0.0234[/C][C]9e-04[/C][C]5e-04[/C][C]0.0227[/C][/ROW]
[ROW][C]52[/C][C]0.0413[/C][C]-0.0021[/C][C]0.0163[/C][C]0[/C][C]3e-04[/C][C]0.0186[/C][/ROW]
[ROW][C]53[/C][C]0.047[/C][C]-0.0227[/C][C]0.0179[/C][C]4e-04[/C][C]4e-04[/C][C]0.019[/C][/ROW]
[ROW][C]54[/C][C]0.0522[/C][C]-0.0489[/C][C]0.0241[/C][C]0.0019[/C][C]7e-04[/C][C]0.026[/C][/ROW]
[ROW][C]55[/C][C]0.0568[/C][C]-0.0479[/C][C]0.0281[/C][C]0.0018[/C][C]9e-04[/C][C]0.0295[/C][/ROW]
[ROW][C]56[/C][C]0.0611[/C][C]-0.0179[/C][C]0.0266[/C][C]3e-04[/C][C]8e-04[/C][C]0.028[/C][/ROW]
[ROW][C]57[/C][C]0.0651[/C][C]0.0211[/C][C]0.0259[/C][C]4e-04[/C][C]7e-04[/C][C]0.027[/C][/ROW]
[ROW][C]58[/C][C]0.0689[/C][C]-5e-04[/C][C]0.0231[/C][C]0[/C][C]6e-04[/C][C]0.0255[/C][/ROW]
[ROW][C]59[/C][C]0.0725[/C][C]0.018[/C][C]0.0226[/C][C]3e-04[/C][C]6e-04[/C][C]0.0247[/C][/ROW]
[ROW][C]60[/C][C]0.0759[/C][C]-0.0121[/C][C]0.0216[/C][C]1e-04[/C][C]6e-04[/C][C]0.0238[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104532&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104532&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.0268-0.013702e-0400
510.03450.03310.02349e-045e-040.0227
520.0413-0.00210.016303e-040.0186
530.047-0.02270.01794e-044e-040.019
540.0522-0.04890.02410.00197e-040.026
550.0568-0.04790.02810.00189e-040.0295
560.0611-0.01790.02663e-048e-040.028
570.06510.02110.02594e-047e-040.027
580.0689-5e-040.023106e-040.0255
590.07250.0180.02263e-046e-040.0247
600.0759-0.01210.02161e-046e-040.0238



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