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 computationThu, 20 Dec 2012 09:13:43 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/20/t13560128365r177cmvf73w9la.htm/, Retrieved Sat, 20 Apr 2024 07:53:58 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=202695, Retrieved Sat, 20 Apr 2024 07:53:58 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact93
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
- R PD      [ARIMA Forecasting] [Apple Inc - ARIMA...] [2010-12-17 14:53:25] [afe9379cca749d06b3d6872e02cc47ed]
- R PD          [ARIMA Forecasting] [] [2012-12-20 14:13:43] [14d0a7ecb926325afa0eb6a607fbc7a0] [Current]
Feedback Forum

Post a new message
Dataseries X:
26.81
28.24
27.58
27.98
27.84
27.49
26.97
27.71
27.46
27.04
28.00
27.32
26.36
26.15
25.94
24.00
24.32
23.10
22.92
23.56
22.17
22.36
19.86
20.07
19.21
19.99
20.47
21.17
21.25
21.18
21.21
21.11
21.94
22.56
23.23
19.50
19.32
19.00
18.98
19.88
19.48
19.52
19.52
19.75
19.64
20.23
20.40
20.91
21.95
21.83
22.27
21.99
21.66
20.32
20.62
20.28
20.79
22.86
22.59
23.29
21.87
21.52
22.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' @ jenkins.wessa.net

\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' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202695&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' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202695&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202695&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' @ jenkins.wessa.net







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[51])
4720.4-------
4820.91-------
4921.95-------
5021.83-------
5122.27-------
5221.9922.11920.453223.92040.44420.43470.90580.4347
5321.6621.959619.781524.37750.40410.49020.50310.4007
5420.3221.961519.364324.90710.13740.57950.53490.4187
5520.6221.88718.950525.27850.2320.81740.41240.4124
5620.2821.895718.74925.57060.19440.75190.47990.4209
5720.7921.894718.545625.84860.2920.78830.54630.4262
5822.8621.894818.358626.11210.32690.69620.76790.4308
5922.5921.894818.183426.36380.38020.3360.7120.4346
6023.2921.894818.018326.60530.28080.38620.74920.438
6121.8721.894817.862126.8380.49610.29010.66930.4409
6221.5221.894817.713527.06310.44350.50380.35720.4434
632221.894817.571727.28150.48470.55420.40020.4457

