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:10:29 +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/t1291363707f99y0ug5x3ulbuj.htm/, Retrieved Tue, 07 May 2024 08:34:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=104531, Retrieved Tue, 07 May 2024 08:34:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact187
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:10:29] [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'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104531&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104531&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104531&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'George Udny Yule' @ 72.249.76.132







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])
360.7357-------
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.8851.05011.00991.09030111
500.88651.11591.03641.19540111
510.92581.16231.04341.28130110.9996
520.89481.1951.03791.35211e-040.999610.9985
530.87621.21811.02481.41133e-040.999510.996
540.85271.23431.00711.46155e-040.9990.99990.9917
550.85361.24580.98671.50480.00150.99850.99970.9856
560.88051.25380.96491.54280.00570.99670.99890.9781
570.91551.25950.94251.57650.01670.99050.99810.9694
580.89611.26350.92011.6070.0180.97650.99650.9601
590.91271.26640.8981.63480.02990.97560.99070.9503
600.88571.26840.87631.66040.02790.96230.94040.9404

\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 & 0.7357 & - & - & - & - & - & - & - \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 & 1.0501 & 1.0099 & 1.0903 & 0 & 1 & 1 & 1 \tabularnewline
50 & 0.8865 & 1.1159 & 1.0364 & 1.1954 & 0 & 1 & 1 & 1 \tabularnewline
51 & 0.9258 & 1.1623 & 1.0434 & 1.2813 & 0 & 1 & 1 & 0.9996 \tabularnewline
52 & 0.8948 & 1.195 & 1.0379 & 1.3521 & 1e-04 & 0.9996 & 1 & 0.9985 \tabularnewline
53 & 0.8762 & 1.2181 & 1.0248 & 1.4113 & 3e-04 & 0.9995 & 1 & 0.996 \tabularnewline
54 & 0.8527 & 1.2343 & 1.0071 & 1.4615 & 5e-04 & 0.999 & 0.9999 & 0.9917 \tabularnewline
55 & 0.8536 & 1.2458 & 0.9867 & 1.5048 & 0.0015 & 0.9985 & 0.9997 & 0.9856 \tabularnewline
56 & 0.8805 & 1.2538 & 0.9649 & 1.5428 & 0.0057 & 0.9967 & 0.9989 & 0.9781 \tabularnewline
57 & 0.9155 & 1.2595 & 0.9425 & 1.5765 & 0.0167 & 0.9905 & 0.9981 & 0.9694 \tabularnewline
58 & 0.8961 & 1.2635 & 0.9201 & 1.607 & 0.018 & 0.9765 & 0.9965 & 0.9601 \tabularnewline
59 & 0.9127 & 1.2664 & 0.898 & 1.6348 & 0.0299 & 0.9756 & 0.9907 & 0.9503 \tabularnewline
60 & 0.8857 & 1.2684 & 0.8763 & 1.6604 & 0.0279 & 0.9623 & 0.9404 & 0.9404 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104531&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]0.7357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/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]1.0501[/C][C]1.0099[/C][C]1.0903[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]50[/C][C]0.8865[/C][C]1.1159[/C][C]1.0364[/C][C]1.1954[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]51[/C][C]0.9258[/C][C]1.1623[/C][C]1.0434[/C][C]1.2813[/C][C]0[/C][C]1[/C][C]1[/C][C]0.9996[/C][/ROW]
[ROW][C]52[/C][C]0.8948[/C][C]1.195[/C][C]1.0379[/C][C]1.3521[/C][C]1e-04[/C][C]0.9996[/C][C]1[/C][C]0.9985[/C][/ROW]
[ROW][C]53[/C][C]0.8762[/C][C]1.2181[/C][C]1.0248[/C][C]1.4113[/C][C]3e-04[/C][C]0.9995[/C][C]1[/C][C]0.996[/C][/ROW]
[ROW][C]54[/C][C]0.8527[/C][C]1.2343[/C][C]1.0071[/C][C]1.4615[/C][C]5e-04[/C][C]0.999[/C][C]0.9999[/C][C]0.9917[/C][/ROW]
[ROW][C]55[/C][C]0.8536[/C][C]1.2458[/C][C]0.9867[/C][C]1.5048[/C][C]0.0015[/C][C]0.9985[/C][C]0.9997[/C][C]0.9856[/C][/ROW]
[ROW][C]56[/C][C]0.8805[/C][C]1.2538[/C][C]0.9649[/C][C]1.5428[/C][C]0.0057[/C][C]0.9967[/C][C]0.9989[/C][C]0.9781[/C][/ROW]
[ROW][C]57[/C][C]0.9155[/C][C]1.2595[/C][C]0.9425[/C][C]1.5765[/C][C]0.0167[/C][C]0.9905[/C][C]0.9981[/C][C]0.9694[/C][/ROW]
[ROW][C]58[/C][C]0.8961[/C][C]1.2635[/C][C]0.9201[/C][C]1.607[/C][C]0.018[/C][C]0.9765[/C][C]0.9965[/C][C]0.9601[/C][/ROW]
[ROW][C]59[/C][C]0.9127[/C][C]1.2664[/C][C]0.898[/C][C]1.6348[/C][C]0.0299[/C][C]0.9756[/C][C]0.9907[/C][C]0.9503[/C][/ROW]
[ROW][C]60[/C][C]0.8857[/C][C]1.2684[/C][C]0.8763[/C][C]1.6604[/C][C]0.0279[/C][C]0.9623[/C][C]0.9404[/C][C]0.9404[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104531&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104531&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])
360.7357-------
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.8851.05011.00991.09030111
500.88651.11591.03641.19540111
510.92581.16231.04341.28130110.9996
520.89481.1951.03791.35211e-040.999610.9985
530.87621.21811.02481.41133e-040.999510.996
540.85271.23431.00711.46155e-040.9990.99990.9917
550.85361.24580.98671.50480.00150.99850.99970.9856
560.88051.25380.96491.54280.00570.99670.99890.9781
570.91551.25950.94251.57650.01670.99050.99810.9694
580.89611.26350.92011.6070.0180.97650.99650.9601
590.91271.26640.8981.63480.02990.97560.99070.9503
600.88571.26840.87631.66040.02790.96230.94040.9404







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0195-0.157200.027300
500.0363-0.20560.18140.05260.03990.1999
510.0522-0.20350.18880.05590.04530.2128
520.0671-0.25120.20440.09010.05650.2377
530.0809-0.28070.21960.11690.06860.2619
540.0939-0.30920.23460.14560.08140.2853
550.1061-0.31480.2460.15380.09180.3029
560.1176-0.29780.25250.13940.09770.3126
570.1284-0.27310.25480.11840.10.3162
580.1387-0.29080.25840.1350.10350.3217
590.1484-0.27930.26030.12510.10550.3248
600.1577-0.30170.26370.14640.10890.33

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0195 & -0.1572 & 0 & 0.0273 & 0 & 0 \tabularnewline
50 & 0.0363 & -0.2056 & 0.1814 & 0.0526 & 0.0399 & 0.1999 \tabularnewline
51 & 0.0522 & -0.2035 & 0.1888 & 0.0559 & 0.0453 & 0.2128 \tabularnewline
52 & 0.0671 & -0.2512 & 0.2044 & 0.0901 & 0.0565 & 0.2377 \tabularnewline
53 & 0.0809 & -0.2807 & 0.2196 & 0.1169 & 0.0686 & 0.2619 \tabularnewline
54 & 0.0939 & -0.3092 & 0.2346 & 0.1456 & 0.0814 & 0.2853 \tabularnewline
55 & 0.1061 & -0.3148 & 0.246 & 0.1538 & 0.0918 & 0.3029 \tabularnewline
56 & 0.1176 & -0.2978 & 0.2525 & 0.1394 & 0.0977 & 0.3126 \tabularnewline
57 & 0.1284 & -0.2731 & 0.2548 & 0.1184 & 0.1 & 0.3162 \tabularnewline
58 & 0.1387 & -0.2908 & 0.2584 & 0.135 & 0.1035 & 0.3217 \tabularnewline
59 & 0.1484 & -0.2793 & 0.2603 & 0.1251 & 0.1055 & 0.3248 \tabularnewline
60 & 0.1577 & -0.3017 & 0.2637 & 0.1464 & 0.1089 & 0.33 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104531&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.0195[/C][C]-0.1572[/C][C]0[/C][C]0.0273[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0363[/C][C]-0.2056[/C][C]0.1814[/C][C]0.0526[/C][C]0.0399[/C][C]0.1999[/C][/ROW]
[ROW][C]51[/C][C]0.0522[/C][C]-0.2035[/C][C]0.1888[/C][C]0.0559[/C][C]0.0453[/C][C]0.2128[/C][/ROW]
[ROW][C]52[/C][C]0.0671[/C][C]-0.2512[/C][C]0.2044[/C][C]0.0901[/C][C]0.0565[/C][C]0.2377[/C][/ROW]
[ROW][C]53[/C][C]0.0809[/C][C]-0.2807[/C][C]0.2196[/C][C]0.1169[/C][C]0.0686[/C][C]0.2619[/C][/ROW]
[ROW][C]54[/C][C]0.0939[/C][C]-0.3092[/C][C]0.2346[/C][C]0.1456[/C][C]0.0814[/C][C]0.2853[/C][/ROW]
[ROW][C]55[/C][C]0.1061[/C][C]-0.3148[/C][C]0.246[/C][C]0.1538[/C][C]0.0918[/C][C]0.3029[/C][/ROW]
[ROW][C]56[/C][C]0.1176[/C][C]-0.2978[/C][C]0.2525[/C][C]0.1394[/C][C]0.0977[/C][C]0.3126[/C][/ROW]
[ROW][C]57[/C][C]0.1284[/C][C]-0.2731[/C][C]0.2548[/C][C]0.1184[/C][C]0.1[/C][C]0.3162[/C][/ROW]
[ROW][C]58[/C][C]0.1387[/C][C]-0.2908[/C][C]0.2584[/C][C]0.135[/C][C]0.1035[/C][C]0.3217[/C][/ROW]
[ROW][C]59[/C][C]0.1484[/C][C]-0.2793[/C][C]0.2603[/C][C]0.1251[/C][C]0.1055[/C][C]0.3248[/C][/ROW]
[ROW][C]60[/C][C]0.1577[/C][C]-0.3017[/C][C]0.2637[/C][C]0.1464[/C][C]0.1089[/C][C]0.33[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104531&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104531&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.0195-0.157200.027300
500.0363-0.20560.18140.05260.03990.1999
510.0522-0.20350.18880.05590.04530.2128
520.0671-0.25120.20440.09010.05650.2377
530.0809-0.28070.21960.11690.06860.2619
540.0939-0.30920.23460.14560.08140.2853
550.1061-0.31480.2460.15380.09180.3029
560.1176-0.29780.25250.13940.09770.3126
570.1284-0.27310.25480.11840.10.3162
580.1387-0.29080.25840.1350.10350.3217
590.1484-0.27930.26030.12510.10550.3248
600.1577-0.30170.26370.14640.10890.33



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