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, 08 Dec 2010 15:41:00 +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/08/t1291822765ra0emcbojux68v4.htm/, Retrieved Mon, 29 Apr 2024 00:07:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106961, Retrieved Mon, 29 Apr 2024 00:07:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact141
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       [Standard Deviation-Mean Plot] [Identifying Integ...] [2009-11-22 12:50:05] [b98453cac15ba1066b407e146608df68]
-    D        [Standard Deviation-Mean Plot] [standard deviatio...] [2009-11-24 21:20:13] [8b1aef4e7013bd33fbc2a5833375c5f5]
- R  D          [Standard Deviation-Mean Plot] [paper Fase 2: SDMP 2] [2010-12-07 16:54:09] [814f53995537cd15c528d8efbf1cf544]
- RMP               [ARIMA Forecasting] [Paper ARIMA Forecast] [2010-12-08 15:41:00] [da925928e5a77063c5ecc7b801d712e1] [Current]
Feedback Forum

Post a new message
Dataseries X:
194.9
195.5
196
196.2
196.2
196.2
196.2
197
197.7
198
198.2
198.5
198.6
199.5
200
201.3
202.2
202.9
203.5
203.5
204
204.1
204.3
204.5
204.8
205.1
205.7
206.5
206.9
207.1
207.8
208
208.5
208.6
209
209.1
209.7
209.8
209.9
210
210.8
211.4
211.7
212
212.2
212.4
212.9
213.4
213.7
214
214.3
214.8
215
215.9
216.4
216.9
217.2
217.5
217.9
218.1
218.6
218.9
219.3
220.4
220.9
221
221.8
222
222.2
222.5
222.9
223.1




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106961&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 time14 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[60])
48213.4-------
49213.7-------
50214-------
51214.3-------
52214.8-------
53215-------
54215.9-------
55216.4-------
56216.9-------
57217.2-------
58217.5-------
59217.9-------
60218.1-------
61218.6218.3768217.8417218.91190.20680.844710.8447
62218.9218.8572218.0195219.69490.46010.726310.9618
63219.3219.3702218.2697220.47070.45030.798810.9882
64220.4220.1501218.9117221.38850.34620.910810.9994
65220.9220.6302219.3009221.95960.34540.632910.9999
66221220.9911219.5965222.38570.4950.550911
67221.8221.4793220.0151222.94350.33380.739411
68222221.7767220.2363223.31710.38810.488211
69222.2222.2954220.6715223.91930.45420.639311
70222.5222.4372220.7314224.1430.47120.607411
71222.9222.7172220.9339224.50060.42040.594311
72223.1222.9154221.0621224.76880.42260.506511

