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, 16 Dec 2010 20:46:32 +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/16/t1292532946psww3l32ozqc7e7.htm/, Retrieved Fri, 03 May 2024 04:04:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111284, Retrieved Fri, 03 May 2024 04:04:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact172
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2008-12-08 19:22:39] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMPD    [ARIMA Forecasting] [] [2010-12-16 20:46:32] [40b262140b988d7b8204c4955f8b7651] [Current]
Feedback Forum

Post a new message
Dataseries X:
-2.0
2.6
0.2
0.1
-0.1
0.1
-1.6
2.3
-0.3
0.0
0.1
0.4
-1.9
2.4
0.0
0.4
0.1
0.2
-1.3
2.1
-0.1
0.3
0.3
0.2
-1.9
2.7
0.0
-0.2
0.2
0.1
-1.5
2.1
-0.3
-0.2
0.2
0.3
-2.0
2.6
0.0
0.5
-0.1
0.2
-1.6
2.1
-0.2
0.0
0.2
0.2
-2.2
2.7
-0.3
0.4
-0.1
0.0
-1.6
2.2
-0.3
0.0
0.1
0.1
-1.9
2.5
0.1
-0.1
0.3
0.1
-1.9
2.5
-0.3
0.2
0.2
0.1
-2.4
3.1
-0.3
0.2
0.1
0.2
-1.8
2.4
-0.4
0.0
0.0
0.2
-2.4
3.2
0.0
0.1
0.1
0.1
-1.8
2.5
-0.6
0.0
0.0
0.4
-2.5
3.1
0.2
-0.3
0.3
0.4
-1.8
2.6
-0.3
0.3
0.0
0.4
-2.9
3.6
-0.1
0.3
0.0
0.3
-2.1
2.6
-0.2
0.0
-0.2
0.3
-3.1
3.4
-0.1
0.1
0.3
0.1
-2.5
3.1
-0.1
0.1
0.0




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111284&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'George Udny Yule' @ 72.249.76.132







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[121])
109-2.9-------
1103.6-------
111-0.1-------
1120.3-------
1130-------
1140.3-------
115-2.1-------
1162.6-------
117-0.2-------
1180-------
119-0.2-------
1200.3-------
121-3.1-------
1223.43.49353.10963.87730.316510.29331
123-0.1-0.0017-0.41150.40810.319100.68091
1240.10.011-0.40230.42430.33640.70070.08521
1250.30.1472-0.26660.56090.23460.58840.75721
1260.10.3547-0.05910.76850.11390.60220.60221
127-2.5-1.946-2.3598-1.53220.004300.76711
1283.12.60042.18663.01420.00910.50081
129-0.1-0.2519-0.66570.1620.23600.4031
1300.10.1552-0.25860.5690.39690.88660.76881
1310-0.0966-0.51040.31720.32360.17590.68781

