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 computationSun, 20 Dec 2009 08:01:46 -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/20/t1261321351f5n4ysrd1kf7149.htm/, Retrieved Sat, 27 Apr 2024 09:40:43 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69908, Retrieved Sat, 27 Apr 2024 09:40:43 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact101
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Arima forecasting B] [2009-12-20 15:01:46] [e458b4e05bf28a297f8af8d9f96e59d6] [Current]
Feedback Forum

Post a new message
Dataseries X:
210
220
212
191
180
195
136
196
182
166
147
125
164
170
171
140
155
156
141
167
171
206
187
124
163
154
226
125
162
145
98
128
159
209
150
125
214
193
140
205
192
192
186
150
246
282
264
336
301
376
416
344
326
351
249
258
311
343
278




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69908&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[48])
36125-------
37214-------
38193-------
39140-------
40205-------
41192-------
42192-------
43186-------
44150-------
45246-------
46282-------
47264-------
48336-------
49301317.5519248.1374386.96640.32010.30120.99830.3012
50376309.8602233.5849386.13540.04460.59010.99870.2509
51416307.7077225.7404389.67510.00480.051210.2494
52344320.2211228.4566411.98560.30580.02040.99310.3681
53326315.8303217.2163414.44440.41990.28780.99310.3443
54351317.8438213.0395422.64810.26760.43940.99070.3671
55249315.3409204.1174426.56440.12120.26490.98870.3579
56258304.9478187.8735422.02210.21590.82550.99530.3016
57311332.5158209.9145455.11710.36540.88320.91670.4778
58343342.6332214.6666470.59970.49780.6860.82350.5405
59278337.487204.3962470.57780.19050.46760.86040.5087

