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, 28 Dec 2010 16:42:03 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/28/t129355450903rzv7t2zd8fjsf.htm/, Retrieved Sun, 05 May 2024 06:04:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116418, Retrieved Sun, 05 May 2024 06:04:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact175
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [WS6-ARIMA] [2010-12-14 13:41:12] [fa854ea294f510d944d2dbf77761bfce]
- R     [ARIMA Backward Selection] [WS6-ARIMA] [2010-12-17 19:08:26] [9c3137400ced3280b419f1e434c29e1d]
- RMPD      [ARIMA Forecasting] [ARIMAForecasting] [2010-12-28 16:42:03] [a35bd1e3fb5b4b301d5250bc2f7eb297] [Current]
Feedback Forum

Post a new message
Dataseries X:
5
0
-2
6
11
9
17
21
21
41
57
65
68
73
71
71
70
69
65
57
57
57
55
65
65
64
60
43
47
40
31
27
24
23
17
16




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116418&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 time3 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[24])
1265-------
1368-------
1473-------
1571-------
1671-------
1770-------
1869-------
1965-------
2057-------
2157-------
2257-------
2355-------
2465-------
256569.985257.949282.02120.20850.79150.62680.7915
266472.470350.78794.15370.22190.75020.48090.7502
276073.709243.5047103.91380.18680.73570.56980.714
284374.326936.652112.00170.05160.7720.56870.6862
294774.634730.3571118.91240.11060.91930.58130.6651
304074.788224.5986124.97780.08710.86110.58940.6489
313174.864719.3107130.41880.06090.89070.63610.6361
322774.902914.4223135.38350.06030.92260.71910.6259
332474.92199.87139.97380.06250.92560.70540.6175
342374.93145.601144.26170.0710.9250.69390.6106
351774.93611.5727148.29950.06080.91740.70290.6047
361674.9385-2.2493152.12630.06720.92940.59960.5996

