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 computationTue, 16 Dec 2008 13:53:18 -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/16/t122946083709dyur5aik101l2.htm/, Retrieved Wed, 15 May 2024 17:44:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34194, Retrieved Wed, 15 May 2024 17:44:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact207
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [paper forecast] [2007-12-14 20:47:44] [22f18fc6a98517db16300404be421f9a]
-   PD  [ARIMA Forecasting] [Forecast mannen] [2008-12-16 20:51:44] [4ddbf81f78ea7c738951638c7e93f6ee]
-    D      [ARIMA Forecasting] [Forecast vrouwen] [2008-12-16 20:53:18] [e8f764b122b426f433a1e1038b457077] [Current]
-    D        [ARIMA Forecasting] [Forecast totaal] [2008-12-16 20:54:52] [4ddbf81f78ea7c738951638c7e93f6ee]
Feedback Forum

Post a new message
Dataseries X:
9,4
9,5
9,1
9
9,3
9,9
9,8
9,4
8,3
8
8,5
10,4
11,1
10,9
9,9
9,2
9,2
9,5
9,6
9,5
9,1
8,9
9
10,1
10,3
10,2
9,6
9,2
9,3
9,4
9,4
9,2
9
9
9
9,8
10
9,9
9,3
9
9
9,1
9,1
9,1
9,2
8,8
8,3
8,4
8,1
7,8
7,9
7,9
8
7,9
7,5
7,2
6,9
6,6
6,7
7,3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34194&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 time1 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])
369.8-------
3710-------
389.9-------
399.3-------
409-------
419-------
429.1-------
439.1-------
449.1-------
459.2-------
468.8-------
478.3-------
488.4-------
498.18.21427.75528.67320.31290.213800.2138
507.88.13197.13059.13340.25790.52493e-040.2999
517.97.75816.31049.20580.42380.47740.01840.1924
527.97.66075.9259.39640.39350.39350.06520.2019
5387.72835.8219.63550.390.430.09560.245
547.97.78175.75649.8070.45440.41630.1010.2748
557.57.70125.56819.83440.42670.42750.09940.2604
567.27.6515.40039.90170.34720.55230.10350.2571
576.97.74755.368910.12620.24250.67410.11570.2954
586.67.37154.86469.87850.27320.64380.1320.2107
596.76.89594.2699.52290.44190.58740.14740.1309
607.37.00584.26959.74220.41660.58670.1590.159

