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 computationMon, 27 Dec 2010 13:49:20 +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/27/t12934576158sao1bw04dvimd7.htm/, Retrieved Mon, 06 May 2024 13:32:51 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115988, Retrieved Mon, 06 May 2024 13:32:51 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact121
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2010-12-14 13:47:21] [acfa3f91ce5598ec4ba98aad4cfba2f0]
- RMPD  [(Partial) Autocorrelation Function] [] [2010-12-27 13:27:22] [acfa3f91ce5598ec4ba98aad4cfba2f0]
- RMP       [ARIMA Forecasting] [] [2010-12-27 13:49:20] [c474a97a96075919a678ad3d2290b00b] [Current]
Feedback Forum

Post a new message
Dataseries X:
35.36
31.19
35.29
33.80
36.38
37.77
34.88
37.07
35.56
34.18
32.05
32.35
34.79
33.75
33.76
36.80
36.57
34.14
33.85
35.10
33.92
33.34
30.69
32.32
32.47
34.71
37.19
35.58
36.04
35.63
32.74
33.31
28.40
27.37
28.20
29.23
28.05
27.70
28.05
28.01
30.73
30.82
30.48
30.92
31.20
31.41
31.96
36.95
35.64
37.18
38.69
39.97
40.36
40.79
42.92
41.21
44.15
44.70
47.42
45.14
46.08
50.59
48.63
47.46
47.30
49.02
51.77
54.15
56.10
52.58
52.56
51.27
57.72
53.46
55.48
59.33
57.32
56.44
58.80
55.64
53.62
54.87
56.15
55.35
52.38
51.27
53.95
56.09
56.34
60.65
58.35
57.18
58.87
66.20
62.25
62.62
54.73
56.20
52.54
63.06
63.53
60.95
53.83
51.20
44.57
44.15
44.04
42.28
38.42
35.41
37.01
39.19
46.50
44.79
47.01
49.15
50.85
54.09
55.40
56.16
54.37
52.34
56.13
51.29
42.95
28.88
38.47
34.83
41.17
40.80
40.00
44.00




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115988&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[122])
11035.41-------
11137.01-------
11239.19-------
11346.5-------
11444.79-------
11547.01-------
11649.15-------
11750.85-------
11854.09-------
11955.4-------
12056.16-------
12154.37-------
12252.34-------
12356.1351.984346.684357.28420.06260.447710.4477
12451.2952.369445.060659.67820.38610.15660.99980.5031
12542.9552.43443.27861.58990.02120.59670.8980.508
12628.8852.386842.224362.549300.96560.92860.5036
12738.4752.138540.999463.27770.008110.81660.4859
12834.8351.860339.898463.82220.00260.98590.67150.4687
12941.1751.54538.727764.36220.05630.99470.54230.4516
13040.851.295137.696464.89380.06520.92780.34350.4401
1314051.337336.97965.69550.06090.92480.28960.4456
1324451.229536.167366.29180.17340.9280.26060.4426

