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, 23 Dec 2008 09:35:37 -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/23/t1230050217kwcr982f9ezlitq.htm/, Retrieved Sun, 19 May 2024 09:21:34 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36349, Retrieved Sun, 19 May 2024 09:21:34 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact122
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-23 16:35:37] [9f72e095d5529918bf5b0810c01bf6ce] [Current]
Feedback Forum

Post a new message
Dataseries X:
98.1
101.1
111.1
93.3
100
108
70.4
75.4
105.5
112.3
102.5
93.5
86.7
95.2
103.8
97
95.5
101
67.5
64
106.7
100.6
101.2
93.1
84.2
85.8
91.8
92.4
80.3
79.7
62.5
57.1
100.8
100.7
86.2
83.2




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 6 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36349&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]6 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36349&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36349&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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[24])
1293.5-------
1386.7-------
1495.2-------
15103.8-------
1697-------
1795.5-------
18101-------
1967.5-------
2064-------
21106.7-------
22100.6-------
23101.2-------
2493.1-------
2584.278.314770.76785.86240.06321e-040.01471e-04
2685.895.002387.1362102.86830.01090.99640.48040.6822
2791.896.990589.5898104.39120.08460.99850.03570.8486
2892.4103.751595.3107112.19240.00420.99720.94150.9933
2980.391.72983.531799.92620.00310.43630.18360.3715
3079.798.917990.0441107.7916010.32280.9006
3162.567.221758.351376.0920.14840.00290.47550
3257.157.240148.89365.58720.48690.10840.05620
33100.8111.5981103.0443120.1520.006710.86911
34100.793.114185.4948100.73350.02550.0240.02710.5014
3586.2105.615497.55113.680800.88390.85840.9988
3683.294.878887.1123102.64540.00160.98570.67330.6733

