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:43:23 -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/t12615722648qmaneue0ucq9fo.htm/, Retrieved Mon, 29 Apr 2024 09:59:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=70523, Retrieved Mon, 29 Apr 2024 09:59:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordspaper, voorspelling, levensm
Estimated Impact146
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:43:23] [30f5b608e5a1bbbae86b1702c0071566] [Current]
Feedback Forum

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




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=70523&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=70523&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70523&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.5-------
381.7-------
391.6-------
401.7-------
411.8-------
421.7-------
432.2-------
442.7-------
453-------
462.8-------
472.7-------
482.7-------
492.5-------
5022.33892.03042.64730.01570.152910.1529
511.82.29891.76292.83490.03410.86280.99470.231
521.42.11891.42642.81130.02090.81660.88210.1403
531.52.01891.19942.83830.10730.93060.69970.1249
541.62.11891.18953.04820.13690.90410.81150.2107
551.31.83890.81132.86640.1520.67570.24540.1036
561.11.49890.38172.6160.2420.63640.01750.0395
570.81.25890.05882.45890.22680.60240.00220.0213
581.11.29890.02132.57640.38020.7780.01060.0327
591.31.3389-0.01192.68960.47750.63560.02410.046
601.51.49890.07882.91890.49940.60810.04870.0835
611.81.570.08483.05530.38080.53680.10990.1099