\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[122]) \tabularnewline
110 & 35.41 & - & - & - & - & - & - & - \tabularnewline
111 & 37.01 & - & - & - & - & - & - & - \tabularnewline
112 & 39.19 & - & - & - & - & - & - & - \tabularnewline
113 & 46.5 & - & - & - & - & - & - & - \tabularnewline
114 & 44.79 & - & - & - & - & - & - & - \tabularnewline
115 & 47.01 & - & - & - & - & - & - & - \tabularnewline
116 & 49.15 & - & - & - & - & - & - & - \tabularnewline
117 & 50.85 & - & - & - & - & - & - & - \tabularnewline
118 & 54.09 & - & - & - & - & - & - & - \tabularnewline
119 & 55.4 & - & - & - & - & - & - & - \tabularnewline
120 & 56.16 & - & - & - & - & - & - & - \tabularnewline
121 & 54.37 & - & - & - & - & - & - & - \tabularnewline
122 & 52.34 & - & - & - & - & - & - & - \tabularnewline
123 & 56.13 & 51.9843 & 46.6843 & 57.2842 & 0.0626 & 0.4477 & 1 & 0.4477 \tabularnewline
124 & 51.29 & 52.3694 & 45.0606 & 59.6782 & 0.3861 & 0.1566 & 0.9998 & 0.5031 \tabularnewline
125 & 42.95 & 52.434 & 43.278 & 61.5899 & 0.0212 & 0.5967 & 0.898 & 0.508 \tabularnewline
126 & 28.88 & 52.3868 & 42.2243 & 62.5493 & 0 & 0.9656 & 0.9286 & 0.5036 \tabularnewline
127 & 38.47 & 52.1385 & 40.9994 & 63.2777 & 0.0081 & 1 & 0.8166 & 0.4859 \tabularnewline
128 & 34.83 & 51.8603 & 39.8984 & 63.8222 & 0.0026 & 0.9859 & 0.6715 & 0.4687 \tabularnewline
129 & 41.17 & 51.545 & 38.7277 & 64.3622 & 0.0563 & 0.9947 & 0.5423 & 0.4516 \tabularnewline
130 & 40.8 & 51.2951 & 37.6964 & 64.8938 & 0.0652 & 0.9278 & 0.3435 & 0.4401 \tabularnewline
131 & 40 & 51.3373 & 36.979 & 65.6955 & 0.0609 & 0.9248 & 0.2896 & 0.4456 \tabularnewline
132 & 44 & 51.2295 & 36.1673 & 66.2918 & 0.1734 & 0.928 & 0.2606 & 0.4426 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115988&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[122])[/C][/ROW]
[ROW][C]110[/C][C]35.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]37.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]39.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]46.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]44.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]47.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]49.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]50.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]54.09[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]55.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]56.16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]54.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]122[/C][C]52.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]123[/C][C]56.13[/C][C]51.9843[/C][C]46.6843[/C][C]57.2842[/C][C]0.0626[/C][C]0.4477[/C][C]1[/C][C]0.4477[/C][/ROW]
[ROW][C]124[/C][C]51.29[/C][C]52.3694[/C][C]45.0606[/C][C]59.6782[/C][C]0.3861[/C][C]0.1566[/C][C]0.9998[/C][C]0.5031[/C][/ROW]
[ROW][C]125[/C][C]42.95[/C][C]52.434[/C][C]43.278[/C][C]61.5899[/C][C]0.0212[/C][C]0.5967[/C][C]0.898[/C][C]0.508[/C][/ROW]
[ROW][C]126[/C][C]28.88[/C][C]52.3868[/C][C]42.2243[/C][C]62.5493[/C][C]0[/C][C]0.9656[/C][C]0.9286[/C][C]0.5036[/C][/ROW]
[ROW][C]127[/C][C]38.47[/C][C]52.1385[/C][C]40.9994[/C][C]63.2777[/C][C]0.0081[/C][C]1[/C][C]0.8166[/C][C]0.4859[/C][/ROW]
[ROW][C]128[/C][C]34.83[/C][C]51.8603[/C][C]39.8984[/C][C]63.8222[/C][C]0.0026[/C][C]0.9859[/C][C]0.6715[/C][C]0.4687[/C][/ROW]
[ROW][C]129[/C][C]41.17[/C][C]51.545[/C][C]38.7277[/C][C]64.3622[/C][C]0.0563[/C][C]0.9947[/C][C]0.5423[/C][C]0.4516[/C][/ROW]
[ROW][C]130[/C][C]40.8[/C][C]51.2951[/C][C]37.6964[/C][C]64.8938[/C][C]0.0652[/C][C]0.9278[/C][C]0.3435[/C][C]0.4401[/C][/ROW]
[ROW][C]131[/C][C]40[/C][C]51.3373[/C][C]36.979[/C][C]65.6955[/C][C]0.0609[/C][C]0.9248[/C][C]0.2896[/C][C]0.4456[/C][/ROW]
[ROW][C]132[/C][C]44[/C][C]51.2295[/C][C]36.1673[/C][C]66.2918[/C][C]0.1734[/C][C]0.928[/C][C]0.2606[/C][C]0.4426[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115988&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115988&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[122])
11035.41-------
11137.01-------
11239.19-------
11346.5-------
11444.79-------
11547.01-------
11649.15-------
11750.85-------
11854.09-------
11955.4-------
12056.16-------
12154.37-------
12252.34-------
12356.1351.984346.684357.28420.06260.447710.4477
12451.2952.369445.060659.67820.38610.15660.99980.5031
12542.9552.43443.27861.58990.02120.59670.8980.508
12628.8852.386842.224362.549300.96560.92860.5036
12738.4752.138540.999463.27770.008110.81660.4859
12834.8351.860339.898463.82220.00260.98590.67150.4687
12941.1751.54538.727764.36220.05630.99470.54230.4516
13040.851.295137.696464.89380.06520.92780.34350.4401
1314051.337336.97965.69550.06090.92480.28960.4456
1324451.229536.167366.29180.17340.9280.26060.4426







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1230.0520.0797017.187100
1240.0712-0.02060.05021.1659.17613.0292
1250.0891-0.18090.093789.945736.09936.0083
1260.099-0.44870.1825552.5686165.216612.8537
1270.109-0.26220.1984186.8288169.539113.0207
1280.1177-0.32840.2201290.0306189.62113.7703
1290.1269-0.20130.2174107.6398177.909413.3383
1300.1353-0.20460.2158110.1473169.439113.0169
1310.1427-0.22080.2164128.5336164.894112.8411
1320.15-0.14110.208852.2662153.631312.3948

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
123 & 0.052 & 0.0797 & 0 & 17.1871 & 0 & 0 \tabularnewline
124 & 0.0712 & -0.0206 & 0.0502 & 1.165 & 9.1761 & 3.0292 \tabularnewline
125 & 0.0891 & -0.1809 & 0.0937 & 89.9457 & 36.0993 & 6.0083 \tabularnewline
126 & 0.099 & -0.4487 & 0.1825 & 552.5686 & 165.2166 & 12.8537 \tabularnewline
127 & 0.109 & -0.2622 & 0.1984 & 186.8288 & 169.5391 & 13.0207 \tabularnewline
128 & 0.1177 & -0.3284 & 0.2201 & 290.0306 & 189.621 & 13.7703 \tabularnewline
129 & 0.1269 & -0.2013 & 0.2174 & 107.6398 & 177.9094 & 13.3383 \tabularnewline
130 & 0.1353 & -0.2046 & 0.2158 & 110.1473 & 169.4391 & 13.0169 \tabularnewline
131 & 0.1427 & -0.2208 & 0.2164 & 128.5336 & 164.8941 & 12.8411 \tabularnewline
132 & 0.15 & -0.1411 & 0.2088 & 52.2662 & 153.6313 & 12.3948 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115988&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]123[/C][C]0.052[/C][C]0.0797[/C][C]0[/C][C]17.1871[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]124[/C][C]0.0712[/C][C]-0.0206[/C][C]0.0502[/C][C]1.165[/C][C]9.1761[/C][C]3.0292[/C][/ROW]
[ROW][C]125[/C][C]0.0891[/C][C]-0.1809[/C][C]0.0937[/C][C]89.9457[/C][C]36.0993[/C][C]6.0083[/C][/ROW]
[ROW][C]126[/C][C]0.099[/C][C]-0.4487[/C][C]0.1825[/C][C]552.5686[/C][C]165.2166[/C][C]12.8537[/C][/ROW]
[ROW][C]127[/C][C]0.109[/C][C]-0.2622[/C][C]0.1984[/C][C]186.8288[/C][C]169.5391[/C][C]13.0207[/C][/ROW]
[ROW][C]128[/C][C]0.1177[/C][C]-0.3284[/C][C]0.2201[/C][C]290.0306[/C][C]189.621[/C][C]13.7703[/C][/ROW]
[ROW][C]129[/C][C]0.1269[/C][C]-0.2013[/C][C]0.2174[/C][C]107.6398[/C][C]177.9094[/C][C]13.3383[/C][/ROW]
[ROW][C]130[/C][C]0.1353[/C][C]-0.2046[/C][C]0.2158[/C][C]110.1473[/C][C]169.4391[/C][C]13.0169[/C][/ROW]
[ROW][C]131[/C][C]0.1427[/C][C]-0.2208[/C][C]0.2164[/C][C]128.5336[/C][C]164.8941[/C][C]12.8411[/C][/ROW]
[ROW][C]132[/C][C]0.15[/C][C]-0.1411[/C][C]0.2088[/C][C]52.2662[/C][C]153.6313[/C][C]12.3948[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115988&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115988&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
1230.0520.0797017.187100
1240.0712-0.02060.05021.1659.17613.0292
1250.0891-0.18090.093789.945736.09936.0083
1260.099-0.44870.1825552.5686165.216612.8537
1270.109-0.26220.1984186.8288169.539113.0207
1280.1177-0.32840.2201290.0306189.62113.7703
1290.1269-0.20130.2174107.6398177.909413.3383
1300.1353-0.20460.2158110.1473169.439113.0169
1310.1427-0.22080.2164128.5336164.894112.8411
1320.15-0.14110.208852.2662153.631312.3948



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