\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 & 65 & - & - & - & - & - & - & - \tabularnewline
13 & 68 & - & - & - & - & - & - & - \tabularnewline
14 & 73 & - & - & - & - & - & - & - \tabularnewline
15 & 71 & - & - & - & - & - & - & - \tabularnewline
16 & 71 & - & - & - & - & - & - & - \tabularnewline
17 & 70 & - & - & - & - & - & - & - \tabularnewline
18 & 69 & - & - & - & - & - & - & - \tabularnewline
19 & 65 & - & - & - & - & - & - & - \tabularnewline
20 & 57 & - & - & - & - & - & - & - \tabularnewline
21 & 57 & - & - & - & - & - & - & - \tabularnewline
22 & 57 & - & - & - & - & - & - & - \tabularnewline
23 & 55 & - & - & - & - & - & - & - \tabularnewline
24 & 65 & - & - & - & - & - & - & - \tabularnewline
25 & 65 & 69.9852 & 57.9492 & 82.0212 & 0.2085 & 0.7915 & 0.6268 & 0.7915 \tabularnewline
26 & 64 & 72.4703 & 50.787 & 94.1537 & 0.2219 & 0.7502 & 0.4809 & 0.7502 \tabularnewline
27 & 60 & 73.7092 & 43.5047 & 103.9138 & 0.1868 & 0.7357 & 0.5698 & 0.714 \tabularnewline
28 & 43 & 74.3269 & 36.652 & 112.0017 & 0.0516 & 0.772 & 0.5687 & 0.6862 \tabularnewline
29 & 47 & 74.6347 & 30.3571 & 118.9124 & 0.1106 & 0.9193 & 0.5813 & 0.6651 \tabularnewline
30 & 40 & 74.7882 & 24.5986 & 124.9778 & 0.0871 & 0.8611 & 0.5894 & 0.6489 \tabularnewline
31 & 31 & 74.8647 & 19.3107 & 130.4188 & 0.0609 & 0.8907 & 0.6361 & 0.6361 \tabularnewline
32 & 27 & 74.9029 & 14.4223 & 135.3835 & 0.0603 & 0.9226 & 0.7191 & 0.6259 \tabularnewline
33 & 24 & 74.9219 & 9.87 & 139.9738 & 0.0625 & 0.9256 & 0.7054 & 0.6175 \tabularnewline
34 & 23 & 74.9314 & 5.601 & 144.2617 & 0.071 & 0.925 & 0.6939 & 0.6106 \tabularnewline
35 & 17 & 74.9361 & 1.5727 & 148.2995 & 0.0608 & 0.9174 & 0.7029 & 0.6047 \tabularnewline
36 & 16 & 74.9385 & -2.2493 & 152.1263 & 0.0672 & 0.9294 & 0.5996 & 0.5996 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116418&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]65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]13[/C][C]68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]14[/C][C]73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]15[/C][C]71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]16[/C][C]71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]17[/C][C]70[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]18[/C][C]69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]19[/C][C]65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]20[/C][C]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]21[/C][C]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]22[/C][C]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]23[/C][C]55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]24[/C][C]65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]65[/C][C]69.9852[/C][C]57.9492[/C][C]82.0212[/C][C]0.2085[/C][C]0.7915[/C][C]0.6268[/C][C]0.7915[/C][/ROW]
[ROW][C]26[/C][C]64[/C][C]72.4703[/C][C]50.787[/C][C]94.1537[/C][C]0.2219[/C][C]0.7502[/C][C]0.4809[/C][C]0.7502[/C][/ROW]
[ROW][C]27[/C][C]60[/C][C]73.7092[/C][C]43.5047[/C][C]103.9138[/C][C]0.1868[/C][C]0.7357[/C][C]0.5698[/C][C]0.714[/C][/ROW]
[ROW][C]28[/C][C]43[/C][C]74.3269[/C][C]36.652[/C][C]112.0017[/C][C]0.0516[/C][C]0.772[/C][C]0.5687[/C][C]0.6862[/C][/ROW]
[ROW][C]29[/C][C]47[/C][C]74.6347[/C][C]30.3571[/C][C]118.9124[/C][C]0.1106[/C][C]0.9193[/C][C]0.5813[/C][C]0.6651[/C][/ROW]
[ROW][C]30[/C][C]40[/C][C]74.7882[/C][C]24.5986[/C][C]124.9778[/C][C]0.0871[/C][C]0.8611[/C][C]0.5894[/C][C]0.6489[/C][/ROW]
[ROW][C]31[/C][C]31[/C][C]74.8647[/C][C]19.3107[/C][C]130.4188[/C][C]0.0609[/C][C]0.8907[/C][C]0.6361[/C][C]0.6361[/C][/ROW]
[ROW][C]32[/C][C]27[/C][C]74.9029[/C][C]14.4223[/C][C]135.3835[/C][C]0.0603[/C][C]0.9226[/C][C]0.7191[/C][C]0.6259[/C][/ROW]
[ROW][C]33[/C][C]24[/C][C]74.9219[/C][C]9.87[/C][C]139.9738[/C][C]0.0625[/C][C]0.9256[/C][C]0.7054[/C][C]0.6175[/C][/ROW]
[ROW][C]34[/C][C]23[/C][C]74.9314[/C][C]5.601[/C][C]144.2617[/C][C]0.071[/C][C]0.925[/C][C]0.6939[/C][C]0.6106[/C][/ROW]
[ROW][C]35[/C][C]17[/C][C]74.9361[/C][C]1.5727[/C][C]148.2995[/C][C]0.0608[/C][C]0.9174[/C][C]0.7029[/C][C]0.6047[/C][/ROW]
[ROW][C]36[/C][C]16[/C][C]74.9385[/C][C]-2.2493[/C][C]152.1263[/C][C]0.0672[/C][C]0.9294[/C][C]0.5996[/C][C]0.5996[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116418&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116418&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])
1265-------
1368-------
1473-------
1571-------
1671-------
1770-------
1869-------
1965-------
2057-------
2157-------
2257-------
2355-------
2465-------
256569.985257.949282.02120.20850.79150.62680.7915
266472.470350.78794.15370.22190.75020.48090.7502
276073.709243.5047103.91380.18680.73570.56980.714
284374.326936.652112.00170.05160.7720.56870.6862
294774.634730.3571118.91240.11060.91930.58130.6651
304074.788224.5986124.97780.08710.86110.58940.6489
313174.864719.3107130.41880.06090.89070.63610.6361
322774.902914.4223135.38350.06030.92260.71910.6259
332474.92199.87139.97380.06250.92560.70540.6175
342374.93145.601144.26170.0710.9250.69390.6106
351774.93611.5727148.29950.06080.91740.70290.6047
361674.9385-2.2493152.12630.06720.92940.59960.5996







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
250.0877-0.0712024.851800
260.1527-0.11690.094171.746648.29926.9498
270.2091-0.1860.1247187.943394.84729.739
280.2586-0.42150.1989981.3718316.478417.7898
290.3027-0.37030.2332763.679405.918520.1474
300.3424-0.46520.27181210.221539.968923.2372
310.3786-0.58590.31671924.116737.704227.1607
320.412-0.63950.35712294.687932.327130.534
330.443-0.67970.39292593.04061116.850833.4193
340.4721-0.69310.42292696.86891274.852635.7051
350.4995-0.77310.45483356.59311464.101738.2636
360.5255-0.78650.48243473.7431631.571940.3927

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
25 & 0.0877 & -0.0712 & 0 & 24.8518 & 0 & 0 \tabularnewline
26 & 0.1527 & -0.1169 & 0.0941 & 71.7466 & 48.2992 & 6.9498 \tabularnewline
27 & 0.2091 & -0.186 & 0.1247 & 187.9433 & 94.8472 & 9.739 \tabularnewline
28 & 0.2586 & -0.4215 & 0.1989 & 981.3718 & 316.4784 & 17.7898 \tabularnewline
29 & 0.3027 & -0.3703 & 0.2332 & 763.679 & 405.9185 & 20.1474 \tabularnewline
30 & 0.3424 & -0.4652 & 0.2718 & 1210.221 & 539.9689 & 23.2372 \tabularnewline
31 & 0.3786 & -0.5859 & 0.3167 & 1924.116 & 737.7042 & 27.1607 \tabularnewline
32 & 0.412 & -0.6395 & 0.3571 & 2294.687 & 932.3271 & 30.534 \tabularnewline
33 & 0.443 & -0.6797 & 0.3929 & 2593.0406 & 1116.8508 & 33.4193 \tabularnewline
34 & 0.4721 & -0.6931 & 0.4229 & 2696.8689 & 1274.8526 & 35.7051 \tabularnewline
35 & 0.4995 & -0.7731 & 0.4548 & 3356.5931 & 1464.1017 & 38.2636 \tabularnewline
36 & 0.5255 & -0.7865 & 0.4824 & 3473.743 & 1631.5719 & 40.3927 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116418&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.0877[/C][C]-0.0712[/C][C]0[/C][C]24.8518[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]26[/C][C]0.1527[/C][C]-0.1169[/C][C]0.0941[/C][C]71.7466[/C][C]48.2992[/C][C]6.9498[/C][/ROW]
[ROW][C]27[/C][C]0.2091[/C][C]-0.186[/C][C]0.1247[/C][C]187.9433[/C][C]94.8472[/C][C]9.739[/C][/ROW]
[ROW][C]28[/C][C]0.2586[/C][C]-0.4215[/C][C]0.1989[/C][C]981.3718[/C][C]316.4784[/C][C]17.7898[/C][/ROW]
[ROW][C]29[/C][C]0.3027[/C][C]-0.3703[/C][C]0.2332[/C][C]763.679[/C][C]405.9185[/C][C]20.1474[/C][/ROW]
[ROW][C]30[/C][C]0.3424[/C][C]-0.4652[/C][C]0.2718[/C][C]1210.221[/C][C]539.9689[/C][C]23.2372[/C][/ROW]
[ROW][C]31[/C][C]0.3786[/C][C]-0.5859[/C][C]0.3167[/C][C]1924.116[/C][C]737.7042[/C][C]27.1607[/C][/ROW]
[ROW][C]32[/C][C]0.412[/C][C]-0.6395[/C][C]0.3571[/C][C]2294.687[/C][C]932.3271[/C][C]30.534[/C][/ROW]
[ROW][C]33[/C][C]0.443[/C][C]-0.6797[/C][C]0.3929[/C][C]2593.0406[/C][C]1116.8508[/C][C]33.4193[/C][/ROW]
[ROW][C]34[/C][C]0.4721[/C][C]-0.6931[/C][C]0.4229[/C][C]2696.8689[/C][C]1274.8526[/C][C]35.7051[/C][/ROW]
[ROW][C]35[/C][C]0.4995[/C][C]-0.7731[/C][C]0.4548[/C][C]3356.5931[/C][C]1464.1017[/C][C]38.2636[/C][/ROW]
[ROW][C]36[/C][C]0.5255[/C][C]-0.7865[/C][C]0.4824[/C][C]3473.743[/C][C]1631.5719[/C][C]40.3927[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116418&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116418&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.0877-0.0712024.851800
260.1527-0.11690.094171.746648.29926.9498
270.2091-0.1860.1247187.943394.84729.739
280.2586-0.42150.1989981.3718316.478417.7898
290.3027-0.37030.2332763.679405.918520.1474
300.3424-0.46520.27181210.221539.968923.2372
310.3786-0.58590.31671924.116737.704227.1607
320.412-0.63950.35712294.687932.327130.534
330.443-0.67970.39292593.04061116.850833.4193
340.4721-0.69310.42292696.86891274.852635.7051
350.4995-0.77310.45483356.59311464.101738.2636
360.5255-0.78650.48243473.7431631.571940.3927



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