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, 23 Dec 2009 05:40:08 -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/2009/Dec/23/t1261572098jiz4lmdmkd0rxvc.htm/, Retrieved Mon, 29 Apr 2024 10:01:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=70522, Retrieved Mon, 29 Apr 2024 10:01:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordspaper, voorspelling, inflatie
Estimated Impact151
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [] [2009-12-22 10:45:15] [0750c128064677e728c9436fc3f45ae7]
- RMPD  [Standard Deviation-Mean Plot] [] [2009-12-23 11:52:37] [0750c128064677e728c9436fc3f45ae7]
- RMPD      [ARIMA Forecasting] [] [2009-12-23 12:40:08] [30f5b608e5a1bbbae86b1702c0071566] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.1
1.2
1.1
1.2
1.4
1.5
1.5
1.8
1.6
1.5
1.4
1.4
1.4
1.4
1.5
1.4
1.1
1.1
0.9
0.9
0.9
0.9
1.1
1.3
1
1.1
1.4
1.4
1.3
1.4
1
1.8
1.5
1.5
1.4
1.6
1.6
1.6
1.4
1.7
1.8
1.9
2.2
2.1
2.4
2.6
2.8
2.7
2.6
2.9
2.8
2.2
2.2
2.2
2
2
1.7
1.4
1.3
1.4
1.3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70522&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'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[49])
371.6-------
381.6-------
391.4-------
401.7-------
411.8-------
421.9-------
432.2-------
442.1-------
452.4-------
462.6-------
472.8-------
482.7-------
492.6-------
502.92.6712.18773.20260.19930.603310.6033
512.82.8622.16733.65310.4390.46250.99990.7418
522.22.76271.94113.72890.12690.46980.98440.6293
532.22.63221.72113.73620.22140.77860.93020.5228
542.22.66831.65473.9230.23220.76780.8850.5425
5522.35151.32983.66240.29960.58960.58960.3551
5622.74121.54974.27010.1710.8290.79440.5718
571.72.5191.3184.10580.15580.73930.55850.4602
581.42.45081.20944.1260.10950.81010.43070.4307
591.32.43171.14164.2040.10540.87310.34190.4262
601.42.60071.2054.52660.11090.90720.45970.5003
611.32.50391.09114.49530.1180.86140.46230.4623

