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 computationMon, 15 Dec 2008 12:16:19 -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/15/t122936866694io3s41ddlimc0.htm/, Retrieved Wed, 15 May 2024 10:28:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33789, Retrieved Wed, 15 May 2024 10:28:59 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact178
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Law of Averages] [Random Walk Simul...] [2008-11-25 18:31:28] [b98453cac15ba1066b407e146608df68]
- RMPD  [Standard Deviation-Mean Plot] [Q5: Standard Devi...] [2008-11-30 15:50:04] [44ec60eb6065a3f81a5f756bd5af1faf]
- RM D    [Variance Reduction Matrix] [VRM: Werkloosheid...] [2008-12-01 10:54:28] [44ec60eb6065a3f81a5f756bd5af1faf]
- RMP       [Spectral Analysis] [Spectraal analyse...] [2008-12-08 19:02:27] [44ec60eb6065a3f81a5f756bd5af1faf]
- RMP         [ARIMA Backward Selection] [Backward Selectio...] [2008-12-08 19:30:50] [44ec60eb6065a3f81a5f756bd5af1faf]
- RMP             [ARIMA Forecasting] [Arima Forecasting] [2008-12-15 19:16:19] [924502d03698cd41cacbcd1327858815] [Current]
Feedback Forum

Post a new message
Dataseries X:
7.8
7.6
7.5
7.6
7.5
7.3
7.6
7.5
7.6
7.9
7.9
8.1
8.2
8
7.5
6.8
6.5
6.6
7.6
8
8
7.7
7.5
7.6
7.7
7.9
7.8
7.5
7.5
7.1
7.5
7.5
7.6
7.7
7.7
7.9
8.1
8.2
8.2
8.1
7.9
7.3
6.9
6.6
6.7
6.9
7
7.1
7.2
7.1
6.9
7
6.8
6.4
6.7
6.7
6.4
6.3
6.2
6.5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 5 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33789&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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33789&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33789&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 time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
367.9-------
378.1-------
388.2-------
398.2-------
408.1-------
417.9-------
427.3-------
436.9-------
446.6-------
456.7-------
466.9-------
477-------
487.1-------
497.27.39527.0097.78130.16090.9332e-040.933
507.17.70477.05998.34950.0330.93750.06610.967
516.97.9227.14218.7020.00510.98060.24240.9806
5277.99317.17348.81270.00880.99550.39910.9836
536.87.91527.0948.73650.00390.98550.51450.9742
546.47.58136.75618.40650.00250.96830.7480.8735
556.77.31226.47528.14920.07580.98370.83280.6904
566.77.09866.25227.94510.1780.8220.87590.4987
576.47.10036.25097.94960.0530.82220.82220.5002
586.37.18216.33298.03130.02090.96450.74250.5752
596.27.24316.3938.09330.00810.98520.71240.6293
606.57.31586.46328.16840.03040.99480.69010.6901

