Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 07 Dec 2007 07:28:38 -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/2007/Dec/07/t1197036982dw5bs3aim2o0jn6.htm/, Retrieved Mon, 29 Apr 2024 02:52:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2844, Retrieved Mon, 29 Apr 2024 02:52:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsWS9 Q1 intermediaire gdn, marleen
Estimated Impact189
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [WS9 Q1 intermedia...] [2007-12-07 14:28:38] [87b6915e48e03972eaa4a0940182012f] [Current]
Feedback Forum

Post a new message
Dataseries X:
99
115,4
106,9
107,1
99,3
99,2
108,3
105,6
99,5
107,4
93,1
88,1
110,7
113,1
99,6
93,6
98,6
99,6
114,3
107,8
101,2
112,5
100,5
93,9
116,2
112
106,4
95,7
96
95,8
103
102,2
98,4
111,4
86,6
91,3
107,9
101,8
104,4
93,4
100,1
98,5
112,9
101,4
107,1
110,8
90,3
95,5




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2844&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2844&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2844&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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[36])
2493.9-------
25116.2-------
26112-------
27106.4-------
2895.7-------
2996-------
3095.8-------
31103-------
32102.2-------
3398.4-------
34111.4-------
3586.6-------
3691.3-------
37107.9100.4144100.0984100.73140101
38101.8115.0745114.7124115.43780111
39104.4108.9754108.6323109.31940111
4093.4107.791107.4517108.13140111
41100.198.527398.217298.83840111
4298.598.081297.772598.39090.004011
43112.9105.0621104.7314105.39380111
44101.4103.9706103.6434104.29890011
45107.198.689398.378699.0009000.96561
46110.8107.0949106.7578107.43300.488101
4790.389.146288.865689.42770010
4895.587.383687.108687.65950000