\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[48]) \tabularnewline
36 & 125 & - & - & - & - & - & - & - \tabularnewline
37 & 214 & - & - & - & - & - & - & - \tabularnewline
38 & 193 & - & - & - & - & - & - & - \tabularnewline
39 & 140 & - & - & - & - & - & - & - \tabularnewline
40 & 205 & - & - & - & - & - & - & - \tabularnewline
41 & 192 & - & - & - & - & - & - & - \tabularnewline
42 & 192 & - & - & - & - & - & - & - \tabularnewline
43 & 186 & - & - & - & - & - & - & - \tabularnewline
44 & 150 & - & - & - & - & - & - & - \tabularnewline
45 & 246 & - & - & - & - & - & - & - \tabularnewline
46 & 282 & - & - & - & - & - & - & - \tabularnewline
47 & 264 & - & - & - & - & - & - & - \tabularnewline
48 & 336 & - & - & - & - & - & - & - \tabularnewline
49 & 301 & 317.5519 & 248.1374 & 386.9664 & 0.3201 & 0.3012 & 0.9983 & 0.3012 \tabularnewline
50 & 376 & 309.8602 & 233.5849 & 386.1354 & 0.0446 & 0.5901 & 0.9987 & 0.2509 \tabularnewline
51 & 416 & 307.7077 & 225.7404 & 389.6751 & 0.0048 & 0.0512 & 1 & 0.2494 \tabularnewline
52 & 344 & 320.2211 & 228.4566 & 411.9856 & 0.3058 & 0.0204 & 0.9931 & 0.3681 \tabularnewline
53 & 326 & 315.8303 & 217.2163 & 414.4444 & 0.4199 & 0.2878 & 0.9931 & 0.3443 \tabularnewline
54 & 351 & 317.8438 & 213.0395 & 422.6481 & 0.2676 & 0.4394 & 0.9907 & 0.3671 \tabularnewline
55 & 249 & 315.3409 & 204.1174 & 426.5644 & 0.1212 & 0.2649 & 0.9887 & 0.3579 \tabularnewline
56 & 258 & 304.9478 & 187.8735 & 422.0221 & 0.2159 & 0.8255 & 0.9953 & 0.3016 \tabularnewline
57 & 311 & 332.5158 & 209.9145 & 455.1171 & 0.3654 & 0.8832 & 0.9167 & 0.4778 \tabularnewline
58 & 343 & 342.6332 & 214.6666 & 470.5997 & 0.4978 & 0.686 & 0.8235 & 0.5405 \tabularnewline
59 & 278 & 337.487 & 204.3962 & 470.5778 & 0.1905 & 0.4676 & 0.8604 & 0.5087 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69908&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[48])[/C][/ROW]
[ROW][C]36[/C][C]125[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]214[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]193[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]140[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]205[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]192[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]192[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]186[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]150[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]246[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]282[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]264[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]336[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]301[/C][C]317.5519[/C][C]248.1374[/C][C]386.9664[/C][C]0.3201[/C][C]0.3012[/C][C]0.9983[/C][C]0.3012[/C][/ROW]
[ROW][C]50[/C][C]376[/C][C]309.8602[/C][C]233.5849[/C][C]386.1354[/C][C]0.0446[/C][C]0.5901[/C][C]0.9987[/C][C]0.2509[/C][/ROW]
[ROW][C]51[/C][C]416[/C][C]307.7077[/C][C]225.7404[/C][C]389.6751[/C][C]0.0048[/C][C]0.0512[/C][C]1[/C][C]0.2494[/C][/ROW]
[ROW][C]52[/C][C]344[/C][C]320.2211[/C][C]228.4566[/C][C]411.9856[/C][C]0.3058[/C][C]0.0204[/C][C]0.9931[/C][C]0.3681[/C][/ROW]
[ROW][C]53[/C][C]326[/C][C]315.8303[/C][C]217.2163[/C][C]414.4444[/C][C]0.4199[/C][C]0.2878[/C][C]0.9931[/C][C]0.3443[/C][/ROW]
[ROW][C]54[/C][C]351[/C][C]317.8438[/C][C]213.0395[/C][C]422.6481[/C][C]0.2676[/C][C]0.4394[/C][C]0.9907[/C][C]0.3671[/C][/ROW]
[ROW][C]55[/C][C]249[/C][C]315.3409[/C][C]204.1174[/C][C]426.5644[/C][C]0.1212[/C][C]0.2649[/C][C]0.9887[/C][C]0.3579[/C][/ROW]
[ROW][C]56[/C][C]258[/C][C]304.9478[/C][C]187.8735[/C][C]422.0221[/C][C]0.2159[/C][C]0.8255[/C][C]0.9953[/C][C]0.3016[/C][/ROW]
[ROW][C]57[/C][C]311[/C][C]332.5158[/C][C]209.9145[/C][C]455.1171[/C][C]0.3654[/C][C]0.8832[/C][C]0.9167[/C][C]0.4778[/C][/ROW]
[ROW][C]58[/C][C]343[/C][C]342.6332[/C][C]214.6666[/C][C]470.5997[/C][C]0.4978[/C][C]0.686[/C][C]0.8235[/C][C]0.5405[/C][/ROW]
[ROW][C]59[/C][C]278[/C][C]337.487[/C][C]204.3962[/C][C]470.5778[/C][C]0.1905[/C][C]0.4676[/C][C]0.8604[/C][C]0.5087[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69908&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69908&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[48])
36125-------
37214-------
38193-------
39140-------
40205-------
41192-------
42192-------
43186-------
44150-------
45246-------
46282-------
47264-------
48336-------
49301317.5519248.1374386.96640.32010.30120.99830.3012
50376309.8602233.5849386.13540.04460.59010.99870.2509
51416307.7077225.7404389.67510.00480.051210.2494
52344320.2211228.4566411.98560.30580.02040.99310.3681
53326315.8303217.2163414.44440.41990.28780.99310.3443
54351317.8438213.0395422.64810.26760.43940.99070.3671
55249315.3409204.1174426.56440.12120.26490.98870.3579
56258304.9478187.8735422.02210.21590.82550.99530.3016
57311332.5158209.9145455.11710.36540.88320.91670.4778
58343342.6332214.6666470.59970.49780.6860.82350.5405
59278337.487204.3962470.57780.19050.46760.86040.5087







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1115-0.05210273.964400
500.12560.21350.13284374.4772324.220748.2102
510.13590.35190.205811727.21875458.553473.882
520.14620.07430.1729565.43494235.273865.079
530.15930.03220.1448103.42253408.903558.3858
540.16820.10430.1381099.33583023.975654.9907
550.18-0.21040.14844401.11683220.7156.7513
560.1959-0.1540.14912204.09453093.633155.6204
570.1881-0.06470.1397462.932801.332752.9276
580.19060.00110.12580.13462521.212950.2117
590.2012-0.17630.13043538.70292613.71251.1245

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1115 & -0.0521 & 0 & 273.9644 & 0 & 0 \tabularnewline
50 & 0.1256 & 0.2135 & 0.1328 & 4374.477 & 2324.2207 & 48.2102 \tabularnewline
51 & 0.1359 & 0.3519 & 0.2058 & 11727.2187 & 5458.5534 & 73.882 \tabularnewline
52 & 0.1462 & 0.0743 & 0.1729 & 565.4349 & 4235.2738 & 65.079 \tabularnewline
53 & 0.1593 & 0.0322 & 0.1448 & 103.4225 & 3408.9035 & 58.3858 \tabularnewline
54 & 0.1682 & 0.1043 & 0.138 & 1099.3358 & 3023.9756 & 54.9907 \tabularnewline
55 & 0.18 & -0.2104 & 0.1484 & 4401.1168 & 3220.71 & 56.7513 \tabularnewline
56 & 0.1959 & -0.154 & 0.1491 & 2204.0945 & 3093.6331 & 55.6204 \tabularnewline
57 & 0.1881 & -0.0647 & 0.1397 & 462.93 & 2801.3327 & 52.9276 \tabularnewline
58 & 0.1906 & 0.0011 & 0.1258 & 0.1346 & 2521.2129 & 50.2117 \tabularnewline
59 & 0.2012 & -0.1763 & 0.1304 & 3538.7029 & 2613.712 & 51.1245 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69908&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]49[/C][C]0.1115[/C][C]-0.0521[/C][C]0[/C][C]273.9644[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.1256[/C][C]0.2135[/C][C]0.1328[/C][C]4374.477[/C][C]2324.2207[/C][C]48.2102[/C][/ROW]
[ROW][C]51[/C][C]0.1359[/C][C]0.3519[/C][C]0.2058[/C][C]11727.2187[/C][C]5458.5534[/C][C]73.882[/C][/ROW]
[ROW][C]52[/C][C]0.1462[/C][C]0.0743[/C][C]0.1729[/C][C]565.4349[/C][C]4235.2738[/C][C]65.079[/C][/ROW]
[ROW][C]53[/C][C]0.1593[/C][C]0.0322[/C][C]0.1448[/C][C]103.4225[/C][C]3408.9035[/C][C]58.3858[/C][/ROW]
[ROW][C]54[/C][C]0.1682[/C][C]0.1043[/C][C]0.138[/C][C]1099.3358[/C][C]3023.9756[/C][C]54.9907[/C][/ROW]
[ROW][C]55[/C][C]0.18[/C][C]-0.2104[/C][C]0.1484[/C][C]4401.1168[/C][C]3220.71[/C][C]56.7513[/C][/ROW]
[ROW][C]56[/C][C]0.1959[/C][C]-0.154[/C][C]0.1491[/C][C]2204.0945[/C][C]3093.6331[/C][C]55.6204[/C][/ROW]
[ROW][C]57[/C][C]0.1881[/C][C]-0.0647[/C][C]0.1397[/C][C]462.93[/C][C]2801.3327[/C][C]52.9276[/C][/ROW]
[ROW][C]58[/C][C]0.1906[/C][C]0.0011[/C][C]0.1258[/C][C]0.1346[/C][C]2521.2129[/C][C]50.2117[/C][/ROW]
[ROW][C]59[/C][C]0.2012[/C][C]-0.1763[/C][C]0.1304[/C][C]3538.7029[/C][C]2613.712[/C][C]51.1245[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69908&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69908&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
490.1115-0.05210273.964400
500.12560.21350.13284374.4772324.220748.2102
510.13590.35190.205811727.21875458.553473.882
520.14620.07430.1729565.43494235.273865.079
530.15930.03220.1448103.42253408.903558.3858
540.16820.10430.1381099.33583023.975654.9907
550.18-0.21040.14844401.11683220.7156.7513
560.1959-0.1540.14912204.09453093.633155.6204
570.1881-0.06470.1397462.932801.332752.9276
580.19060.00110.12580.13462521.212950.2117
590.2012-0.17630.13043538.70292613.71251.1245



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