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, 29 Dec 2010 19:15:17 +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/29/t12936500468kgpg542ic00gne.htm/, Retrieved Fri, 03 May 2024 05:50:32 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=117052, Retrieved Fri, 03 May 2024 05:50:32 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact127
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] [Paper - ARIMA for...] [2010-12-21 13:32:32] [8677c3f87cec9201607d40be65aa9670]
-                     [ARIMA Forecasting] [paper (12)] [2010-12-29 19:15:17] [f420459ea4e1f042529d081e77704a0f] [Current]
Feedback Forum

Post a new message
Dataseries X:
9.3
14.2
17.3
23
16.3
18.4
14.2
9.1
5.9
7.2
6.8
8
14.3
14.6
17.5
17.2
17.2
14.1
10.4
6.8
4.1
6.5
6.1
6.3
9.3
16.4
16.1
18
17.6
14
10.5
6.9
2.8
0.7
3.6
6.7
12.5
14.4
16.5
18.7
19.4
15.8
11.3
9.7
2.9
0.1
2.5
6.7
10.3
11.2
17.4
20.5
17
14.2
10.6
6.1




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=117052&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'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[44])
326.9-------
332.8-------
340.7-------
353.6-------
366.7-------
3712.5-------
3814.4-------
3916.5-------
4018.7-------
4119.4-------
4215.8-------
4311.3-------
449.7-------
452.94.8240.82688.82130.17270.00840.83950.0084
460.15.06390.8619.26670.01030.84350.97910.0153
472.55.86651.535310.19760.06380.99550.84750.0414
486.77.13792.725411.55030.42290.98030.57710.1275
4910.311.1986.733615.66250.34670.97590.28380.7446
5011.215.983811.485920.48160.01860.99340.75490.9969
5117.416.619412.121.13890.36750.99060.52070.9987
5220.518.579114.045623.11250.20310.69490.47910.9999
531718.591814.049423.13430.24610.20520.36370.9999
5414.214.947810.399419.49610.37360.18820.35670.9881
5510.610.98736.435215.53940.43380.08330.44640.7103
566.18.20863.65412.76320.18210.15170.26050.2605

