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 computationSat, 25 Dec 2010 18:52:58 +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/25/t12933035209e16m16xatyprp7.htm/, Retrieved Sun, 28 Apr 2024 22:56:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115438, Retrieved Sun, 28 Apr 2024 22:56:38 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact119
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2010-12-25 18:52:58] [b7dd4adfab743bef2d672ff51f950617] [Current]
Feedback Forum

Post a new message
Dataseries X:
186448
190530
194207
190855
200779
204428
207617
212071
214239
215883
223484
221529
225247
226699
231406
232324
237192
236727
240698
240688
245283
243556
247826
245798
250479
249216
251896
247616
249994
246552
248771
247551
249745
245742
249019
245841
248771
244723
246878
246014
248496
244351
248016
246509
249426
247840
251035
250161
254278
250801
253985
249174
251287
247947
249992
243805
255812
250417
253033
248705
253950
251484
251093
245996
252721
248019
250464
245571
252690
250183
253639
254436
265280
268705
270643
271480




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115438&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[64])
60248705-------
61253950-------
62251484-------
63251093-------
64245996-------
65252721253210.8849248981.0455257440.72430.41020.99960.3660.9996
66248019248543.0861243212.2803253873.89180.42360.06230.13980.8255
67250464249635.4513243248.6033256022.29920.39960.69010.32730.868
68245571245064.3915236939.2722253189.51080.45140.09640.41110.4111
69252690251350.3193240892.2664261808.37220.40090.86060.39860.8422
70250183247458.0182235229.2974259686.7390.33110.20090.46420.5926
71253639248556.3935234479.2065262633.58040.23960.41040.39530.6393
72254436243645.2447227738.963259551.52630.09180.10910.40620.386
73265280250299.9038231774.2428268825.56480.05650.33080.40020.6756
74268705246320.4211225613.3171267027.52510.01710.03640.35730.5122
75270643247315.9921224537.2514270094.73290.02240.03290.29320.5452
76271480242565.5127217601.8417267529.18380.01160.01370.17570.3938