\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[121]) \tabularnewline
109 & -2.9 & - & - & - & - & - & - & - \tabularnewline
110 & 3.6 & - & - & - & - & - & - & - \tabularnewline
111 & -0.1 & - & - & - & - & - & - & - \tabularnewline
112 & 0.3 & - & - & - & - & - & - & - \tabularnewline
113 & 0 & - & - & - & - & - & - & - \tabularnewline
114 & 0.3 & - & - & - & - & - & - & - \tabularnewline
115 & -2.1 & - & - & - & - & - & - & - \tabularnewline
116 & 2.6 & - & - & - & - & - & - & - \tabularnewline
117 & -0.2 & - & - & - & - & - & - & - \tabularnewline
118 & 0 & - & - & - & - & - & - & - \tabularnewline
119 & -0.2 & - & - & - & - & - & - & - \tabularnewline
120 & 0.3 & - & - & - & - & - & - & - \tabularnewline
121 & -3.1 & - & - & - & - & - & - & - \tabularnewline
122 & 3.4 & 3.4935 & 3.1096 & 3.8773 & 0.3165 & 1 & 0.2933 & 1 \tabularnewline
123 & -0.1 & -0.0017 & -0.4115 & 0.4081 & 0.3191 & 0 & 0.6809 & 1 \tabularnewline
124 & 0.1 & 0.011 & -0.4023 & 0.4243 & 0.3364 & 0.7007 & 0.0852 & 1 \tabularnewline
125 & 0.3 & 0.1472 & -0.2666 & 0.5609 & 0.2346 & 0.5884 & 0.7572 & 1 \tabularnewline
126 & 0.1 & 0.3547 & -0.0591 & 0.7685 & 0.1139 & 0.6022 & 0.6022 & 1 \tabularnewline
127 & -2.5 & -1.946 & -2.3598 & -1.5322 & 0.0043 & 0 & 0.7671 & 1 \tabularnewline
128 & 3.1 & 2.6004 & 2.1866 & 3.0142 & 0.009 & 1 & 0.5008 & 1 \tabularnewline
129 & -0.1 & -0.2519 & -0.6657 & 0.162 & 0.236 & 0 & 0.403 & 1 \tabularnewline
130 & 0.1 & 0.1552 & -0.2586 & 0.569 & 0.3969 & 0.8866 & 0.7688 & 1 \tabularnewline
131 & 0 & -0.0966 & -0.5104 & 0.3172 & 0.3236 & 0.1759 & 0.6878 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111284&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[121])[/C][/ROW]
[ROW][C]109[/C][C]-2.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]3.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]-0.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]0.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]0[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]0.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]-2.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]2.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]-0.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]0[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]-0.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]0.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]-3.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]122[/C][C]3.4[/C][C]3.4935[/C][C]3.1096[/C][C]3.8773[/C][C]0.3165[/C][C]1[/C][C]0.2933[/C][C]1[/C][/ROW]
[ROW][C]123[/C][C]-0.1[/C][C]-0.0017[/C][C]-0.4115[/C][C]0.4081[/C][C]0.3191[/C][C]0[/C][C]0.6809[/C][C]1[/C][/ROW]
[ROW][C]124[/C][C]0.1[/C][C]0.011[/C][C]-0.4023[/C][C]0.4243[/C][C]0.3364[/C][C]0.7007[/C][C]0.0852[/C][C]1[/C][/ROW]
[ROW][C]125[/C][C]0.3[/C][C]0.1472[/C][C]-0.2666[/C][C]0.5609[/C][C]0.2346[/C][C]0.5884[/C][C]0.7572[/C][C]1[/C][/ROW]
[ROW][C]126[/C][C]0.1[/C][C]0.3547[/C][C]-0.0591[/C][C]0.7685[/C][C]0.1139[/C][C]0.6022[/C][C]0.6022[/C][C]1[/C][/ROW]
[ROW][C]127[/C][C]-2.5[/C][C]-1.946[/C][C]-2.3598[/C][C]-1.5322[/C][C]0.0043[/C][C]0[/C][C]0.7671[/C][C]1[/C][/ROW]
[ROW][C]128[/C][C]3.1[/C][C]2.6004[/C][C]2.1866[/C][C]3.0142[/C][C]0.009[/C][C]1[/C][C]0.5008[/C][C]1[/C][/ROW]
[ROW][C]129[/C][C]-0.1[/C][C]-0.2519[/C][C]-0.6657[/C][C]0.162[/C][C]0.236[/C][C]0[/C][C]0.403[/C][C]1[/C][/ROW]
[ROW][C]130[/C][C]0.1[/C][C]0.1552[/C][C]-0.2586[/C][C]0.569[/C][C]0.3969[/C][C]0.8866[/C][C]0.7688[/C][C]1[/C][/ROW]
[ROW][C]131[/C][C]0[/C][C]-0.0966[/C][C]-0.5104[/C][C]0.3172[/C][C]0.3236[/C][C]0.1759[/C][C]0.6878[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111284&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111284&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[121])
109-2.9-------
1103.6-------
111-0.1-------
1120.3-------
1130-------
1140.3-------
115-2.1-------
1162.6-------
117-0.2-------
1180-------
119-0.2-------
1200.3-------
121-3.1-------
1223.43.49353.10963.87730.316510.29331
123-0.1-0.0017-0.41150.40810.319100.68091
1240.10.011-0.40230.42430.33640.70070.08521
1250.30.1472-0.26660.56090.23460.58840.75721
1260.10.3547-0.05910.76850.11390.60220.60221
127-2.5-1.946-2.3598-1.53220.004300.76711
1283.12.60042.18663.01420.00910.50081
129-0.1-0.2519-0.66570.1620.23600.4031
1300.10.1552-0.25860.5690.39690.88660.76881
1310-0.0966-0.51040.31720.32360.17590.68781







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1220.0561-0.026800.008700
123-123.657858.146829.08680.00970.00920.0959
12419.19778.104922.09280.00790.00880.0937
1251.43421.038216.82920.02340.01240.1114
1260.5953-0.718113.60690.06490.02290.1514
127-0.10850.284711.38660.30690.07020.265
1280.08120.19219.78740.24960.09590.3096
129-0.8383-0.6038.63930.02310.08680.2946
1301.3606-0.35567.71890.0030.07750.2783
131-2.1856-17.0470.00930.07060.2658

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
122 & 0.0561 & -0.0268 & 0 & 0.0087 & 0 & 0 \tabularnewline
123 & -123.6578 & 58.1468 & 29.0868 & 0.0097 & 0.0092 & 0.0959 \tabularnewline
124 & 19.1977 & 8.1049 & 22.0928 & 0.0079 & 0.0088 & 0.0937 \tabularnewline
125 & 1.4342 & 1.0382 & 16.8292 & 0.0234 & 0.0124 & 0.1114 \tabularnewline
126 & 0.5953 & -0.7181 & 13.6069 & 0.0649 & 0.0229 & 0.1514 \tabularnewline
127 & -0.1085 & 0.2847 & 11.3866 & 0.3069 & 0.0702 & 0.265 \tabularnewline
128 & 0.0812 & 0.1921 & 9.7874 & 0.2496 & 0.0959 & 0.3096 \tabularnewline
129 & -0.8383 & -0.603 & 8.6393 & 0.0231 & 0.0868 & 0.2946 \tabularnewline
130 & 1.3606 & -0.3556 & 7.7189 & 0.003 & 0.0775 & 0.2783 \tabularnewline
131 & -2.1856 & -1 & 7.047 & 0.0093 & 0.0706 & 0.2658 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111284&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]122[/C][C]0.0561[/C][C]-0.0268[/C][C]0[/C][C]0.0087[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]123[/C][C]-123.6578[/C][C]58.1468[/C][C]29.0868[/C][C]0.0097[/C][C]0.0092[/C][C]0.0959[/C][/ROW]
[ROW][C]124[/C][C]19.1977[/C][C]8.1049[/C][C]22.0928[/C][C]0.0079[/C][C]0.0088[/C][C]0.0937[/C][/ROW]
[ROW][C]125[/C][C]1.4342[/C][C]1.0382[/C][C]16.8292[/C][C]0.0234[/C][C]0.0124[/C][C]0.1114[/C][/ROW]
[ROW][C]126[/C][C]0.5953[/C][C]-0.7181[/C][C]13.6069[/C][C]0.0649[/C][C]0.0229[/C][C]0.1514[/C][/ROW]
[ROW][C]127[/C][C]-0.1085[/C][C]0.2847[/C][C]11.3866[/C][C]0.3069[/C][C]0.0702[/C][C]0.265[/C][/ROW]
[ROW][C]128[/C][C]0.0812[/C][C]0.1921[/C][C]9.7874[/C][C]0.2496[/C][C]0.0959[/C][C]0.3096[/C][/ROW]
[ROW][C]129[/C][C]-0.8383[/C][C]-0.603[/C][C]8.6393[/C][C]0.0231[/C][C]0.0868[/C][C]0.2946[/C][/ROW]
[ROW][C]130[/C][C]1.3606[/C][C]-0.3556[/C][C]7.7189[/C][C]0.003[/C][C]0.0775[/C][C]0.2783[/C][/ROW]
[ROW][C]131[/C][C]-2.1856[/C][C]-1[/C][C]7.047[/C][C]0.0093[/C][C]0.0706[/C][C]0.2658[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111284&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111284&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
1220.0561-0.026800.008700
123-123.657858.146829.08680.00970.00920.0959
12419.19778.104922.09280.00790.00880.0937
1251.43421.038216.82920.02340.01240.1114
1260.5953-0.718113.60690.06490.02290.1514
127-0.10850.284711.38660.30690.07020.265
1280.08120.19219.78740.24960.09590.3096
129-0.8383-0.6038.63930.02310.08680.2946
1301.3606-0.35567.71890.0030.07750.2783
131-2.1856-17.0470.00930.07060.2658



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