\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 & 7.9 & - & - & - & - & - & - & - \tabularnewline
37 & 8.1 & - & - & - & - & - & - & - \tabularnewline
38 & 8.2 & - & - & - & - & - & - & - \tabularnewline
39 & 8.2 & - & - & - & - & - & - & - \tabularnewline
40 & 8.1 & - & - & - & - & - & - & - \tabularnewline
41 & 7.9 & - & - & - & - & - & - & - \tabularnewline
42 & 7.3 & - & - & - & - & - & - & - \tabularnewline
43 & 6.9 & - & - & - & - & - & - & - \tabularnewline
44 & 6.6 & - & - & - & - & - & - & - \tabularnewline
45 & 6.7 & - & - & - & - & - & - & - \tabularnewline
46 & 6.9 & - & - & - & - & - & - & - \tabularnewline
47 & 7 & - & - & - & - & - & - & - \tabularnewline
48 & 7.1 & - & - & - & - & - & - & - \tabularnewline
49 & 7.2 & 7.3952 & 7.009 & 7.7813 & 0.1609 & 0.933 & 2e-04 & 0.933 \tabularnewline
50 & 7.1 & 7.7047 & 7.0599 & 8.3495 & 0.033 & 0.9375 & 0.0661 & 0.967 \tabularnewline
51 & 6.9 & 7.922 & 7.1421 & 8.702 & 0.0051 & 0.9806 & 0.2424 & 0.9806 \tabularnewline
52 & 7 & 7.9931 & 7.1734 & 8.8127 & 0.0088 & 0.9955 & 0.3991 & 0.9836 \tabularnewline
53 & 6.8 & 7.9152 & 7.094 & 8.7365 & 0.0039 & 0.9855 & 0.5145 & 0.9742 \tabularnewline
54 & 6.4 & 7.5813 & 6.7561 & 8.4065 & 0.0025 & 0.9683 & 0.748 & 0.8735 \tabularnewline
55 & 6.7 & 7.3122 & 6.4752 & 8.1492 & 0.0758 & 0.9837 & 0.8328 & 0.6904 \tabularnewline
56 & 6.7 & 7.0986 & 6.2522 & 7.9451 & 0.178 & 0.822 & 0.8759 & 0.4987 \tabularnewline
57 & 6.4 & 7.1003 & 6.2509 & 7.9496 & 0.053 & 0.8222 & 0.8222 & 0.5002 \tabularnewline
58 & 6.3 & 7.1821 & 6.3329 & 8.0313 & 0.0209 & 0.9645 & 0.7425 & 0.5752 \tabularnewline
59 & 6.2 & 7.2431 & 6.393 & 8.0933 & 0.0081 & 0.9852 & 0.7124 & 0.6293 \tabularnewline
60 & 6.5 & 7.3158 & 6.4632 & 8.1684 & 0.0304 & 0.9948 & 0.6901 & 0.6901 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33789&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]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]8.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]8.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]7.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]6.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]7.2[/C][C]7.3952[/C][C]7.009[/C][C]7.7813[/C][C]0.1609[/C][C]0.933[/C][C]2e-04[/C][C]0.933[/C][/ROW]
[ROW][C]50[/C][C]7.1[/C][C]7.7047[/C][C]7.0599[/C][C]8.3495[/C][C]0.033[/C][C]0.9375[/C][C]0.0661[/C][C]0.967[/C][/ROW]
[ROW][C]51[/C][C]6.9[/C][C]7.922[/C][C]7.1421[/C][C]8.702[/C][C]0.0051[/C][C]0.9806[/C][C]0.2424[/C][C]0.9806[/C][/ROW]
[ROW][C]52[/C][C]7[/C][C]7.9931[/C][C]7.1734[/C][C]8.8127[/C][C]0.0088[/C][C]0.9955[/C][C]0.3991[/C][C]0.9836[/C][/ROW]
[ROW][C]53[/C][C]6.8[/C][C]7.9152[/C][C]7.094[/C][C]8.7365[/C][C]0.0039[/C][C]0.9855[/C][C]0.5145[/C][C]0.9742[/C][/ROW]
[ROW][C]54[/C][C]6.4[/C][C]7.5813[/C][C]6.7561[/C][C]8.4065[/C][C]0.0025[/C][C]0.9683[/C][C]0.748[/C][C]0.8735[/C][/ROW]
[ROW][C]55[/C][C]6.7[/C][C]7.3122[/C][C]6.4752[/C][C]8.1492[/C][C]0.0758[/C][C]0.9837[/C][C]0.8328[/C][C]0.6904[/C][/ROW]
[ROW][C]56[/C][C]6.7[/C][C]7.0986[/C][C]6.2522[/C][C]7.9451[/C][C]0.178[/C][C]0.822[/C][C]0.8759[/C][C]0.4987[/C][/ROW]
[ROW][C]57[/C][C]6.4[/C][C]7.1003[/C][C]6.2509[/C][C]7.9496[/C][C]0.053[/C][C]0.8222[/C][C]0.8222[/C][C]0.5002[/C][/ROW]
[ROW][C]58[/C][C]6.3[/C][C]7.1821[/C][C]6.3329[/C][C]8.0313[/C][C]0.0209[/C][C]0.9645[/C][C]0.7425[/C][C]0.5752[/C][/ROW]
[ROW][C]59[/C][C]6.2[/C][C]7.2431[/C][C]6.393[/C][C]8.0933[/C][C]0.0081[/C][C]0.9852[/C][C]0.7124[/C][C]0.6293[/C][/ROW]
[ROW][C]60[/C][C]6.5[/C][C]7.3158[/C][C]6.4632[/C][C]8.1684[/C][C]0.0304[/C][C]0.9948[/C][C]0.6901[/C][C]0.6901[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33789&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33789&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])
367.9-------
378.1-------
388.2-------
398.2-------
408.1-------
417.9-------
427.3-------
436.9-------
446.6-------
456.7-------
466.9-------
477-------
487.1-------
497.27.39527.0097.78130.16090.9332e-040.933
507.17.70477.05998.34950.0330.93750.06610.967
516.97.9227.14218.7020.00510.98060.24240.9806
5277.99317.17348.81270.00880.99550.39910.9836
536.87.91527.0948.73650.00390.98550.51450.9742
546.47.58136.75618.40650.00250.96830.7480.8735
556.77.31226.47528.14920.07580.98370.83280.6904
566.77.09866.25227.94510.1780.8220.87590.4987
576.47.10036.25097.94960.0530.82220.82220.5002
586.37.18216.33298.03130.02090.96450.74250.5752
596.27.24316.3938.09330.00810.98520.71240.6293
606.57.31586.46328.16840.03040.99480.69010.6901







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0266-0.02640.00220.03810.00320.0563
500.0427-0.07850.00650.36570.03050.1746
510.0502-0.1290.01081.04460.0870.295
520.0523-0.12420.01040.98620.08220.2867
530.0529-0.14090.01171.24380.10360.3219
540.0555-0.15580.0131.39550.11630.341
550.0584-0.08370.0070.37480.03120.1767
560.0608-0.05620.00470.15890.01320.1151
570.061-0.09860.00820.49040.04090.2021
580.0603-0.12280.01020.77810.06480.2546
590.0599-0.1440.0121.08810.09070.3011
600.0595-0.11150.00930.66550.05550.2355

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0266 & -0.0264 & 0.0022 & 0.0381 & 0.0032 & 0.0563 \tabularnewline
50 & 0.0427 & -0.0785 & 0.0065 & 0.3657 & 0.0305 & 0.1746 \tabularnewline
51 & 0.0502 & -0.129 & 0.0108 & 1.0446 & 0.087 & 0.295 \tabularnewline
52 & 0.0523 & -0.1242 & 0.0104 & 0.9862 & 0.0822 & 0.2867 \tabularnewline
53 & 0.0529 & -0.1409 & 0.0117 & 1.2438 & 0.1036 & 0.3219 \tabularnewline
54 & 0.0555 & -0.1558 & 0.013 & 1.3955 & 0.1163 & 0.341 \tabularnewline
55 & 0.0584 & -0.0837 & 0.007 & 0.3748 & 0.0312 & 0.1767 \tabularnewline
56 & 0.0608 & -0.0562 & 0.0047 & 0.1589 & 0.0132 & 0.1151 \tabularnewline
57 & 0.061 & -0.0986 & 0.0082 & 0.4904 & 0.0409 & 0.2021 \tabularnewline
58 & 0.0603 & -0.1228 & 0.0102 & 0.7781 & 0.0648 & 0.2546 \tabularnewline
59 & 0.0599 & -0.144 & 0.012 & 1.0881 & 0.0907 & 0.3011 \tabularnewline
60 & 0.0595 & -0.1115 & 0.0093 & 0.6655 & 0.0555 & 0.2355 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33789&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.0266[/C][C]-0.0264[/C][C]0.0022[/C][C]0.0381[/C][C]0.0032[/C][C]0.0563[/C][/ROW]
[ROW][C]50[/C][C]0.0427[/C][C]-0.0785[/C][C]0.0065[/C][C]0.3657[/C][C]0.0305[/C][C]0.1746[/C][/ROW]
[ROW][C]51[/C][C]0.0502[/C][C]-0.129[/C][C]0.0108[/C][C]1.0446[/C][C]0.087[/C][C]0.295[/C][/ROW]
[ROW][C]52[/C][C]0.0523[/C][C]-0.1242[/C][C]0.0104[/C][C]0.9862[/C][C]0.0822[/C][C]0.2867[/C][/ROW]
[ROW][C]53[/C][C]0.0529[/C][C]-0.1409[/C][C]0.0117[/C][C]1.2438[/C][C]0.1036[/C][C]0.3219[/C][/ROW]
[ROW][C]54[/C][C]0.0555[/C][C]-0.1558[/C][C]0.013[/C][C]1.3955[/C][C]0.1163[/C][C]0.341[/C][/ROW]
[ROW][C]55[/C][C]0.0584[/C][C]-0.0837[/C][C]0.007[/C][C]0.3748[/C][C]0.0312[/C][C]0.1767[/C][/ROW]
[ROW][C]56[/C][C]0.0608[/C][C]-0.0562[/C][C]0.0047[/C][C]0.1589[/C][C]0.0132[/C][C]0.1151[/C][/ROW]
[ROW][C]57[/C][C]0.061[/C][C]-0.0986[/C][C]0.0082[/C][C]0.4904[/C][C]0.0409[/C][C]0.2021[/C][/ROW]
[ROW][C]58[/C][C]0.0603[/C][C]-0.1228[/C][C]0.0102[/C][C]0.7781[/C][C]0.0648[/C][C]0.2546[/C][/ROW]
[ROW][C]59[/C][C]0.0599[/C][C]-0.144[/C][C]0.012[/C][C]1.0881[/C][C]0.0907[/C][C]0.3011[/C][/ROW]
[ROW][C]60[/C][C]0.0595[/C][C]-0.1115[/C][C]0.0093[/C][C]0.6655[/C][C]0.0555[/C][C]0.2355[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33789&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33789&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.0266-0.02640.00220.03810.00320.0563
500.0427-0.07850.00650.36570.03050.1746
510.0502-0.1290.01081.04460.0870.295
520.0523-0.12420.01040.98620.08220.2867
530.0529-0.14090.01171.24380.10360.3219
540.0555-0.15580.0131.39550.11630.341
550.0584-0.08370.0070.37480.03120.1767
560.0608-0.05620.00470.15890.01320.1151
570.061-0.09860.00820.49040.04090.2021
580.0603-0.12280.01020.77810.06480.2546
590.0599-0.1440.0121.08810.09070.3011
600.0595-0.11150.00930.66550.05550.2355



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