\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[64]) \tabularnewline
60 & 248705 & - & - & - & - & - & - & - \tabularnewline
61 & 253950 & - & - & - & - & - & - & - \tabularnewline
62 & 251484 & - & - & - & - & - & - & - \tabularnewline
63 & 251093 & - & - & - & - & - & - & - \tabularnewline
64 & 245996 & - & - & - & - & - & - & - \tabularnewline
65 & 252721 & 253210.8849 & 248981.0455 & 257440.7243 & 0.4102 & 0.9996 & 0.366 & 0.9996 \tabularnewline
66 & 248019 & 248543.0861 & 243212.2803 & 253873.8918 & 0.4236 & 0.0623 & 0.1398 & 0.8255 \tabularnewline
67 & 250464 & 249635.4513 & 243248.6033 & 256022.2992 & 0.3996 & 0.6901 & 0.3273 & 0.868 \tabularnewline
68 & 245571 & 245064.3915 & 236939.2722 & 253189.5108 & 0.4514 & 0.0964 & 0.4111 & 0.4111 \tabularnewline
69 & 252690 & 251350.3193 & 240892.2664 & 261808.3722 & 0.4009 & 0.8606 & 0.3986 & 0.8422 \tabularnewline
70 & 250183 & 247458.0182 & 235229.2974 & 259686.739 & 0.3311 & 0.2009 & 0.4642 & 0.5926 \tabularnewline
71 & 253639 & 248556.3935 & 234479.2065 & 262633.5804 & 0.2396 & 0.4104 & 0.3953 & 0.6393 \tabularnewline
72 & 254436 & 243645.2447 & 227738.963 & 259551.5263 & 0.0918 & 0.1091 & 0.4062 & 0.386 \tabularnewline
73 & 265280 & 250299.9038 & 231774.2428 & 268825.5648 & 0.0565 & 0.3308 & 0.4002 & 0.6756 \tabularnewline
74 & 268705 & 246320.4211 & 225613.3171 & 267027.5251 & 0.0171 & 0.0364 & 0.3573 & 0.5122 \tabularnewline
75 & 270643 & 247315.9921 & 224537.2514 & 270094.7329 & 0.0224 & 0.0329 & 0.2932 & 0.5452 \tabularnewline
76 & 271480 & 242565.5127 & 217601.8417 & 267529.1838 & 0.0116 & 0.0137 & 0.1757 & 0.3938 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115438&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[64])[/C][/ROW]
[ROW][C]60[/C][C]248705[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]253950[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]251484[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]251093[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]245996[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]252721[/C][C]253210.8849[/C][C]248981.0455[/C][C]257440.7243[/C][C]0.4102[/C][C]0.9996[/C][C]0.366[/C][C]0.9996[/C][/ROW]
[ROW][C]66[/C][C]248019[/C][C]248543.0861[/C][C]243212.2803[/C][C]253873.8918[/C][C]0.4236[/C][C]0.0623[/C][C]0.1398[/C][C]0.8255[/C][/ROW]
[ROW][C]67[/C][C]250464[/C][C]249635.4513[/C][C]243248.6033[/C][C]256022.2992[/C][C]0.3996[/C][C]0.6901[/C][C]0.3273[/C][C]0.868[/C][/ROW]
[ROW][C]68[/C][C]245571[/C][C]245064.3915[/C][C]236939.2722[/C][C]253189.5108[/C][C]0.4514[/C][C]0.0964[/C][C]0.4111[/C][C]0.4111[/C][/ROW]
[ROW][C]69[/C][C]252690[/C][C]251350.3193[/C][C]240892.2664[/C][C]261808.3722[/C][C]0.4009[/C][C]0.8606[/C][C]0.3986[/C][C]0.8422[/C][/ROW]
[ROW][C]70[/C][C]250183[/C][C]247458.0182[/C][C]235229.2974[/C][C]259686.739[/C][C]0.3311[/C][C]0.2009[/C][C]0.4642[/C][C]0.5926[/C][/ROW]
[ROW][C]71[/C][C]253639[/C][C]248556.3935[/C][C]234479.2065[/C][C]262633.5804[/C][C]0.2396[/C][C]0.4104[/C][C]0.3953[/C][C]0.6393[/C][/ROW]
[ROW][C]72[/C][C]254436[/C][C]243645.2447[/C][C]227738.963[/C][C]259551.5263[/C][C]0.0918[/C][C]0.1091[/C][C]0.4062[/C][C]0.386[/C][/ROW]
[ROW][C]73[/C][C]265280[/C][C]250299.9038[/C][C]231774.2428[/C][C]268825.5648[/C][C]0.0565[/C][C]0.3308[/C][C]0.4002[/C][C]0.6756[/C][/ROW]
[ROW][C]74[/C][C]268705[/C][C]246320.4211[/C][C]225613.3171[/C][C]267027.5251[/C][C]0.0171[/C][C]0.0364[/C][C]0.3573[/C][C]0.5122[/C][/ROW]
[ROW][C]75[/C][C]270643[/C][C]247315.9921[/C][C]224537.2514[/C][C]270094.7329[/C][C]0.0224[/C][C]0.0329[/C][C]0.2932[/C][C]0.5452[/C][/ROW]
[ROW][C]76[/C][C]271480[/C][C]242565.5127[/C][C]217601.8417[/C][C]267529.1838[/C][C]0.0116[/C][C]0.0137[/C][C]0.1757[/C][C]0.3938[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115438&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115438&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[64])
60248705-------
61253950-------
62251484-------
63251093-------
64245996-------
65252721253210.8849248981.0455257440.72430.41020.99960.3660.9996
66248019248543.0861243212.2803253873.89180.42360.06230.13980.8255
67250464249635.4513243248.6033256022.29920.39960.69010.32730.868
68245571245064.3915236939.2722253189.51080.45140.09640.41110.4111
69252690251350.3193240892.2664261808.37220.40090.86060.39860.8422
70250183247458.0182235229.2974259686.7390.33110.20090.46420.5926
71253639248556.3935234479.2065262633.58040.23960.41040.39530.6393
72254436243645.2447227738.963259551.52630.09180.10910.40620.386
73265280250299.9038231774.2428268825.56480.05650.33080.40020.6756
74268705246320.4211225613.3171267027.52510.01710.03640.35730.5122
75270643247315.9921224537.2514270094.73290.02240.03290.29320.5452
76271480242565.5127217601.8417267529.18380.01160.01370.17570.3938







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
650.0085-0.00190239987.201900
660.0109-0.00210.002274666.1878257326.6949507.2738
670.01310.00330.0025686493.0281400382.1393632.7576
680.01690.00210.0024256652.1724364449.6476603.6967
690.02120.00530.0031794744.3548650508.589806.5411
700.02520.0110.00437425525.93081779678.1461334.0458
710.02890.02040.006625832889.33485215851.17292283.8238
720.03330.04430.0113116440400.568719118919.84744372.5187
730.03780.05980.0167224403280.742841928293.28026475.206
740.04290.09090.0241501069372.40587842401.19279372.4277
750.0470.09430.0305544149296.11129324846.185211372.1083
760.05250.11920.0379836047572.9789188218406.751313719.2714

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
65 & 0.0085 & -0.0019 & 0 & 239987.2019 & 0 & 0 \tabularnewline
66 & 0.0109 & -0.0021 & 0.002 & 274666.1878 & 257326.6949 & 507.2738 \tabularnewline
67 & 0.0131 & 0.0033 & 0.0025 & 686493.0281 & 400382.1393 & 632.7576 \tabularnewline
68 & 0.0169 & 0.0021 & 0.0024 & 256652.1724 & 364449.6476 & 603.6967 \tabularnewline
69 & 0.0212 & 0.0053 & 0.003 & 1794744.3548 & 650508.589 & 806.5411 \tabularnewline
70 & 0.0252 & 0.011 & 0.0043 & 7425525.9308 & 1779678.146 & 1334.0458 \tabularnewline
71 & 0.0289 & 0.0204 & 0.0066 & 25832889.3348 & 5215851.1729 & 2283.8238 \tabularnewline
72 & 0.0333 & 0.0443 & 0.0113 & 116440400.5687 & 19118919.8474 & 4372.5187 \tabularnewline
73 & 0.0378 & 0.0598 & 0.0167 & 224403280.7428 & 41928293.2802 & 6475.206 \tabularnewline
74 & 0.0429 & 0.0909 & 0.0241 & 501069372.405 & 87842401.1927 & 9372.4277 \tabularnewline
75 & 0.047 & 0.0943 & 0.0305 & 544149296.11 & 129324846.1852 & 11372.1083 \tabularnewline
76 & 0.0525 & 0.1192 & 0.0379 & 836047572.9789 & 188218406.7513 & 13719.2714 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115438&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]65[/C][C]0.0085[/C][C]-0.0019[/C][C]0[/C][C]239987.2019[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]66[/C][C]0.0109[/C][C]-0.0021[/C][C]0.002[/C][C]274666.1878[/C][C]257326.6949[/C][C]507.2738[/C][/ROW]
[ROW][C]67[/C][C]0.0131[/C][C]0.0033[/C][C]0.0025[/C][C]686493.0281[/C][C]400382.1393[/C][C]632.7576[/C][/ROW]
[ROW][C]68[/C][C]0.0169[/C][C]0.0021[/C][C]0.0024[/C][C]256652.1724[/C][C]364449.6476[/C][C]603.6967[/C][/ROW]
[ROW][C]69[/C][C]0.0212[/C][C]0.0053[/C][C]0.003[/C][C]1794744.3548[/C][C]650508.589[/C][C]806.5411[/C][/ROW]
[ROW][C]70[/C][C]0.0252[/C][C]0.011[/C][C]0.0043[/C][C]7425525.9308[/C][C]1779678.146[/C][C]1334.0458[/C][/ROW]
[ROW][C]71[/C][C]0.0289[/C][C]0.0204[/C][C]0.0066[/C][C]25832889.3348[/C][C]5215851.1729[/C][C]2283.8238[/C][/ROW]
[ROW][C]72[/C][C]0.0333[/C][C]0.0443[/C][C]0.0113[/C][C]116440400.5687[/C][C]19118919.8474[/C][C]4372.5187[/C][/ROW]
[ROW][C]73[/C][C]0.0378[/C][C]0.0598[/C][C]0.0167[/C][C]224403280.7428[/C][C]41928293.2802[/C][C]6475.206[/C][/ROW]
[ROW][C]74[/C][C]0.0429[/C][C]0.0909[/C][C]0.0241[/C][C]501069372.405[/C][C]87842401.1927[/C][C]9372.4277[/C][/ROW]
[ROW][C]75[/C][C]0.047[/C][C]0.0943[/C][C]0.0305[/C][C]544149296.11[/C][C]129324846.1852[/C][C]11372.1083[/C][/ROW]
[ROW][C]76[/C][C]0.0525[/C][C]0.1192[/C][C]0.0379[/C][C]836047572.9789[/C][C]188218406.7513[/C][C]13719.2714[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115438&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115438&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
650.0085-0.00190239987.201900
660.0109-0.00210.002274666.1878257326.6949507.2738
670.01310.00330.0025686493.0281400382.1393632.7576
680.01690.00210.0024256652.1724364449.6476603.6967
690.02120.00530.0031794744.3548650508.589806.5411
700.02520.0110.00437425525.93081779678.1461334.0458
710.02890.02040.006625832889.33485215851.17292283.8238
720.03330.04430.0113116440400.568719118919.84744372.5187
730.03780.05980.0167224403280.742841928293.28026475.206
740.04290.09090.0241501069372.40587842401.19279372.4277
750.0470.09430.0305544149296.11129324846.185211372.1083
760.05250.11920.0379836047572.9789188218406.751313719.2714



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