\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[24]) \tabularnewline
12 & 93.5 & - & - & - & - & - & - & - \tabularnewline
13 & 86.7 & - & - & - & - & - & - & - \tabularnewline
14 & 95.2 & - & - & - & - & - & - & - \tabularnewline
15 & 103.8 & - & - & - & - & - & - & - \tabularnewline
16 & 97 & - & - & - & - & - & - & - \tabularnewline
17 & 95.5 & - & - & - & - & - & - & - \tabularnewline
18 & 101 & - & - & - & - & - & - & - \tabularnewline
19 & 67.5 & - & - & - & - & - & - & - \tabularnewline
20 & 64 & - & - & - & - & - & - & - \tabularnewline
21 & 106.7 & - & - & - & - & - & - & - \tabularnewline
22 & 100.6 & - & - & - & - & - & - & - \tabularnewline
23 & 101.2 & - & - & - & - & - & - & - \tabularnewline
24 & 93.1 & - & - & - & - & - & - & - \tabularnewline
25 & 84.2 & 78.3147 & 70.767 & 85.8624 & 0.0632 & 1e-04 & 0.0147 & 1e-04 \tabularnewline
26 & 85.8 & 95.0023 & 87.1362 & 102.8683 & 0.0109 & 0.9964 & 0.4804 & 0.6822 \tabularnewline
27 & 91.8 & 96.9905 & 89.5898 & 104.3912 & 0.0846 & 0.9985 & 0.0357 & 0.8486 \tabularnewline
28 & 92.4 & 103.7515 & 95.3107 & 112.1924 & 0.0042 & 0.9972 & 0.9415 & 0.9933 \tabularnewline
29 & 80.3 & 91.729 & 83.5317 & 99.9262 & 0.0031 & 0.4363 & 0.1836 & 0.3715 \tabularnewline
30 & 79.7 & 98.9179 & 90.0441 & 107.7916 & 0 & 1 & 0.3228 & 0.9006 \tabularnewline
31 & 62.5 & 67.2217 & 58.3513 & 76.092 & 0.1484 & 0.0029 & 0.4755 & 0 \tabularnewline
32 & 57.1 & 57.2401 & 48.893 & 65.5872 & 0.4869 & 0.1084 & 0.0562 & 0 \tabularnewline
33 & 100.8 & 111.5981 & 103.0443 & 120.152 & 0.0067 & 1 & 0.8691 & 1 \tabularnewline
34 & 100.7 & 93.1141 & 85.4948 & 100.7335 & 0.0255 & 0.024 & 0.0271 & 0.5014 \tabularnewline
35 & 86.2 & 105.6154 & 97.55 & 113.6808 & 0 & 0.8839 & 0.8584 & 0.9988 \tabularnewline
36 & 83.2 & 94.8788 & 87.1123 & 102.6454 & 0.0016 & 0.9857 & 0.6733 & 0.6733 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36349&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[24])[/C][/ROW]
[ROW][C]12[/C][C]93.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]13[/C][C]86.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]14[/C][C]95.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]15[/C][C]103.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]16[/C][C]97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]17[/C][C]95.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]18[/C][C]101[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]19[/C][C]67.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]20[/C][C]64[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]21[/C][C]106.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]22[/C][C]100.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]23[/C][C]101.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]24[/C][C]93.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]84.2[/C][C]78.3147[/C][C]70.767[/C][C]85.8624[/C][C]0.0632[/C][C]1e-04[/C][C]0.0147[/C][C]1e-04[/C][/ROW]
[ROW][C]26[/C][C]85.8[/C][C]95.0023[/C][C]87.1362[/C][C]102.8683[/C][C]0.0109[/C][C]0.9964[/C][C]0.4804[/C][C]0.6822[/C][/ROW]
[ROW][C]27[/C][C]91.8[/C][C]96.9905[/C][C]89.5898[/C][C]104.3912[/C][C]0.0846[/C][C]0.9985[/C][C]0.0357[/C][C]0.8486[/C][/ROW]
[ROW][C]28[/C][C]92.4[/C][C]103.7515[/C][C]95.3107[/C][C]112.1924[/C][C]0.0042[/C][C]0.9972[/C][C]0.9415[/C][C]0.9933[/C][/ROW]
[ROW][C]29[/C][C]80.3[/C][C]91.729[/C][C]83.5317[/C][C]99.9262[/C][C]0.0031[/C][C]0.4363[/C][C]0.1836[/C][C]0.3715[/C][/ROW]
[ROW][C]30[/C][C]79.7[/C][C]98.9179[/C][C]90.0441[/C][C]107.7916[/C][C]0[/C][C]1[/C][C]0.3228[/C][C]0.9006[/C][/ROW]
[ROW][C]31[/C][C]62.5[/C][C]67.2217[/C][C]58.3513[/C][C]76.092[/C][C]0.1484[/C][C]0.0029[/C][C]0.4755[/C][C]0[/C][/ROW]
[ROW][C]32[/C][C]57.1[/C][C]57.2401[/C][C]48.893[/C][C]65.5872[/C][C]0.4869[/C][C]0.1084[/C][C]0.0562[/C][C]0[/C][/ROW]
[ROW][C]33[/C][C]100.8[/C][C]111.5981[/C][C]103.0443[/C][C]120.152[/C][C]0.0067[/C][C]1[/C][C]0.8691[/C][C]1[/C][/ROW]
[ROW][C]34[/C][C]100.7[/C][C]93.1141[/C][C]85.4948[/C][C]100.7335[/C][C]0.0255[/C][C]0.024[/C][C]0.0271[/C][C]0.5014[/C][/ROW]
[ROW][C]35[/C][C]86.2[/C][C]105.6154[/C][C]97.55[/C][C]113.6808[/C][C]0[/C][C]0.8839[/C][C]0.8584[/C][C]0.9988[/C][/ROW]
[ROW][C]36[/C][C]83.2[/C][C]94.8788[/C][C]87.1123[/C][C]102.6454[/C][C]0.0016[/C][C]0.9857[/C][C]0.6733[/C][C]0.6733[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36349&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36349&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[24])
1293.5-------
1386.7-------
1495.2-------
15103.8-------
1697-------
1795.5-------
18101-------
1967.5-------
2064-------
21106.7-------
22100.6-------
23101.2-------
2493.1-------
2584.278.314770.76785.86240.06321e-040.01471e-04
2685.895.002387.1362102.86830.01090.99640.48040.6822
2791.896.990589.5898104.39120.08460.99850.03570.8486
2892.4103.751595.3107112.19240.00420.99720.94150.9933
2980.391.72983.531799.92620.00310.43630.18360.3715
3079.798.917990.0441107.7916010.32280.9006
3162.567.221758.351376.0920.14840.00290.47550
3257.157.240148.89365.58720.48690.10840.05620
33100.8111.5981103.0443120.1520.006710.86911
34100.793.114185.4948100.73350.02550.0240.02710.5014
3586.2105.615497.55113.680800.88390.85840.9988
3683.294.878887.1123102.64540.00160.98570.67330.6733







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
250.04920.07510.006334.63692.88641.6989
260.0422-0.09690.008184.68167.05682.6565
270.0389-0.05350.004526.94092.24511.4984
280.0415-0.10940.0091128.857510.73813.2769
290.0456-0.12460.0104130.62110.88513.2993
300.0458-0.19430.0162369.326730.77725.5477
310.0673-0.07020.005922.2941.85781.363
320.0744-0.00242e-040.01960.00160.0404
330.0391-0.09680.0081116.59989.71663.1172
340.04170.08150.006857.54544.79552.1899
350.039-0.18380.0153376.95831.41325.6047
360.0418-0.12310.0103136.395411.36633.3714

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
25 & 0.0492 & 0.0751 & 0.0063 & 34.6369 & 2.8864 & 1.6989 \tabularnewline
26 & 0.0422 & -0.0969 & 0.0081 & 84.6816 & 7.0568 & 2.6565 \tabularnewline
27 & 0.0389 & -0.0535 & 0.0045 & 26.9409 & 2.2451 & 1.4984 \tabularnewline
28 & 0.0415 & -0.1094 & 0.0091 & 128.8575 & 10.7381 & 3.2769 \tabularnewline
29 & 0.0456 & -0.1246 & 0.0104 & 130.621 & 10.8851 & 3.2993 \tabularnewline
30 & 0.0458 & -0.1943 & 0.0162 & 369.3267 & 30.7772 & 5.5477 \tabularnewline
31 & 0.0673 & -0.0702 & 0.0059 & 22.294 & 1.8578 & 1.363 \tabularnewline
32 & 0.0744 & -0.0024 & 2e-04 & 0.0196 & 0.0016 & 0.0404 \tabularnewline
33 & 0.0391 & -0.0968 & 0.0081 & 116.5998 & 9.7166 & 3.1172 \tabularnewline
34 & 0.0417 & 0.0815 & 0.0068 & 57.5454 & 4.7955 & 2.1899 \tabularnewline
35 & 0.039 & -0.1838 & 0.0153 & 376.958 & 31.4132 & 5.6047 \tabularnewline
36 & 0.0418 & -0.1231 & 0.0103 & 136.3954 & 11.3663 & 3.3714 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36349&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]25[/C][C]0.0492[/C][C]0.0751[/C][C]0.0063[/C][C]34.6369[/C][C]2.8864[/C][C]1.6989[/C][/ROW]
[ROW][C]26[/C][C]0.0422[/C][C]-0.0969[/C][C]0.0081[/C][C]84.6816[/C][C]7.0568[/C][C]2.6565[/C][/ROW]
[ROW][C]27[/C][C]0.0389[/C][C]-0.0535[/C][C]0.0045[/C][C]26.9409[/C][C]2.2451[/C][C]1.4984[/C][/ROW]
[ROW][C]28[/C][C]0.0415[/C][C]-0.1094[/C][C]0.0091[/C][C]128.8575[/C][C]10.7381[/C][C]3.2769[/C][/ROW]
[ROW][C]29[/C][C]0.0456[/C][C]-0.1246[/C][C]0.0104[/C][C]130.621[/C][C]10.8851[/C][C]3.2993[/C][/ROW]
[ROW][C]30[/C][C]0.0458[/C][C]-0.1943[/C][C]0.0162[/C][C]369.3267[/C][C]30.7772[/C][C]5.5477[/C][/ROW]
[ROW][C]31[/C][C]0.0673[/C][C]-0.0702[/C][C]0.0059[/C][C]22.294[/C][C]1.8578[/C][C]1.363[/C][/ROW]
[ROW][C]32[/C][C]0.0744[/C][C]-0.0024[/C][C]2e-04[/C][C]0.0196[/C][C]0.0016[/C][C]0.0404[/C][/ROW]
[ROW][C]33[/C][C]0.0391[/C][C]-0.0968[/C][C]0.0081[/C][C]116.5998[/C][C]9.7166[/C][C]3.1172[/C][/ROW]
[ROW][C]34[/C][C]0.0417[/C][C]0.0815[/C][C]0.0068[/C][C]57.5454[/C][C]4.7955[/C][C]2.1899[/C][/ROW]
[ROW][C]35[/C][C]0.039[/C][C]-0.1838[/C][C]0.0153[/C][C]376.958[/C][C]31.4132[/C][C]5.6047[/C][/ROW]
[ROW][C]36[/C][C]0.0418[/C][C]-0.1231[/C][C]0.0103[/C][C]136.3954[/C][C]11.3663[/C][C]3.3714[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36349&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36349&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
250.04920.07510.006334.63692.88641.6989
260.0422-0.09690.008184.68167.05682.6565
270.0389-0.05350.004526.94092.24511.4984
280.0415-0.10940.0091128.857510.73813.2769
290.0456-0.12460.0104130.62110.88513.2993
300.0458-0.19430.0162369.326730.77725.5477
310.0673-0.07020.005922.2941.85781.363
320.0744-0.00242e-040.01960.00160.0404
330.0391-0.09680.0081116.59989.71663.1172
340.04170.08150.006857.54544.79552.1899
350.039-0.18380.0153376.95831.41325.6047
360.0418-0.12310.0103136.395411.36633.3714



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