\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 & 9.8 & - & - & - & - & - & - & - \tabularnewline
37 & 10 & - & - & - & - & - & - & - \tabularnewline
38 & 9.9 & - & - & - & - & - & - & - \tabularnewline
39 & 9.3 & - & - & - & - & - & - & - \tabularnewline
40 & 9 & - & - & - & - & - & - & - \tabularnewline
41 & 9 & - & - & - & - & - & - & - \tabularnewline
42 & 9.1 & - & - & - & - & - & - & - \tabularnewline
43 & 9.1 & - & - & - & - & - & - & - \tabularnewline
44 & 9.1 & - & - & - & - & - & - & - \tabularnewline
45 & 9.2 & - & - & - & - & - & - & - \tabularnewline
46 & 8.8 & - & - & - & - & - & - & - \tabularnewline
47 & 8.3 & - & - & - & - & - & - & - \tabularnewline
48 & 8.4 & - & - & - & - & - & - & - \tabularnewline
49 & 8.1 & 8.2142 & 7.7552 & 8.6732 & 0.3129 & 0.2138 & 0 & 0.2138 \tabularnewline
50 & 7.8 & 8.1319 & 7.1305 & 9.1334 & 0.2579 & 0.5249 & 3e-04 & 0.2999 \tabularnewline
51 & 7.9 & 7.7581 & 6.3104 & 9.2058 & 0.4238 & 0.4774 & 0.0184 & 0.1924 \tabularnewline
52 & 7.9 & 7.6607 & 5.925 & 9.3964 & 0.3935 & 0.3935 & 0.0652 & 0.2019 \tabularnewline
53 & 8 & 7.7283 & 5.821 & 9.6355 & 0.39 & 0.43 & 0.0956 & 0.245 \tabularnewline
54 & 7.9 & 7.7817 & 5.7564 & 9.807 & 0.4544 & 0.4163 & 0.101 & 0.2748 \tabularnewline
55 & 7.5 & 7.7012 & 5.5681 & 9.8344 & 0.4267 & 0.4275 & 0.0994 & 0.2604 \tabularnewline
56 & 7.2 & 7.651 & 5.4003 & 9.9017 & 0.3472 & 0.5523 & 0.1035 & 0.2571 \tabularnewline
57 & 6.9 & 7.7475 & 5.3689 & 10.1262 & 0.2425 & 0.6741 & 0.1157 & 0.2954 \tabularnewline
58 & 6.6 & 7.3715 & 4.8646 & 9.8785 & 0.2732 & 0.6438 & 0.132 & 0.2107 \tabularnewline
59 & 6.7 & 6.8959 & 4.269 & 9.5229 & 0.4419 & 0.5874 & 0.1474 & 0.1309 \tabularnewline
60 & 7.3 & 7.0058 & 4.2695 & 9.7422 & 0.4166 & 0.5867 & 0.159 & 0.159 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34194&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]9.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]10[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]9.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]9.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]9.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]8.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]8.1[/C][C]8.2142[/C][C]7.7552[/C][C]8.6732[/C][C]0.3129[/C][C]0.2138[/C][C]0[/C][C]0.2138[/C][/ROW]
[ROW][C]50[/C][C]7.8[/C][C]8.1319[/C][C]7.1305[/C][C]9.1334[/C][C]0.2579[/C][C]0.5249[/C][C]3e-04[/C][C]0.2999[/C][/ROW]
[ROW][C]51[/C][C]7.9[/C][C]7.7581[/C][C]6.3104[/C][C]9.2058[/C][C]0.4238[/C][C]0.4774[/C][C]0.0184[/C][C]0.1924[/C][/ROW]
[ROW][C]52[/C][C]7.9[/C][C]7.6607[/C][C]5.925[/C][C]9.3964[/C][C]0.3935[/C][C]0.3935[/C][C]0.0652[/C][C]0.2019[/C][/ROW]
[ROW][C]53[/C][C]8[/C][C]7.7283[/C][C]5.821[/C][C]9.6355[/C][C]0.39[/C][C]0.43[/C][C]0.0956[/C][C]0.245[/C][/ROW]
[ROW][C]54[/C][C]7.9[/C][C]7.7817[/C][C]5.7564[/C][C]9.807[/C][C]0.4544[/C][C]0.4163[/C][C]0.101[/C][C]0.2748[/C][/ROW]
[ROW][C]55[/C][C]7.5[/C][C]7.7012[/C][C]5.5681[/C][C]9.8344[/C][C]0.4267[/C][C]0.4275[/C][C]0.0994[/C][C]0.2604[/C][/ROW]
[ROW][C]56[/C][C]7.2[/C][C]7.651[/C][C]5.4003[/C][C]9.9017[/C][C]0.3472[/C][C]0.5523[/C][C]0.1035[/C][C]0.2571[/C][/ROW]
[ROW][C]57[/C][C]6.9[/C][C]7.7475[/C][C]5.3689[/C][C]10.1262[/C][C]0.2425[/C][C]0.6741[/C][C]0.1157[/C][C]0.2954[/C][/ROW]
[ROW][C]58[/C][C]6.6[/C][C]7.3715[/C][C]4.8646[/C][C]9.8785[/C][C]0.2732[/C][C]0.6438[/C][C]0.132[/C][C]0.2107[/C][/ROW]
[ROW][C]59[/C][C]6.7[/C][C]6.8959[/C][C]4.269[/C][C]9.5229[/C][C]0.4419[/C][C]0.5874[/C][C]0.1474[/C][C]0.1309[/C][/ROW]
[ROW][C]60[/C][C]7.3[/C][C]7.0058[/C][C]4.2695[/C][C]9.7422[/C][C]0.4166[/C][C]0.5867[/C][C]0.159[/C][C]0.159[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34194&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34194&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])
369.8-------
3710-------
389.9-------
399.3-------
409-------
419-------
429.1-------
439.1-------
449.1-------
459.2-------
468.8-------
478.3-------
488.4-------
498.18.21427.75528.67320.31290.213800.2138
507.88.13197.13059.13340.25790.52493e-040.2999
517.97.75816.31049.20580.42380.47740.01840.1924
527.97.66075.9259.39640.39350.39350.06520.2019
5387.72835.8219.63550.390.430.09560.245
547.97.78175.75649.8070.45440.41630.1010.2748
557.57.70125.56819.83440.42670.42750.09940.2604
567.27.6515.40039.90170.34720.55230.10350.2571
576.97.74755.368910.12620.24250.67410.11570.2954
586.67.37154.86469.87850.27320.64380.1320.2107
596.76.89594.2699.52290.44190.58740.14740.1309
607.37.00584.26959.74220.41660.58670.1590.159







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0285-0.01390.00120.0130.00110.033
500.0628-0.04080.00340.11020.00920.0958
510.09520.01830.00150.02010.00170.041
520.11560.03120.00260.05730.00480.0691
530.12590.03520.00290.07380.00620.0784
540.13280.01520.00130.0140.00120.0342
550.1413-0.02610.00220.04050.00340.0581
560.1501-0.05890.00490.20340.0170.1302
570.1566-0.10940.00910.71830.05990.2447
580.1735-0.10470.00870.59520.04960.2227
590.1944-0.02840.00240.03840.00320.0566
600.19930.0420.00350.08650.00720.0849

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0285 & -0.0139 & 0.0012 & 0.013 & 0.0011 & 0.033 \tabularnewline
50 & 0.0628 & -0.0408 & 0.0034 & 0.1102 & 0.0092 & 0.0958 \tabularnewline
51 & 0.0952 & 0.0183 & 0.0015 & 0.0201 & 0.0017 & 0.041 \tabularnewline
52 & 0.1156 & 0.0312 & 0.0026 & 0.0573 & 0.0048 & 0.0691 \tabularnewline
53 & 0.1259 & 0.0352 & 0.0029 & 0.0738 & 0.0062 & 0.0784 \tabularnewline
54 & 0.1328 & 0.0152 & 0.0013 & 0.014 & 0.0012 & 0.0342 \tabularnewline
55 & 0.1413 & -0.0261 & 0.0022 & 0.0405 & 0.0034 & 0.0581 \tabularnewline
56 & 0.1501 & -0.0589 & 0.0049 & 0.2034 & 0.017 & 0.1302 \tabularnewline
57 & 0.1566 & -0.1094 & 0.0091 & 0.7183 & 0.0599 & 0.2447 \tabularnewline
58 & 0.1735 & -0.1047 & 0.0087 & 0.5952 & 0.0496 & 0.2227 \tabularnewline
59 & 0.1944 & -0.0284 & 0.0024 & 0.0384 & 0.0032 & 0.0566 \tabularnewline
60 & 0.1993 & 0.042 & 0.0035 & 0.0865 & 0.0072 & 0.0849 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34194&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.0285[/C][C]-0.0139[/C][C]0.0012[/C][C]0.013[/C][C]0.0011[/C][C]0.033[/C][/ROW]
[ROW][C]50[/C][C]0.0628[/C][C]-0.0408[/C][C]0.0034[/C][C]0.1102[/C][C]0.0092[/C][C]0.0958[/C][/ROW]
[ROW][C]51[/C][C]0.0952[/C][C]0.0183[/C][C]0.0015[/C][C]0.0201[/C][C]0.0017[/C][C]0.041[/C][/ROW]
[ROW][C]52[/C][C]0.1156[/C][C]0.0312[/C][C]0.0026[/C][C]0.0573[/C][C]0.0048[/C][C]0.0691[/C][/ROW]
[ROW][C]53[/C][C]0.1259[/C][C]0.0352[/C][C]0.0029[/C][C]0.0738[/C][C]0.0062[/C][C]0.0784[/C][/ROW]
[ROW][C]54[/C][C]0.1328[/C][C]0.0152[/C][C]0.0013[/C][C]0.014[/C][C]0.0012[/C][C]0.0342[/C][/ROW]
[ROW][C]55[/C][C]0.1413[/C][C]-0.0261[/C][C]0.0022[/C][C]0.0405[/C][C]0.0034[/C][C]0.0581[/C][/ROW]
[ROW][C]56[/C][C]0.1501[/C][C]-0.0589[/C][C]0.0049[/C][C]0.2034[/C][C]0.017[/C][C]0.1302[/C][/ROW]
[ROW][C]57[/C][C]0.1566[/C][C]-0.1094[/C][C]0.0091[/C][C]0.7183[/C][C]0.0599[/C][C]0.2447[/C][/ROW]
[ROW][C]58[/C][C]0.1735[/C][C]-0.1047[/C][C]0.0087[/C][C]0.5952[/C][C]0.0496[/C][C]0.2227[/C][/ROW]
[ROW][C]59[/C][C]0.1944[/C][C]-0.0284[/C][C]0.0024[/C][C]0.0384[/C][C]0.0032[/C][C]0.0566[/C][/ROW]
[ROW][C]60[/C][C]0.1993[/C][C]0.042[/C][C]0.0035[/C][C]0.0865[/C][C]0.0072[/C][C]0.0849[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34194&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34194&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.0285-0.01390.00120.0130.00110.033
500.0628-0.04080.00340.11020.00920.0958
510.09520.01830.00150.02010.00170.041
520.11560.03120.00260.05730.00480.0691
530.12590.03520.00290.07380.00620.0784
540.13280.01520.00130.0140.00120.0342
550.1413-0.02610.00220.04050.00340.0581
560.1501-0.05890.00490.20340.0170.1302
570.1566-0.10940.00910.71830.05990.2447
580.1735-0.10470.00870.59520.04960.2227
590.1944-0.02840.00240.03840.00320.0566
600.19930.0420.00350.08650.00720.0849



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