\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[51]) \tabularnewline
47 & 20.4 & - & - & - & - & - & - & - \tabularnewline
48 & 20.91 & - & - & - & - & - & - & - \tabularnewline
49 & 21.95 & - & - & - & - & - & - & - \tabularnewline
50 & 21.83 & - & - & - & - & - & - & - \tabularnewline
51 & 22.27 & - & - & - & - & - & - & - \tabularnewline
52 & 21.99 & 22.119 & 20.4532 & 23.9204 & 0.4442 & 0.4347 & 0.9058 & 0.4347 \tabularnewline
53 & 21.66 & 21.9596 & 19.7815 & 24.3775 & 0.4041 & 0.4902 & 0.5031 & 0.4007 \tabularnewline
54 & 20.32 & 21.9615 & 19.3643 & 24.9071 & 0.1374 & 0.5795 & 0.5349 & 0.4187 \tabularnewline
55 & 20.62 & 21.887 & 18.9505 & 25.2785 & 0.232 & 0.8174 & 0.4124 & 0.4124 \tabularnewline
56 & 20.28 & 21.8957 & 18.749 & 25.5706 & 0.1944 & 0.7519 & 0.4799 & 0.4209 \tabularnewline
57 & 20.79 & 21.8947 & 18.5456 & 25.8486 & 0.292 & 0.7883 & 0.5463 & 0.4262 \tabularnewline
58 & 22.86 & 21.8948 & 18.3586 & 26.1121 & 0.3269 & 0.6962 & 0.7679 & 0.4308 \tabularnewline
59 & 22.59 & 21.8948 & 18.1834 & 26.3638 & 0.3802 & 0.336 & 0.712 & 0.4346 \tabularnewline
60 & 23.29 & 21.8948 & 18.0183 & 26.6053 & 0.2808 & 0.3862 & 0.7492 & 0.438 \tabularnewline
61 & 21.87 & 21.8948 & 17.8621 & 26.838 & 0.4961 & 0.2901 & 0.6693 & 0.4409 \tabularnewline
62 & 21.52 & 21.8948 & 17.7135 & 27.0631 & 0.4435 & 0.5038 & 0.3572 & 0.4434 \tabularnewline
63 & 22 & 21.8948 & 17.5717 & 27.2815 & 0.4847 & 0.5542 & 0.4002 & 0.4457 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202695&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[51])[/C][/ROW]
[ROW][C]47[/C][C]20.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]20.91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]21.95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]21.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]22.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]21.99[/C][C]22.119[/C][C]20.4532[/C][C]23.9204[/C][C]0.4442[/C][C]0.4347[/C][C]0.9058[/C][C]0.4347[/C][/ROW]
[ROW][C]53[/C][C]21.66[/C][C]21.9596[/C][C]19.7815[/C][C]24.3775[/C][C]0.4041[/C][C]0.4902[/C][C]0.5031[/C][C]0.4007[/C][/ROW]
[ROW][C]54[/C][C]20.32[/C][C]21.9615[/C][C]19.3643[/C][C]24.9071[/C][C]0.1374[/C][C]0.5795[/C][C]0.5349[/C][C]0.4187[/C][/ROW]
[ROW][C]55[/C][C]20.62[/C][C]21.887[/C][C]18.9505[/C][C]25.2785[/C][C]0.232[/C][C]0.8174[/C][C]0.4124[/C][C]0.4124[/C][/ROW]
[ROW][C]56[/C][C]20.28[/C][C]21.8957[/C][C]18.749[/C][C]25.5706[/C][C]0.1944[/C][C]0.7519[/C][C]0.4799[/C][C]0.4209[/C][/ROW]
[ROW][C]57[/C][C]20.79[/C][C]21.8947[/C][C]18.5456[/C][C]25.8486[/C][C]0.292[/C][C]0.7883[/C][C]0.5463[/C][C]0.4262[/C][/ROW]
[ROW][C]58[/C][C]22.86[/C][C]21.8948[/C][C]18.3586[/C][C]26.1121[/C][C]0.3269[/C][C]0.6962[/C][C]0.7679[/C][C]0.4308[/C][/ROW]
[ROW][C]59[/C][C]22.59[/C][C]21.8948[/C][C]18.1834[/C][C]26.3638[/C][C]0.3802[/C][C]0.336[/C][C]0.712[/C][C]0.4346[/C][/ROW]
[ROW][C]60[/C][C]23.29[/C][C]21.8948[/C][C]18.0183[/C][C]26.6053[/C][C]0.2808[/C][C]0.3862[/C][C]0.7492[/C][C]0.438[/C][/ROW]
[ROW][C]61[/C][C]21.87[/C][C]21.8948[/C][C]17.8621[/C][C]26.838[/C][C]0.4961[/C][C]0.2901[/C][C]0.6693[/C][C]0.4409[/C][/ROW]
[ROW][C]62[/C][C]21.52[/C][C]21.8948[/C][C]17.7135[/C][C]27.0631[/C][C]0.4435[/C][C]0.5038[/C][C]0.3572[/C][C]0.4434[/C][/ROW]
[ROW][C]63[/C][C]22[/C][C]21.8948[/C][C]17.5717[/C][C]27.2815[/C][C]0.4847[/C][C]0.5542[/C][C]0.4002[/C][C]0.4457[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202695&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202695&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[51])
4720.4-------
4820.91-------
4921.95-------
5021.83-------
5122.27-------
5221.9922.11920.453223.92040.44420.43470.90580.4347
5321.6621.959619.781524.37750.40410.49020.50310.4007
5420.3221.961519.364324.90710.13740.57950.53490.4187
5520.6221.88718.950525.27850.2320.81740.41240.4124
5620.2821.895718.74925.57060.19440.75190.47990.4209
5720.7921.894718.545625.84860.2920.78830.54630.4262
5822.8621.894818.358626.11210.32690.69620.76790.4308
5922.5921.894818.183426.36380.38020.3360.7120.4346
6023.2921.894818.018326.60530.28080.38620.74920.438
6121.8721.894817.862126.8380.49610.29010.66930.4409
6221.5221.894817.713527.06310.44350.50380.35720.4434
632221.894817.571727.28150.48470.55420.40020.4457







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
520.0416-0.005800.016600
530.0562-0.01360.00970.08980.05320.2306
540.0684-0.07470.03142.69450.93360.9663
550.0791-0.05790.0381.60531.10161.0496
560.0856-0.07380.04522.61051.40341.1846
570.0921-0.05050.04611.22041.37291.1717
580.09830.04410.04580.93161.30981.1445
590.10410.03180.0440.48331.20651.0984
600.10980.06370.04621.94661.28871.1352
610.1152-0.00110.04176e-041.15991.077
620.1204-0.01710.03950.14051.06721.0331
630.12550.00480.03660.01110.97920.9896

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
52 & 0.0416 & -0.0058 & 0 & 0.0166 & 0 & 0 \tabularnewline
53 & 0.0562 & -0.0136 & 0.0097 & 0.0898 & 0.0532 & 0.2306 \tabularnewline
54 & 0.0684 & -0.0747 & 0.0314 & 2.6945 & 0.9336 & 0.9663 \tabularnewline
55 & 0.0791 & -0.0579 & 0.038 & 1.6053 & 1.1016 & 1.0496 \tabularnewline
56 & 0.0856 & -0.0738 & 0.0452 & 2.6105 & 1.4034 & 1.1846 \tabularnewline
57 & 0.0921 & -0.0505 & 0.0461 & 1.2204 & 1.3729 & 1.1717 \tabularnewline
58 & 0.0983 & 0.0441 & 0.0458 & 0.9316 & 1.3098 & 1.1445 \tabularnewline
59 & 0.1041 & 0.0318 & 0.044 & 0.4833 & 1.2065 & 1.0984 \tabularnewline
60 & 0.1098 & 0.0637 & 0.0462 & 1.9466 & 1.2887 & 1.1352 \tabularnewline
61 & 0.1152 & -0.0011 & 0.0417 & 6e-04 & 1.1599 & 1.077 \tabularnewline
62 & 0.1204 & -0.0171 & 0.0395 & 0.1405 & 1.0672 & 1.0331 \tabularnewline
63 & 0.1255 & 0.0048 & 0.0366 & 0.0111 & 0.9792 & 0.9896 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202695&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]52[/C][C]0.0416[/C][C]-0.0058[/C][C]0[/C][C]0.0166[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]53[/C][C]0.0562[/C][C]-0.0136[/C][C]0.0097[/C][C]0.0898[/C][C]0.0532[/C][C]0.2306[/C][/ROW]
[ROW][C]54[/C][C]0.0684[/C][C]-0.0747[/C][C]0.0314[/C][C]2.6945[/C][C]0.9336[/C][C]0.9663[/C][/ROW]
[ROW][C]55[/C][C]0.0791[/C][C]-0.0579[/C][C]0.038[/C][C]1.6053[/C][C]1.1016[/C][C]1.0496[/C][/ROW]
[ROW][C]56[/C][C]0.0856[/C][C]-0.0738[/C][C]0.0452[/C][C]2.6105[/C][C]1.4034[/C][C]1.1846[/C][/ROW]
[ROW][C]57[/C][C]0.0921[/C][C]-0.0505[/C][C]0.0461[/C][C]1.2204[/C][C]1.3729[/C][C]1.1717[/C][/ROW]
[ROW][C]58[/C][C]0.0983[/C][C]0.0441[/C][C]0.0458[/C][C]0.9316[/C][C]1.3098[/C][C]1.1445[/C][/ROW]
[ROW][C]59[/C][C]0.1041[/C][C]0.0318[/C][C]0.044[/C][C]0.4833[/C][C]1.2065[/C][C]1.0984[/C][/ROW]
[ROW][C]60[/C][C]0.1098[/C][C]0.0637[/C][C]0.0462[/C][C]1.9466[/C][C]1.2887[/C][C]1.1352[/C][/ROW]
[ROW][C]61[/C][C]0.1152[/C][C]-0.0011[/C][C]0.0417[/C][C]6e-04[/C][C]1.1599[/C][C]1.077[/C][/ROW]
[ROW][C]62[/C][C]0.1204[/C][C]-0.0171[/C][C]0.0395[/C][C]0.1405[/C][C]1.0672[/C][C]1.0331[/C][/ROW]
[ROW][C]63[/C][C]0.1255[/C][C]0.0048[/C][C]0.0366[/C][C]0.0111[/C][C]0.9792[/C][C]0.9896[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202695&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202695&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
520.0416-0.005800.016600
530.0562-0.01360.00970.08980.05320.2306
540.0684-0.07470.03142.69450.93360.9663
550.0791-0.05790.0381.60531.10161.0496
560.0856-0.07380.04522.61051.40341.1846
570.0921-0.05050.04611.22041.37291.1717
580.09830.04410.04580.93161.30981.1445
590.10410.03180.0440.48331.20651.0984
600.10980.06370.04621.94661.28871.1352
610.1152-0.00110.04176e-041.15991.077
620.1204-0.01710.03950.14051.06721.0331
630.12550.00480.03660.01110.97920.9896



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