\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[60]) \tabularnewline
48 & 213.4 & - & - & - & - & - & - & - \tabularnewline
49 & 213.7 & - & - & - & - & - & - & - \tabularnewline
50 & 214 & - & - & - & - & - & - & - \tabularnewline
51 & 214.3 & - & - & - & - & - & - & - \tabularnewline
52 & 214.8 & - & - & - & - & - & - & - \tabularnewline
53 & 215 & - & - & - & - & - & - & - \tabularnewline
54 & 215.9 & - & - & - & - & - & - & - \tabularnewline
55 & 216.4 & - & - & - & - & - & - & - \tabularnewline
56 & 216.9 & - & - & - & - & - & - & - \tabularnewline
57 & 217.2 & - & - & - & - & - & - & - \tabularnewline
58 & 217.5 & - & - & - & - & - & - & - \tabularnewline
59 & 217.9 & - & - & - & - & - & - & - \tabularnewline
60 & 218.1 & - & - & - & - & - & - & - \tabularnewline
61 & 218.6 & 218.3768 & 217.8417 & 218.9119 & 0.2068 & 0.8447 & 1 & 0.8447 \tabularnewline
62 & 218.9 & 218.8572 & 218.0195 & 219.6949 & 0.4601 & 0.7263 & 1 & 0.9618 \tabularnewline
63 & 219.3 & 219.3702 & 218.2697 & 220.4707 & 0.4503 & 0.7988 & 1 & 0.9882 \tabularnewline
64 & 220.4 & 220.1501 & 218.9117 & 221.3885 & 0.3462 & 0.9108 & 1 & 0.9994 \tabularnewline
65 & 220.9 & 220.6302 & 219.3009 & 221.9596 & 0.3454 & 0.6329 & 1 & 0.9999 \tabularnewline
66 & 221 & 220.9911 & 219.5965 & 222.3857 & 0.495 & 0.5509 & 1 & 1 \tabularnewline
67 & 221.8 & 221.4793 & 220.0151 & 222.9435 & 0.3338 & 0.7394 & 1 & 1 \tabularnewline
68 & 222 & 221.7767 & 220.2363 & 223.3171 & 0.3881 & 0.4882 & 1 & 1 \tabularnewline
69 & 222.2 & 222.2954 & 220.6715 & 223.9193 & 0.4542 & 0.6393 & 1 & 1 \tabularnewline
70 & 222.5 & 222.4372 & 220.7314 & 224.143 & 0.4712 & 0.6074 & 1 & 1 \tabularnewline
71 & 222.9 & 222.7172 & 220.9339 & 224.5006 & 0.4204 & 0.5943 & 1 & 1 \tabularnewline
72 & 223.1 & 222.9154 & 221.0621 & 224.7688 & 0.4226 & 0.5065 & 1 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106961&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[60])[/C][/ROW]
[ROW][C]48[/C][C]213.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]213.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]214[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]214.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]214.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]215[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]215.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]216.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]216.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]217.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]217.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]217.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]218.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]218.6[/C][C]218.3768[/C][C]217.8417[/C][C]218.9119[/C][C]0.2068[/C][C]0.8447[/C][C]1[/C][C]0.8447[/C][/ROW]
[ROW][C]62[/C][C]218.9[/C][C]218.8572[/C][C]218.0195[/C][C]219.6949[/C][C]0.4601[/C][C]0.7263[/C][C]1[/C][C]0.9618[/C][/ROW]
[ROW][C]63[/C][C]219.3[/C][C]219.3702[/C][C]218.2697[/C][C]220.4707[/C][C]0.4503[/C][C]0.7988[/C][C]1[/C][C]0.9882[/C][/ROW]
[ROW][C]64[/C][C]220.4[/C][C]220.1501[/C][C]218.9117[/C][C]221.3885[/C][C]0.3462[/C][C]0.9108[/C][C]1[/C][C]0.9994[/C][/ROW]
[ROW][C]65[/C][C]220.9[/C][C]220.6302[/C][C]219.3009[/C][C]221.9596[/C][C]0.3454[/C][C]0.6329[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]66[/C][C]221[/C][C]220.9911[/C][C]219.5965[/C][C]222.3857[/C][C]0.495[/C][C]0.5509[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]67[/C][C]221.8[/C][C]221.4793[/C][C]220.0151[/C][C]222.9435[/C][C]0.3338[/C][C]0.7394[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]68[/C][C]222[/C][C]221.7767[/C][C]220.2363[/C][C]223.3171[/C][C]0.3881[/C][C]0.4882[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]69[/C][C]222.2[/C][C]222.2954[/C][C]220.6715[/C][C]223.9193[/C][C]0.4542[/C][C]0.6393[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]70[/C][C]222.5[/C][C]222.4372[/C][C]220.7314[/C][C]224.143[/C][C]0.4712[/C][C]0.6074[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]71[/C][C]222.9[/C][C]222.7172[/C][C]220.9339[/C][C]224.5006[/C][C]0.4204[/C][C]0.5943[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]72[/C][C]223.1[/C][C]222.9154[/C][C]221.0621[/C][C]224.7688[/C][C]0.4226[/C][C]0.5065[/C][C]1[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106961&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106961&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[60])
48213.4-------
49213.7-------
50214-------
51214.3-------
52214.8-------
53215-------
54215.9-------
55216.4-------
56216.9-------
57217.2-------
58217.5-------
59217.9-------
60218.1-------
61218.6218.3768217.8417218.91190.20680.844710.8447
62218.9218.8572218.0195219.69490.46010.726310.9618
63219.3219.3702218.2697220.47070.45030.798810.9882
64220.4220.1501218.9117221.38850.34620.910810.9994
65220.9220.6302219.3009221.95960.34540.632910.9999
66221220.9911219.5965222.38570.4950.550911
67221.8221.4793220.0151222.94350.33380.739411
68222221.7767220.2363223.31710.38810.488211
69222.2222.2954220.6715223.91930.45420.639311
70222.5222.4372220.7314224.1430.47120.607411
71222.9222.7172220.9339224.50060.42040.594311
72223.1222.9154221.0621224.76880.42260.506511







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.00130.00100.049800
620.0022e-046e-040.00180.02580.1607
630.0026-3e-045e-040.00490.01890.1373
640.00290.00117e-040.06240.02980.1725
650.00310.00128e-040.07280.03840.1959
660.003207e-041e-040.0320.1788
670.00340.00148e-040.10290.04210.2052
680.00350.0018e-040.04990.04310.2075
690.0037-4e-048e-040.00910.03930.1982
700.00393e-047e-040.00390.03580.1891
710.00418e-047e-040.03340.03560.1886
720.00428e-047e-040.03410.03540.1882

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0013 & 0.001 & 0 & 0.0498 & 0 & 0 \tabularnewline
62 & 0.002 & 2e-04 & 6e-04 & 0.0018 & 0.0258 & 0.1607 \tabularnewline
63 & 0.0026 & -3e-04 & 5e-04 & 0.0049 & 0.0189 & 0.1373 \tabularnewline
64 & 0.0029 & 0.0011 & 7e-04 & 0.0624 & 0.0298 & 0.1725 \tabularnewline
65 & 0.0031 & 0.0012 & 8e-04 & 0.0728 & 0.0384 & 0.1959 \tabularnewline
66 & 0.0032 & 0 & 7e-04 & 1e-04 & 0.032 & 0.1788 \tabularnewline
67 & 0.0034 & 0.0014 & 8e-04 & 0.1029 & 0.0421 & 0.2052 \tabularnewline
68 & 0.0035 & 0.001 & 8e-04 & 0.0499 & 0.0431 & 0.2075 \tabularnewline
69 & 0.0037 & -4e-04 & 8e-04 & 0.0091 & 0.0393 & 0.1982 \tabularnewline
70 & 0.0039 & 3e-04 & 7e-04 & 0.0039 & 0.0358 & 0.1891 \tabularnewline
71 & 0.0041 & 8e-04 & 7e-04 & 0.0334 & 0.0356 & 0.1886 \tabularnewline
72 & 0.0042 & 8e-04 & 7e-04 & 0.0341 & 0.0354 & 0.1882 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106961&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]61[/C][C]0.0013[/C][C]0.001[/C][C]0[/C][C]0.0498[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.002[/C][C]2e-04[/C][C]6e-04[/C][C]0.0018[/C][C]0.0258[/C][C]0.1607[/C][/ROW]
[ROW][C]63[/C][C]0.0026[/C][C]-3e-04[/C][C]5e-04[/C][C]0.0049[/C][C]0.0189[/C][C]0.1373[/C][/ROW]
[ROW][C]64[/C][C]0.0029[/C][C]0.0011[/C][C]7e-04[/C][C]0.0624[/C][C]0.0298[/C][C]0.1725[/C][/ROW]
[ROW][C]65[/C][C]0.0031[/C][C]0.0012[/C][C]8e-04[/C][C]0.0728[/C][C]0.0384[/C][C]0.1959[/C][/ROW]
[ROW][C]66[/C][C]0.0032[/C][C]0[/C][C]7e-04[/C][C]1e-04[/C][C]0.032[/C][C]0.1788[/C][/ROW]
[ROW][C]67[/C][C]0.0034[/C][C]0.0014[/C][C]8e-04[/C][C]0.1029[/C][C]0.0421[/C][C]0.2052[/C][/ROW]
[ROW][C]68[/C][C]0.0035[/C][C]0.001[/C][C]8e-04[/C][C]0.0499[/C][C]0.0431[/C][C]0.2075[/C][/ROW]
[ROW][C]69[/C][C]0.0037[/C][C]-4e-04[/C][C]8e-04[/C][C]0.0091[/C][C]0.0393[/C][C]0.1982[/C][/ROW]
[ROW][C]70[/C][C]0.0039[/C][C]3e-04[/C][C]7e-04[/C][C]0.0039[/C][C]0.0358[/C][C]0.1891[/C][/ROW]
[ROW][C]71[/C][C]0.0041[/C][C]8e-04[/C][C]7e-04[/C][C]0.0334[/C][C]0.0356[/C][C]0.1886[/C][/ROW]
[ROW][C]72[/C][C]0.0042[/C][C]8e-04[/C][C]7e-04[/C][C]0.0341[/C][C]0.0354[/C][C]0.1882[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106961&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106961&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
610.00130.00100.049800
620.0022e-046e-040.00180.02580.1607
630.0026-3e-045e-040.00490.01890.1373
640.00290.00117e-040.06240.02980.1725
650.00310.00128e-040.07280.03840.1959
660.003207e-041e-040.0320.1788
670.00340.00148e-040.10290.04210.2052
680.00350.0018e-040.04990.04310.2075
690.0037-4e-048e-040.00910.03930.1982
700.00393e-047e-040.00390.03580.1891
710.00418e-047e-040.03340.03560.1886
720.00428e-047e-040.03410.03540.1882



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