\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[36]) \tabularnewline
24 & 93.9 & - & - & - & - & - & - & - \tabularnewline
25 & 116.2 & - & - & - & - & - & - & - \tabularnewline
26 & 112 & - & - & - & - & - & - & - \tabularnewline
27 & 106.4 & - & - & - & - & - & - & - \tabularnewline
28 & 95.7 & - & - & - & - & - & - & - \tabularnewline
29 & 96 & - & - & - & - & - & - & - \tabularnewline
30 & 95.8 & - & - & - & - & - & - & - \tabularnewline
31 & 103 & - & - & - & - & - & - & - \tabularnewline
32 & 102.2 & - & - & - & - & - & - & - \tabularnewline
33 & 98.4 & - & - & - & - & - & - & - \tabularnewline
34 & 111.4 & - & - & - & - & - & - & - \tabularnewline
35 & 86.6 & - & - & - & - & - & - & - \tabularnewline
36 & 91.3 & - & - & - & - & - & - & - \tabularnewline
37 & 107.9 & 100.4144 & 100.0984 & 100.7314 & 0 & 1 & 0 & 1 \tabularnewline
38 & 101.8 & 115.0745 & 114.7124 & 115.4378 & 0 & 1 & 1 & 1 \tabularnewline
39 & 104.4 & 108.9754 & 108.6323 & 109.3194 & 0 & 1 & 1 & 1 \tabularnewline
40 & 93.4 & 107.791 & 107.4517 & 108.1314 & 0 & 1 & 1 & 1 \tabularnewline
41 & 100.1 & 98.5273 & 98.2172 & 98.8384 & 0 & 1 & 1 & 1 \tabularnewline
42 & 98.5 & 98.0812 & 97.7725 & 98.3909 & 0.004 & 0 & 1 & 1 \tabularnewline
43 & 112.9 & 105.0621 & 104.7314 & 105.3938 & 0 & 1 & 1 & 1 \tabularnewline
44 & 101.4 & 103.9706 & 103.6434 & 104.2989 & 0 & 0 & 1 & 1 \tabularnewline
45 & 107.1 & 98.6893 & 98.3786 & 99.0009 & 0 & 0 & 0.9656 & 1 \tabularnewline
46 & 110.8 & 107.0949 & 106.7578 & 107.433 & 0 & 0.4881 & 0 & 1 \tabularnewline
47 & 90.3 & 89.1462 & 88.8656 & 89.4277 & 0 & 0 & 1 & 0 \tabularnewline
48 & 95.5 & 87.3836 & 87.1086 & 87.6595 & 0 & 0 & 0 & 0 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2844&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[36])[/C][/ROW]
[ROW][C]24[/C][C]93.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]112[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]106.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]95.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]95.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]103[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]102.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]98.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]111.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]86.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]91.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]107.9[/C][C]100.4144[/C][C]100.0984[/C][C]100.7314[/C][C]0[/C][C]1[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]38[/C][C]101.8[/C][C]115.0745[/C][C]114.7124[/C][C]115.4378[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]39[/C][C]104.4[/C][C]108.9754[/C][C]108.6323[/C][C]109.3194[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]40[/C][C]93.4[/C][C]107.791[/C][C]107.4517[/C][C]108.1314[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]41[/C][C]100.1[/C][C]98.5273[/C][C]98.2172[/C][C]98.8384[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]42[/C][C]98.5[/C][C]98.0812[/C][C]97.7725[/C][C]98.3909[/C][C]0.004[/C][C]0[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]43[/C][C]112.9[/C][C]105.0621[/C][C]104.7314[/C][C]105.3938[/C][C]0[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]44[/C][C]101.4[/C][C]103.9706[/C][C]103.6434[/C][C]104.2989[/C][C]0[/C][C]0[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]45[/C][C]107.1[/C][C]98.6893[/C][C]98.3786[/C][C]99.0009[/C][C]0[/C][C]0[/C][C]0.9656[/C][C]1[/C][/ROW]
[ROW][C]46[/C][C]110.8[/C][C]107.0949[/C][C]106.7578[/C][C]107.433[/C][C]0[/C][C]0.4881[/C][C]0[/C][C]1[/C][/ROW]
[ROW][C]47[/C][C]90.3[/C][C]89.1462[/C][C]88.8656[/C][C]89.4277[/C][C]0[/C][C]0[/C][C]1[/C][C]0[/C][/ROW]
[ROW][C]48[/C][C]95.5[/C][C]87.3836[/C][C]87.1086[/C][C]87.6595[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2844&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2844&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[36])
2493.9-------
25116.2-------
26112-------
27106.4-------
2895.7-------
2996-------
3095.8-------
31103-------
32102.2-------
3398.4-------
34111.4-------
3586.6-------
3691.3-------
37107.9100.4144100.0984100.73140101
38101.8115.0745114.7124115.43780111
39104.4108.9754108.6323109.31940111
4093.4107.791107.4517108.13140111
41100.198.527398.217298.83840111
4298.598.081297.772598.39090.004011
43112.9105.0621104.7314105.39380111
44101.4103.9706103.6434104.29890011
45107.198.689398.378699.0009000.96561
46110.8107.0949106.7578107.43300.488101
4790.389.146288.865689.42770010
4895.587.383687.108687.65950000







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
370.00160.07450.006256.03414.66952.1609
380.0016-0.11540.0096176.21314.68443.832
390.0016-0.0420.003520.93391.74451.3208
400.0016-0.13350.0111207.101117.25844.1543
410.00160.0160.00132.47330.20610.454
420.00160.00434e-040.17540.01460.1209
430.00160.07460.006261.43315.11942.2626
440.0016-0.02470.00216.6080.55070.7421
450.00160.08520.007170.74055.8952.428
460.00160.03460.002913.72811.1441.0696
470.00160.01290.00111.33120.11090.3331
480.00160.09290.007765.87585.48962.343

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 0.0016 & 0.0745 & 0.0062 & 56.0341 & 4.6695 & 2.1609 \tabularnewline
38 & 0.0016 & -0.1154 & 0.0096 & 176.213 & 14.6844 & 3.832 \tabularnewline
39 & 0.0016 & -0.042 & 0.0035 & 20.9339 & 1.7445 & 1.3208 \tabularnewline
40 & 0.0016 & -0.1335 & 0.0111 & 207.1011 & 17.2584 & 4.1543 \tabularnewline
41 & 0.0016 & 0.016 & 0.0013 & 2.4733 & 0.2061 & 0.454 \tabularnewline
42 & 0.0016 & 0.0043 & 4e-04 & 0.1754 & 0.0146 & 0.1209 \tabularnewline
43 & 0.0016 & 0.0746 & 0.0062 & 61.4331 & 5.1194 & 2.2626 \tabularnewline
44 & 0.0016 & -0.0247 & 0.0021 & 6.608 & 0.5507 & 0.7421 \tabularnewline
45 & 0.0016 & 0.0852 & 0.0071 & 70.7405 & 5.895 & 2.428 \tabularnewline
46 & 0.0016 & 0.0346 & 0.0029 & 13.7281 & 1.144 & 1.0696 \tabularnewline
47 & 0.0016 & 0.0129 & 0.0011 & 1.3312 & 0.1109 & 0.3331 \tabularnewline
48 & 0.0016 & 0.0929 & 0.0077 & 65.8758 & 5.4896 & 2.343 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2844&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]37[/C][C]0.0016[/C][C]0.0745[/C][C]0.0062[/C][C]56.0341[/C][C]4.6695[/C][C]2.1609[/C][/ROW]
[ROW][C]38[/C][C]0.0016[/C][C]-0.1154[/C][C]0.0096[/C][C]176.213[/C][C]14.6844[/C][C]3.832[/C][/ROW]
[ROW][C]39[/C][C]0.0016[/C][C]-0.042[/C][C]0.0035[/C][C]20.9339[/C][C]1.7445[/C][C]1.3208[/C][/ROW]
[ROW][C]40[/C][C]0.0016[/C][C]-0.1335[/C][C]0.0111[/C][C]207.1011[/C][C]17.2584[/C][C]4.1543[/C][/ROW]
[ROW][C]41[/C][C]0.0016[/C][C]0.016[/C][C]0.0013[/C][C]2.4733[/C][C]0.2061[/C][C]0.454[/C][/ROW]
[ROW][C]42[/C][C]0.0016[/C][C]0.0043[/C][C]4e-04[/C][C]0.1754[/C][C]0.0146[/C][C]0.1209[/C][/ROW]
[ROW][C]43[/C][C]0.0016[/C][C]0.0746[/C][C]0.0062[/C][C]61.4331[/C][C]5.1194[/C][C]2.2626[/C][/ROW]
[ROW][C]44[/C][C]0.0016[/C][C]-0.0247[/C][C]0.0021[/C][C]6.608[/C][C]0.5507[/C][C]0.7421[/C][/ROW]
[ROW][C]45[/C][C]0.0016[/C][C]0.0852[/C][C]0.0071[/C][C]70.7405[/C][C]5.895[/C][C]2.428[/C][/ROW]
[ROW][C]46[/C][C]0.0016[/C][C]0.0346[/C][C]0.0029[/C][C]13.7281[/C][C]1.144[/C][C]1.0696[/C][/ROW]
[ROW][C]47[/C][C]0.0016[/C][C]0.0129[/C][C]0.0011[/C][C]1.3312[/C][C]0.1109[/C][C]0.3331[/C][/ROW]
[ROW][C]48[/C][C]0.0016[/C][C]0.0929[/C][C]0.0077[/C][C]65.8758[/C][C]5.4896[/C][C]2.343[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2844&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2844&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
370.00160.07450.006256.03414.66952.1609
380.0016-0.11540.0096176.21314.68443.832
390.0016-0.0420.003520.93391.74451.3208
400.0016-0.13350.0111207.101117.25844.1543
410.00160.0160.00132.47330.20610.454
420.00160.00434e-040.17540.01460.1209
430.00160.07460.006261.43315.11942.2626
440.0016-0.02470.00216.6080.55070.7421
450.00160.08520.007170.74055.8952.428
460.00160.03460.002913.72811.1441.0696
470.00160.01290.00111.33120.11090.3331
480.00160.09290.007765.87585.48962.343



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