\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 & 1.6 & - & - & - & - & - & - & - \tabularnewline
38 & 1.6 & - & - & - & - & - & - & - \tabularnewline
39 & 1.4 & - & - & - & - & - & - & - \tabularnewline
40 & 1.7 & - & - & - & - & - & - & - \tabularnewline
41 & 1.8 & - & - & - & - & - & - & - \tabularnewline
42 & 1.9 & - & - & - & - & - & - & - \tabularnewline
43 & 2.2 & - & - & - & - & - & - & - \tabularnewline
44 & 2.1 & - & - & - & - & - & - & - \tabularnewline
45 & 2.4 & - & - & - & - & - & - & - \tabularnewline
46 & 2.6 & - & - & - & - & - & - & - \tabularnewline
47 & 2.8 & - & - & - & - & - & - & - \tabularnewline
48 & 2.7 & - & - & - & - & - & - & - \tabularnewline
49 & 2.6 & - & - & - & - & - & - & - \tabularnewline
50 & 2.9 & 2.671 & 2.1877 & 3.2026 & 0.1993 & 0.6033 & 1 & 0.6033 \tabularnewline
51 & 2.8 & 2.862 & 2.1673 & 3.6531 & 0.439 & 0.4625 & 0.9999 & 0.7418 \tabularnewline
52 & 2.2 & 2.7627 & 1.9411 & 3.7289 & 0.1269 & 0.4698 & 0.9844 & 0.6293 \tabularnewline
53 & 2.2 & 2.6322 & 1.7211 & 3.7362 & 0.2214 & 0.7786 & 0.9302 & 0.5228 \tabularnewline
54 & 2.2 & 2.6683 & 1.6547 & 3.923 & 0.2322 & 0.7678 & 0.885 & 0.5425 \tabularnewline
55 & 2 & 2.3515 & 1.3298 & 3.6624 & 0.2996 & 0.5896 & 0.5896 & 0.3551 \tabularnewline
56 & 2 & 2.7412 & 1.5497 & 4.2701 & 0.171 & 0.829 & 0.7944 & 0.5718 \tabularnewline
57 & 1.7 & 2.519 & 1.318 & 4.1058 & 0.1558 & 0.7393 & 0.5585 & 0.4602 \tabularnewline
58 & 1.4 & 2.4508 & 1.2094 & 4.126 & 0.1095 & 0.8101 & 0.4307 & 0.4307 \tabularnewline
59 & 1.3 & 2.4317 & 1.1416 & 4.204 & 0.1054 & 0.8731 & 0.3419 & 0.4262 \tabularnewline
60 & 1.4 & 2.6007 & 1.205 & 4.5266 & 0.1109 & 0.9072 & 0.4597 & 0.5003 \tabularnewline
61 & 1.3 & 2.5039 & 1.0911 & 4.4953 & 0.118 & 0.8614 & 0.4623 & 0.4623 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70522&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]1.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]2.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]2.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]2.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]2.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]2.9[/C][C]2.671[/C][C]2.1877[/C][C]3.2026[/C][C]0.1993[/C][C]0.6033[/C][C]1[/C][C]0.6033[/C][/ROW]
[ROW][C]51[/C][C]2.8[/C][C]2.862[/C][C]2.1673[/C][C]3.6531[/C][C]0.439[/C][C]0.4625[/C][C]0.9999[/C][C]0.7418[/C][/ROW]
[ROW][C]52[/C][C]2.2[/C][C]2.7627[/C][C]1.9411[/C][C]3.7289[/C][C]0.1269[/C][C]0.4698[/C][C]0.9844[/C][C]0.6293[/C][/ROW]
[ROW][C]53[/C][C]2.2[/C][C]2.6322[/C][C]1.7211[/C][C]3.7362[/C][C]0.2214[/C][C]0.7786[/C][C]0.9302[/C][C]0.5228[/C][/ROW]
[ROW][C]54[/C][C]2.2[/C][C]2.6683[/C][C]1.6547[/C][C]3.923[/C][C]0.2322[/C][C]0.7678[/C][C]0.885[/C][C]0.5425[/C][/ROW]
[ROW][C]55[/C][C]2[/C][C]2.3515[/C][C]1.3298[/C][C]3.6624[/C][C]0.2996[/C][C]0.5896[/C][C]0.5896[/C][C]0.3551[/C][/ROW]
[ROW][C]56[/C][C]2[/C][C]2.7412[/C][C]1.5497[/C][C]4.2701[/C][C]0.171[/C][C]0.829[/C][C]0.7944[/C][C]0.5718[/C][/ROW]
[ROW][C]57[/C][C]1.7[/C][C]2.519[/C][C]1.318[/C][C]4.1058[/C][C]0.1558[/C][C]0.7393[/C][C]0.5585[/C][C]0.4602[/C][/ROW]
[ROW][C]58[/C][C]1.4[/C][C]2.4508[/C][C]1.2094[/C][C]4.126[/C][C]0.1095[/C][C]0.8101[/C][C]0.4307[/C][C]0.4307[/C][/ROW]
[ROW][C]59[/C][C]1.3[/C][C]2.4317[/C][C]1.1416[/C][C]4.204[/C][C]0.1054[/C][C]0.8731[/C][C]0.3419[/C][C]0.4262[/C][/ROW]
[ROW][C]60[/C][C]1.4[/C][C]2.6007[/C][C]1.205[/C][C]4.5266[/C][C]0.1109[/C][C]0.9072[/C][C]0.4597[/C][C]0.5003[/C][/ROW]
[ROW][C]61[/C][C]1.3[/C][C]2.5039[/C][C]1.0911[/C][C]4.4953[/C][C]0.118[/C][C]0.8614[/C][C]0.4623[/C][C]0.4623[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70522&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70522&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])
371.6-------
381.6-------
391.4-------
401.7-------
411.8-------
421.9-------
432.2-------
442.1-------
452.4-------
462.6-------
472.8-------
482.7-------
492.6-------
502.92.6712.18773.20260.19930.603310.6033
512.82.8622.16733.65310.4390.46250.99990.7418
522.22.76271.94113.72890.12690.46980.98440.6293
532.22.63221.72113.73620.22140.77860.93020.5228
542.22.66831.65473.9230.23220.76780.8850.5425
5522.35151.32983.66240.29960.58960.58960.3551
5622.74121.54974.27010.1710.8290.79440.5718
571.72.5191.3184.10580.15580.73930.55850.4602
581.42.45081.20944.1260.10950.81010.43070.4307
591.32.43171.14164.2040.10540.87310.34190.4262
601.42.60071.2054.52660.11090.90720.45970.5003
611.32.50391.09114.49530.1180.86140.46230.4623







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.10150.085700.052400
510.141-0.02170.05370.00380.02810.1677
520.1784-0.20370.10370.31660.12430.3526
530.214-0.16420.11880.18680.13990.3741
540.2399-0.17550.13020.21930.15580.3947
550.2844-0.14950.13340.12350.15040.3878
560.2846-0.27040.15290.54930.20740.4554
570.3214-0.32510.17450.67080.26530.5151
580.3488-0.42880.20271.10410.35850.5988
590.3718-0.46540.2291.28080.45080.6714
600.3778-0.46170.25011.44160.54080.7354
610.4058-0.48080.26941.44950.61660.7852

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.1015 & 0.0857 & 0 & 0.0524 & 0 & 0 \tabularnewline
51 & 0.141 & -0.0217 & 0.0537 & 0.0038 & 0.0281 & 0.1677 \tabularnewline
52 & 0.1784 & -0.2037 & 0.1037 & 0.3166 & 0.1243 & 0.3526 \tabularnewline
53 & 0.214 & -0.1642 & 0.1188 & 0.1868 & 0.1399 & 0.3741 \tabularnewline
54 & 0.2399 & -0.1755 & 0.1302 & 0.2193 & 0.1558 & 0.3947 \tabularnewline
55 & 0.2844 & -0.1495 & 0.1334 & 0.1235 & 0.1504 & 0.3878 \tabularnewline
56 & 0.2846 & -0.2704 & 0.1529 & 0.5493 & 0.2074 & 0.4554 \tabularnewline
57 & 0.3214 & -0.3251 & 0.1745 & 0.6708 & 0.2653 & 0.5151 \tabularnewline
58 & 0.3488 & -0.4288 & 0.2027 & 1.1041 & 0.3585 & 0.5988 \tabularnewline
59 & 0.3718 & -0.4654 & 0.229 & 1.2808 & 0.4508 & 0.6714 \tabularnewline
60 & 0.3778 & -0.4617 & 0.2501 & 1.4416 & 0.5408 & 0.7354 \tabularnewline
61 & 0.4058 & -0.4808 & 0.2694 & 1.4495 & 0.6166 & 0.7852 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70522&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.1015[/C][C]0.0857[/C][C]0[/C][C]0.0524[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.141[/C][C]-0.0217[/C][C]0.0537[/C][C]0.0038[/C][C]0.0281[/C][C]0.1677[/C][/ROW]
[ROW][C]52[/C][C]0.1784[/C][C]-0.2037[/C][C]0.1037[/C][C]0.3166[/C][C]0.1243[/C][C]0.3526[/C][/ROW]
[ROW][C]53[/C][C]0.214[/C][C]-0.1642[/C][C]0.1188[/C][C]0.1868[/C][C]0.1399[/C][C]0.3741[/C][/ROW]
[ROW][C]54[/C][C]0.2399[/C][C]-0.1755[/C][C]0.1302[/C][C]0.2193[/C][C]0.1558[/C][C]0.3947[/C][/ROW]
[ROW][C]55[/C][C]0.2844[/C][C]-0.1495[/C][C]0.1334[/C][C]0.1235[/C][C]0.1504[/C][C]0.3878[/C][/ROW]
[ROW][C]56[/C][C]0.2846[/C][C]-0.2704[/C][C]0.1529[/C][C]0.5493[/C][C]0.2074[/C][C]0.4554[/C][/ROW]
[ROW][C]57[/C][C]0.3214[/C][C]-0.3251[/C][C]0.1745[/C][C]0.6708[/C][C]0.2653[/C][C]0.5151[/C][/ROW]
[ROW][C]58[/C][C]0.3488[/C][C]-0.4288[/C][C]0.2027[/C][C]1.1041[/C][C]0.3585[/C][C]0.5988[/C][/ROW]
[ROW][C]59[/C][C]0.3718[/C][C]-0.4654[/C][C]0.229[/C][C]1.2808[/C][C]0.4508[/C][C]0.6714[/C][/ROW]
[ROW][C]60[/C][C]0.3778[/C][C]-0.4617[/C][C]0.2501[/C][C]1.4416[/C][C]0.5408[/C][C]0.7354[/C][/ROW]
[ROW][C]61[/C][C]0.4058[/C][C]-0.4808[/C][C]0.2694[/C][C]1.4495[/C][C]0.6166[/C][C]0.7852[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70522&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70522&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.10150.085700.052400
510.141-0.02170.05370.00380.02810.1677
520.1784-0.20370.10370.31660.12430.3526
530.214-0.16420.11880.18680.13990.3741
540.2399-0.17550.13020.21930.15580.3947
550.2844-0.14950.13340.12350.15040.3878
560.2846-0.27040.15290.54930.20740.4554
570.3214-0.32510.17450.67080.26530.5151
580.3488-0.42880.20271.10410.35850.5988
590.3718-0.46540.2291.28080.45080.6714
600.3778-0.46170.25011.44160.54080.7354
610.4058-0.48080.26941.44950.61660.7852



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