\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.5 & - & - & - & - & - & - & - \tabularnewline
38 & 1.7 & - & - & - & - & - & - & - \tabularnewline
39 & 1.6 & - & - & - & - & - & - & - \tabularnewline
40 & 1.7 & - & - & - & - & - & - & - \tabularnewline
41 & 1.8 & - & - & - & - & - & - & - \tabularnewline
42 & 1.7 & - & - & - & - & - & - & - \tabularnewline
43 & 2.2 & - & - & - & - & - & - & - \tabularnewline
44 & 2.7 & - & - & - & - & - & - & - \tabularnewline
45 & 3 & - & - & - & - & - & - & - \tabularnewline
46 & 2.8 & - & - & - & - & - & - & - \tabularnewline
47 & 2.7 & - & - & - & - & - & - & - \tabularnewline
48 & 2.7 & - & - & - & - & - & - & - \tabularnewline
49 & 2.5 & - & - & - & - & - & - & - \tabularnewline
50 & 2 & 2.3389 & 2.0304 & 2.6473 & 0.0157 & 0.1529 & 1 & 0.1529 \tabularnewline
51 & 1.8 & 2.2989 & 1.7629 & 2.8349 & 0.0341 & 0.8628 & 0.9947 & 0.231 \tabularnewline
52 & 1.4 & 2.1189 & 1.4264 & 2.8113 & 0.0209 & 0.8166 & 0.8821 & 0.1403 \tabularnewline
53 & 1.5 & 2.0189 & 1.1994 & 2.8383 & 0.1073 & 0.9306 & 0.6997 & 0.1249 \tabularnewline
54 & 1.6 & 2.1189 & 1.1895 & 3.0482 & 0.1369 & 0.9041 & 0.8115 & 0.2107 \tabularnewline
55 & 1.3 & 1.8389 & 0.8113 & 2.8664 & 0.152 & 0.6757 & 0.2454 & 0.1036 \tabularnewline
56 & 1.1 & 1.4989 & 0.3817 & 2.616 & 0.242 & 0.6364 & 0.0175 & 0.0395 \tabularnewline
57 & 0.8 & 1.2589 & 0.0588 & 2.4589 & 0.2268 & 0.6024 & 0.0022 & 0.0213 \tabularnewline
58 & 1.1 & 1.2989 & 0.0213 & 2.5764 & 0.3802 & 0.778 & 0.0106 & 0.0327 \tabularnewline
59 & 1.3 & 1.3389 & -0.0119 & 2.6896 & 0.4775 & 0.6356 & 0.0241 & 0.046 \tabularnewline
60 & 1.5 & 1.4989 & 0.0788 & 2.9189 & 0.4994 & 0.6081 & 0.0487 & 0.0835 \tabularnewline
61 & 1.8 & 1.57 & 0.0848 & 3.0553 & 0.3808 & 0.5368 & 0.1099 & 0.1099 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70523&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.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1.6[/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.7[/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.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2.7[/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.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]2[/C][C]2.3389[/C][C]2.0304[/C][C]2.6473[/C][C]0.0157[/C][C]0.1529[/C][C]1[/C][C]0.1529[/C][/ROW]
[ROW][C]51[/C][C]1.8[/C][C]2.2989[/C][C]1.7629[/C][C]2.8349[/C][C]0.0341[/C][C]0.8628[/C][C]0.9947[/C][C]0.231[/C][/ROW]
[ROW][C]52[/C][C]1.4[/C][C]2.1189[/C][C]1.4264[/C][C]2.8113[/C][C]0.0209[/C][C]0.8166[/C][C]0.8821[/C][C]0.1403[/C][/ROW]
[ROW][C]53[/C][C]1.5[/C][C]2.0189[/C][C]1.1994[/C][C]2.8383[/C][C]0.1073[/C][C]0.9306[/C][C]0.6997[/C][C]0.1249[/C][/ROW]
[ROW][C]54[/C][C]1.6[/C][C]2.1189[/C][C]1.1895[/C][C]3.0482[/C][C]0.1369[/C][C]0.9041[/C][C]0.8115[/C][C]0.2107[/C][/ROW]
[ROW][C]55[/C][C]1.3[/C][C]1.8389[/C][C]0.8113[/C][C]2.8664[/C][C]0.152[/C][C]0.6757[/C][C]0.2454[/C][C]0.1036[/C][/ROW]
[ROW][C]56[/C][C]1.1[/C][C]1.4989[/C][C]0.3817[/C][C]2.616[/C][C]0.242[/C][C]0.6364[/C][C]0.0175[/C][C]0.0395[/C][/ROW]
[ROW][C]57[/C][C]0.8[/C][C]1.2589[/C][C]0.0588[/C][C]2.4589[/C][C]0.2268[/C][C]0.6024[/C][C]0.0022[/C][C]0.0213[/C][/ROW]
[ROW][C]58[/C][C]1.1[/C][C]1.2989[/C][C]0.0213[/C][C]2.5764[/C][C]0.3802[/C][C]0.778[/C][C]0.0106[/C][C]0.0327[/C][/ROW]
[ROW][C]59[/C][C]1.3[/C][C]1.3389[/C][C]-0.0119[/C][C]2.6896[/C][C]0.4775[/C][C]0.6356[/C][C]0.0241[/C][C]0.046[/C][/ROW]
[ROW][C]60[/C][C]1.5[/C][C]1.4989[/C][C]0.0788[/C][C]2.9189[/C][C]0.4994[/C][C]0.6081[/C][C]0.0487[/C][C]0.0835[/C][/ROW]
[ROW][C]61[/C][C]1.8[/C][C]1.57[/C][C]0.0848[/C][C]3.0553[/C][C]0.3808[/C][C]0.5368[/C][C]0.1099[/C][C]0.1099[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70523&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70523&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.5-------
381.7-------
391.6-------
401.7-------
411.8-------
421.7-------
432.2-------
442.7-------
453-------
462.8-------
472.7-------
482.7-------
492.5-------
5022.33892.03042.64730.01570.152910.1529
511.82.29891.76292.83490.03410.86280.99470.231
521.42.11891.42642.81130.02090.81660.88210.1403
531.52.01891.19942.83830.10730.93060.69970.1249
541.62.11891.18953.04820.13690.90410.81150.2107
551.31.83890.81132.86640.1520.67570.24540.1036
561.11.49890.38172.6160.2420.63640.01750.0395
570.81.25890.05882.45890.22680.60240.00220.0213
581.11.29890.02132.57640.38020.7780.01060.0327
591.31.3389-0.01192.68960.47750.63560.02410.046
601.51.49890.07882.91890.49940.60810.04870.0835
611.81.570.08483.05530.38080.53680.10990.1099







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0673-0.144900.114800
510.119-0.2170.18090.24890.18180.4264
520.1667-0.33930.23370.51670.29350.5417
530.2071-0.2570.23950.26920.28740.5361
540.2238-0.24490.24060.26920.28380.5327
550.2851-0.2930.24930.29040.28490.5337
560.3803-0.26610.25170.15910.26690.5166
570.4864-0.36450.26580.21050.25990.5098
580.5019-0.15310.25330.03950.23540.4852
590.5147-0.0290.23090.00150.2120.4604
600.48348e-040.2100.19270.439
610.48270.14650.20470.05290.18110.4255

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0673 & -0.1449 & 0 & 0.1148 & 0 & 0 \tabularnewline
51 & 0.119 & -0.217 & 0.1809 & 0.2489 & 0.1818 & 0.4264 \tabularnewline
52 & 0.1667 & -0.3393 & 0.2337 & 0.5167 & 0.2935 & 0.5417 \tabularnewline
53 & 0.2071 & -0.257 & 0.2395 & 0.2692 & 0.2874 & 0.5361 \tabularnewline
54 & 0.2238 & -0.2449 & 0.2406 & 0.2692 & 0.2838 & 0.5327 \tabularnewline
55 & 0.2851 & -0.293 & 0.2493 & 0.2904 & 0.2849 & 0.5337 \tabularnewline
56 & 0.3803 & -0.2661 & 0.2517 & 0.1591 & 0.2669 & 0.5166 \tabularnewline
57 & 0.4864 & -0.3645 & 0.2658 & 0.2105 & 0.2599 & 0.5098 \tabularnewline
58 & 0.5019 & -0.1531 & 0.2533 & 0.0395 & 0.2354 & 0.4852 \tabularnewline
59 & 0.5147 & -0.029 & 0.2309 & 0.0015 & 0.212 & 0.4604 \tabularnewline
60 & 0.4834 & 8e-04 & 0.21 & 0 & 0.1927 & 0.439 \tabularnewline
61 & 0.4827 & 0.1465 & 0.2047 & 0.0529 & 0.1811 & 0.4255 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70523&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.0673[/C][C]-0.1449[/C][C]0[/C][C]0.1148[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.119[/C][C]-0.217[/C][C]0.1809[/C][C]0.2489[/C][C]0.1818[/C][C]0.4264[/C][/ROW]
[ROW][C]52[/C][C]0.1667[/C][C]-0.3393[/C][C]0.2337[/C][C]0.5167[/C][C]0.2935[/C][C]0.5417[/C][/ROW]
[ROW][C]53[/C][C]0.2071[/C][C]-0.257[/C][C]0.2395[/C][C]0.2692[/C][C]0.2874[/C][C]0.5361[/C][/ROW]
[ROW][C]54[/C][C]0.2238[/C][C]-0.2449[/C][C]0.2406[/C][C]0.2692[/C][C]0.2838[/C][C]0.5327[/C][/ROW]
[ROW][C]55[/C][C]0.2851[/C][C]-0.293[/C][C]0.2493[/C][C]0.2904[/C][C]0.2849[/C][C]0.5337[/C][/ROW]
[ROW][C]56[/C][C]0.3803[/C][C]-0.2661[/C][C]0.2517[/C][C]0.1591[/C][C]0.2669[/C][C]0.5166[/C][/ROW]
[ROW][C]57[/C][C]0.4864[/C][C]-0.3645[/C][C]0.2658[/C][C]0.2105[/C][C]0.2599[/C][C]0.5098[/C][/ROW]
[ROW][C]58[/C][C]0.5019[/C][C]-0.1531[/C][C]0.2533[/C][C]0.0395[/C][C]0.2354[/C][C]0.4852[/C][/ROW]
[ROW][C]59[/C][C]0.5147[/C][C]-0.029[/C][C]0.2309[/C][C]0.0015[/C][C]0.212[/C][C]0.4604[/C][/ROW]
[ROW][C]60[/C][C]0.4834[/C][C]8e-04[/C][C]0.21[/C][C]0[/C][C]0.1927[/C][C]0.439[/C][/ROW]
[ROW][C]61[/C][C]0.4827[/C][C]0.1465[/C][C]0.2047[/C][C]0.0529[/C][C]0.1811[/C][C]0.4255[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70523&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70523&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.0673-0.144900.114800
510.119-0.2170.18090.24890.18180.4264
520.1667-0.33930.23370.51670.29350.5417
530.2071-0.2570.23950.26920.28740.5361
540.2238-0.24490.24060.26920.28380.5327
550.2851-0.2930.24930.29040.28490.5337
560.3803-0.26610.25170.15910.26690.5166
570.4864-0.36450.26580.21050.25990.5098
580.5019-0.15310.25330.03950.23540.4852
590.5147-0.0290.23090.00150.2120.4604
600.48348e-040.2100.19270.439
610.48270.14650.20470.05290.18110.4255



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 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; 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')