\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[44]) \tabularnewline
32 & 6.9 & - & - & - & - & - & - & - \tabularnewline
33 & 2.8 & - & - & - & - & - & - & - \tabularnewline
34 & 0.7 & - & - & - & - & - & - & - \tabularnewline
35 & 3.6 & - & - & - & - & - & - & - \tabularnewline
36 & 6.7 & - & - & - & - & - & - & - \tabularnewline
37 & 12.5 & - & - & - & - & - & - & - \tabularnewline
38 & 14.4 & - & - & - & - & - & - & - \tabularnewline
39 & 16.5 & - & - & - & - & - & - & - \tabularnewline
40 & 18.7 & - & - & - & - & - & - & - \tabularnewline
41 & 19.4 & - & - & - & - & - & - & - \tabularnewline
42 & 15.8 & - & - & - & - & - & - & - \tabularnewline
43 & 11.3 & - & - & - & - & - & - & - \tabularnewline
44 & 9.7 & - & - & - & - & - & - & - \tabularnewline
45 & 2.9 & 4.824 & 0.8268 & 8.8213 & 0.1727 & 0.0084 & 0.8395 & 0.0084 \tabularnewline
46 & 0.1 & 5.0639 & 0.861 & 9.2667 & 0.0103 & 0.8435 & 0.9791 & 0.0153 \tabularnewline
47 & 2.5 & 5.8665 & 1.5353 & 10.1976 & 0.0638 & 0.9955 & 0.8475 & 0.0414 \tabularnewline
48 & 6.7 & 7.1379 & 2.7254 & 11.5503 & 0.4229 & 0.9803 & 0.5771 & 0.1275 \tabularnewline
49 & 10.3 & 11.198 & 6.7336 & 15.6625 & 0.3467 & 0.9759 & 0.2838 & 0.7446 \tabularnewline
50 & 11.2 & 15.9838 & 11.4859 & 20.4816 & 0.0186 & 0.9934 & 0.7549 & 0.9969 \tabularnewline
51 & 17.4 & 16.6194 & 12.1 & 21.1389 & 0.3675 & 0.9906 & 0.5207 & 0.9987 \tabularnewline
52 & 20.5 & 18.5791 & 14.0456 & 23.1125 & 0.2031 & 0.6949 & 0.4791 & 0.9999 \tabularnewline
53 & 17 & 18.5918 & 14.0494 & 23.1343 & 0.2461 & 0.2052 & 0.3637 & 0.9999 \tabularnewline
54 & 14.2 & 14.9478 & 10.3994 & 19.4961 & 0.3736 & 0.1882 & 0.3567 & 0.9881 \tabularnewline
55 & 10.6 & 10.9873 & 6.4352 & 15.5394 & 0.4338 & 0.0833 & 0.4464 & 0.7103 \tabularnewline
56 & 6.1 & 8.2086 & 3.654 & 12.7632 & 0.1821 & 0.1517 & 0.2605 & 0.2605 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=117052&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[44])[/C][/ROW]
[ROW][C]32[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]0.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]3.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]12.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]14.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]16.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]18.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]19.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]15.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]11.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]9.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]2.9[/C][C]4.824[/C][C]0.8268[/C][C]8.8213[/C][C]0.1727[/C][C]0.0084[/C][C]0.8395[/C][C]0.0084[/C][/ROW]
[ROW][C]46[/C][C]0.1[/C][C]5.0639[/C][C]0.861[/C][C]9.2667[/C][C]0.0103[/C][C]0.8435[/C][C]0.9791[/C][C]0.0153[/C][/ROW]
[ROW][C]47[/C][C]2.5[/C][C]5.8665[/C][C]1.5353[/C][C]10.1976[/C][C]0.0638[/C][C]0.9955[/C][C]0.8475[/C][C]0.0414[/C][/ROW]
[ROW][C]48[/C][C]6.7[/C][C]7.1379[/C][C]2.7254[/C][C]11.5503[/C][C]0.4229[/C][C]0.9803[/C][C]0.5771[/C][C]0.1275[/C][/ROW]
[ROW][C]49[/C][C]10.3[/C][C]11.198[/C][C]6.7336[/C][C]15.6625[/C][C]0.3467[/C][C]0.9759[/C][C]0.2838[/C][C]0.7446[/C][/ROW]
[ROW][C]50[/C][C]11.2[/C][C]15.9838[/C][C]11.4859[/C][C]20.4816[/C][C]0.0186[/C][C]0.9934[/C][C]0.7549[/C][C]0.9969[/C][/ROW]
[ROW][C]51[/C][C]17.4[/C][C]16.6194[/C][C]12.1[/C][C]21.1389[/C][C]0.3675[/C][C]0.9906[/C][C]0.5207[/C][C]0.9987[/C][/ROW]
[ROW][C]52[/C][C]20.5[/C][C]18.5791[/C][C]14.0456[/C][C]23.1125[/C][C]0.2031[/C][C]0.6949[/C][C]0.4791[/C][C]0.9999[/C][/ROW]
[ROW][C]53[/C][C]17[/C][C]18.5918[/C][C]14.0494[/C][C]23.1343[/C][C]0.2461[/C][C]0.2052[/C][C]0.3637[/C][C]0.9999[/C][/ROW]
[ROW][C]54[/C][C]14.2[/C][C]14.9478[/C][C]10.3994[/C][C]19.4961[/C][C]0.3736[/C][C]0.1882[/C][C]0.3567[/C][C]0.9881[/C][/ROW]
[ROW][C]55[/C][C]10.6[/C][C]10.9873[/C][C]6.4352[/C][C]15.5394[/C][C]0.4338[/C][C]0.0833[/C][C]0.4464[/C][C]0.7103[/C][/ROW]
[ROW][C]56[/C][C]6.1[/C][C]8.2086[/C][C]3.654[/C][C]12.7632[/C][C]0.1821[/C][C]0.1517[/C][C]0.2605[/C][C]0.2605[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=117052&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=117052&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[44])
326.9-------
332.8-------
340.7-------
353.6-------
366.7-------
3712.5-------
3814.4-------
3916.5-------
4018.7-------
4119.4-------
4215.8-------
4311.3-------
449.7-------
452.94.8240.82688.82130.17270.00840.83950.0084
460.15.06390.8619.26670.01030.84350.97910.0153
472.55.86651.535310.19760.06380.99550.84750.0414
486.77.13792.725411.55030.42290.98030.57710.1275
4910.311.1986.733615.66250.34670.97590.28380.7446
5011.215.983811.485920.48160.01860.99340.75490.9969
5117.416.619412.121.13890.36750.99060.52070.9987
5220.518.579114.045623.11250.20310.69490.47910.9999
531718.591814.049423.13430.24610.20520.36370.9999
5414.214.947810.399419.49610.37360.18820.35670.9881
5510.610.98736.435215.53940.43380.08330.44640.7103
566.18.20863.65412.76320.18210.15170.26050.2605







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
450.4228-0.398803.701900
460.4235-0.98030.689524.639814.17093.7644
470.3767-0.57380.65111.33313.22493.6366
480.3154-0.06130.50360.19179.96663.157
490.2034-0.08020.41890.80658.13462.8521
500.1436-0.29930.39922.884310.59293.2547
510.13870.0470.34870.60939.16663.0276
520.12450.10340.3183.698.48212.9124
530.1247-0.08560.29222.53397.82122.7966
540.1552-0.050.2680.55917.0952.6636
550.2114-0.03520.24680.156.46362.5424
560.2831-0.25690.24774.44626.29552.5091

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
45 & 0.4228 & -0.3988 & 0 & 3.7019 & 0 & 0 \tabularnewline
46 & 0.4235 & -0.9803 & 0.6895 & 24.6398 & 14.1709 & 3.7644 \tabularnewline
47 & 0.3767 & -0.5738 & 0.651 & 11.333 & 13.2249 & 3.6366 \tabularnewline
48 & 0.3154 & -0.0613 & 0.5036 & 0.1917 & 9.9666 & 3.157 \tabularnewline
49 & 0.2034 & -0.0802 & 0.4189 & 0.8065 & 8.1346 & 2.8521 \tabularnewline
50 & 0.1436 & -0.2993 & 0.399 & 22.8843 & 10.5929 & 3.2547 \tabularnewline
51 & 0.1387 & 0.047 & 0.3487 & 0.6093 & 9.1666 & 3.0276 \tabularnewline
52 & 0.1245 & 0.1034 & 0.318 & 3.69 & 8.4821 & 2.9124 \tabularnewline
53 & 0.1247 & -0.0856 & 0.2922 & 2.5339 & 7.8212 & 2.7966 \tabularnewline
54 & 0.1552 & -0.05 & 0.268 & 0.5591 & 7.095 & 2.6636 \tabularnewline
55 & 0.2114 & -0.0352 & 0.2468 & 0.15 & 6.4636 & 2.5424 \tabularnewline
56 & 0.2831 & -0.2569 & 0.2477 & 4.4462 & 6.2955 & 2.5091 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=117052&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]45[/C][C]0.4228[/C][C]-0.3988[/C][C]0[/C][C]3.7019[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]46[/C][C]0.4235[/C][C]-0.9803[/C][C]0.6895[/C][C]24.6398[/C][C]14.1709[/C][C]3.7644[/C][/ROW]
[ROW][C]47[/C][C]0.3767[/C][C]-0.5738[/C][C]0.651[/C][C]11.333[/C][C]13.2249[/C][C]3.6366[/C][/ROW]
[ROW][C]48[/C][C]0.3154[/C][C]-0.0613[/C][C]0.5036[/C][C]0.1917[/C][C]9.9666[/C][C]3.157[/C][/ROW]
[ROW][C]49[/C][C]0.2034[/C][C]-0.0802[/C][C]0.4189[/C][C]0.8065[/C][C]8.1346[/C][C]2.8521[/C][/ROW]
[ROW][C]50[/C][C]0.1436[/C][C]-0.2993[/C][C]0.399[/C][C]22.8843[/C][C]10.5929[/C][C]3.2547[/C][/ROW]
[ROW][C]51[/C][C]0.1387[/C][C]0.047[/C][C]0.3487[/C][C]0.6093[/C][C]9.1666[/C][C]3.0276[/C][/ROW]
[ROW][C]52[/C][C]0.1245[/C][C]0.1034[/C][C]0.318[/C][C]3.69[/C][C]8.4821[/C][C]2.9124[/C][/ROW]
[ROW][C]53[/C][C]0.1247[/C][C]-0.0856[/C][C]0.2922[/C][C]2.5339[/C][C]7.8212[/C][C]2.7966[/C][/ROW]
[ROW][C]54[/C][C]0.1552[/C][C]-0.05[/C][C]0.268[/C][C]0.5591[/C][C]7.095[/C][C]2.6636[/C][/ROW]
[ROW][C]55[/C][C]0.2114[/C][C]-0.0352[/C][C]0.2468[/C][C]0.15[/C][C]6.4636[/C][C]2.5424[/C][/ROW]
[ROW][C]56[/C][C]0.2831[/C][C]-0.2569[/C][C]0.2477[/C][C]4.4462[/C][C]6.2955[/C][C]2.5091[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=117052&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=117052&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
450.4228-0.398803.701900
460.4235-0.98030.689524.639814.17093.7644
470.3767-0.57380.65111.33313.22493.6366
480.3154-0.06130.50360.19179.96663.157
490.2034-0.08020.41890.80658.13462.8521
500.1436-0.29930.39922.884310.59293.2547
510.13870.0470.34870.60939.16663.0276
520.12450.10340.3183.698.48212.9124
530.1247-0.08560.29222.53397.82122.7966
540.1552-0.050.2680.55917.0952.6636
550.2114-0.03520.24680.156.46362.5424
560.2831-0.25690.24774.44626.29552.5091



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')