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 21:50:34 +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/t1292536129tdm2g6rvfw8l2u8.htm/, Retrieved Fri, 03 May 2024 11:48:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111302, Retrieved Fri, 03 May 2024 11:48:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact117
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 21:50:34] [40b262140b988d7b8204c4955f8b7651] [Current]
Feedback Forum

Post a new message
Dataseries X:
-0.9
1.2
1.4
1.5
1.3
1.4
-0.4
1.9
1.6
1.4
1.3
1.6
1.7
1.5
1.4
1.7
1.9
2.0
2.3
2.0
2.2
2.5
2.8
2.7
2.7
3.0
3.0
2.3
2.4
2.3
2.1
2.2
1.9
1.5
1.4
1.4
1.2
1.1
1.1
1.8
1.5
1.5
1.4
1.4
1.5
1.7
1.7
1.7
1.5
1.7
1.4
1.3
1.3
1.2
1.2
1.3
1.2
1.2
1.1
0.9
1.2
1.0
1.3
0.8
1.2
1.3
1.0
1.3
1.3
1.5
1.6
1.6
1.1
1.7
1.4
1.8
1.6
1.7
1.8
1.7
1.7
1.4
1.2
1.4
1.3
1.4
1.7
1.5
1.5
1.4
1.4
1.5
1.2
1.3
1.3
1.6
1.5
1.4
1.6
1.2
1.4
1.8
1.8
1.9
2.1
2.4
2.4
2.4
1.9
2.4
2.2
2.7
2.4
2.3
2.0
2.0
2.2
1.8
1.7
1.6
1.4
1.2
1.1
1.0
1.3
1.1
0.7
1.1
1.1
1.2
1.4




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 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 & 11 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111302&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]11 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=111302&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111302&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 time11 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[121])
1091.9-------
1102.4-------
1112.2-------
1122.7-------
1132.4-------
1142.3-------
1152-------
1162-------
1172.2-------
1181.8-------
1191.7-------
1201.6-------
1211.4-------
1221.21.35870.74671.97070.30560.44744e-040.4474
1231.11.46830.79632.14030.14140.78310.01640.579
12411.09190.35011.83380.4040.491500.2079
1251.31.27340.43362.11310.47520.73830.00430.3838
1261.11.37980.44682.31280.27830.56660.02660.4831
1270.71.32070.36182.27950.10230.6740.08250.4356
1281.11.51970.43642.60310.22380.9310.19240.5858
1291.11.21160.0972.32610.42220.57780.04110.3702
1301.21.37650.22.5530.38440.67750.24020.4844
1311.41.49910.26492.73320.43750.68260.37480.5625

\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 & 1.9 & - & - & - & - & - & - & - \tabularnewline
110 & 2.4 & - & - & - & - & - & - & - \tabularnewline
111 & 2.2 & - & - & - & - & - & - & - \tabularnewline
112 & 2.7 & - & - & - & - & - & - & - \tabularnewline
113 & 2.4 & - & - & - & - & - & - & - \tabularnewline
114 & 2.3 & - & - & - & - & - & - & - \tabularnewline
115 & 2 & - & - & - & - & - & - & - \tabularnewline
116 & 2 & - & - & - & - & - & - & - \tabularnewline
117 & 2.2 & - & - & - & - & - & - & - \tabularnewline
118 & 1.8 & - & - & - & - & - & - & - \tabularnewline
119 & 1.7 & - & - & - & - & - & - & - \tabularnewline
120 & 1.6 & - & - & - & - & - & - & - \tabularnewline
121 & 1.4 & - & - & - & - & - & - & - \tabularnewline
122 & 1.2 & 1.3587 & 0.7467 & 1.9707 & 0.3056 & 0.4474 & 4e-04 & 0.4474 \tabularnewline
123 & 1.1 & 1.4683 & 0.7963 & 2.1403 & 0.1414 & 0.7831 & 0.0164 & 0.579 \tabularnewline
124 & 1 & 1.0919 & 0.3501 & 1.8338 & 0.404 & 0.4915 & 0 & 0.2079 \tabularnewline
125 & 1.3 & 1.2734 & 0.4336 & 2.1131 & 0.4752 & 0.7383 & 0.0043 & 0.3838 \tabularnewline
126 & 1.1 & 1.3798 & 0.4468 & 2.3128 & 0.2783 & 0.5666 & 0.0266 & 0.4831 \tabularnewline
127 & 0.7 & 1.3207 & 0.3618 & 2.2795 & 0.1023 & 0.674 & 0.0825 & 0.4356 \tabularnewline
128 & 1.1 & 1.5197 & 0.4364 & 2.6031 & 0.2238 & 0.931 & 0.1924 & 0.5858 \tabularnewline
129 & 1.1 & 1.2116 & 0.097 & 2.3261 & 0.4222 & 0.5778 & 0.0411 & 0.3702 \tabularnewline
130 & 1.2 & 1.3765 & 0.2 & 2.553 & 0.3844 & 0.6775 & 0.2402 & 0.4844 \tabularnewline
131 & 1.4 & 1.4991 & 0.2649 & 2.7332 & 0.4375 & 0.6826 & 0.3748 & 0.5625 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111302&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]1.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]2.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]2.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]2.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]2.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]2.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]2.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]1.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]1.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]1.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]1.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]122[/C][C]1.2[/C][C]1.3587[/C][C]0.7467[/C][C]1.9707[/C][C]0.3056[/C][C]0.4474[/C][C]4e-04[/C][C]0.4474[/C][/ROW]
[ROW][C]123[/C][C]1.1[/C][C]1.4683[/C][C]0.7963[/C][C]2.1403[/C][C]0.1414[/C][C]0.7831[/C][C]0.0164[/C][C]0.579[/C][/ROW]
[ROW][C]124[/C][C]1[/C][C]1.0919[/C][C]0.3501[/C][C]1.8338[/C][C]0.404[/C][C]0.4915[/C][C]0[/C][C]0.2079[/C][/ROW]
[ROW][C]125[/C][C]1.3[/C][C]1.2734[/C][C]0.4336[/C][C]2.1131[/C][C]0.4752[/C][C]0.7383[/C][C]0.0043[/C][C]0.3838[/C][/ROW]
[ROW][C]126[/C][C]1.1[/C][C]1.3798[/C][C]0.4468[/C][C]2.3128[/C][C]0.2783[/C][C]0.5666[/C][C]0.0266[/C][C]0.4831[/C][/ROW]
[ROW][C]127[/C][C]0.7[/C][C]1.3207[/C][C]0.3618[/C][C]2.2795[/C][C]0.1023[/C][C]0.674[/C][C]0.0825[/C][C]0.4356[/C][/ROW]
[ROW][C]128[/C][C]1.1[/C][C]1.5197[/C][C]0.4364[/C][C]2.6031[/C][C]0.2238[/C][C]0.931[/C][C]0.1924[/C][C]0.5858[/C][/ROW]
[ROW][C]129[/C][C]1.1[/C][C]1.2116[/C][C]0.097[/C][C]2.3261[/C][C]0.4222[/C][C]0.5778[/C][C]0.0411[/C][C]0.3702[/C][/ROW]
[ROW][C]130[/C][C]1.2[/C][C]1.3765[/C][C]0.2[/C][C]2.553[/C][C]0.3844[/C][C]0.6775[/C][C]0.2402[/C][C]0.4844[/C][/ROW]
[ROW][C]131[/C][C]1.4[/C][C]1.4991[/C][C]0.2649[/C][C]2.7332[/C][C]0.4375[/C][C]0.6826[/C][C]0.3748[/C][C]0.5625[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111302&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111302&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])
1091.9-------
1102.4-------
1112.2-------
1122.7-------
1132.4-------
1142.3-------
1152-------
1162-------
1172.2-------
1181.8-------
1191.7-------
1201.6-------
1211.4-------
1221.21.35870.74671.97070.30560.44744e-040.4474
1231.11.46830.79632.14030.14140.78310.01640.579
12411.09190.35011.83380.4040.491500.2079
1251.31.27340.43362.11310.47520.73830.00430.3838
1261.11.37980.44682.31280.27830.56660.02660.4831
1270.71.32070.36182.27950.10230.6740.08250.4356
1281.11.51970.43642.60310.22380.9310.19240.5858
1291.11.21160.0972.32610.42220.57780.04110.3702
1301.21.37650.22.5530.38440.67750.24020.4844
1311.41.49910.26492.73320.43750.68260.37480.5625







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1220.2298-0.116800.025200
1230.2335-0.25080.18380.13570.08040.2836
1240.3466-0.08420.15060.00850.05640.2375
1250.33650.02090.11827e-040.04250.2062
1260.345-0.20280.13510.07830.04970.2228
1270.3704-0.470.19090.38520.10560.3249
1280.3637-0.27620.20310.17620.11570.3401
1290.4693-0.09210.18920.01240.10280.3206
1300.4361-0.12820.18240.03110.09480.3079
1310.42-0.06610.17080.00980.08630.2938

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
122 & 0.2298 & -0.1168 & 0 & 0.0252 & 0 & 0 \tabularnewline
123 & 0.2335 & -0.2508 & 0.1838 & 0.1357 & 0.0804 & 0.2836 \tabularnewline
124 & 0.3466 & -0.0842 & 0.1506 & 0.0085 & 0.0564 & 0.2375 \tabularnewline
125 & 0.3365 & 0.0209 & 0.1182 & 7e-04 & 0.0425 & 0.2062 \tabularnewline
126 & 0.345 & -0.2028 & 0.1351 & 0.0783 & 0.0497 & 0.2228 \tabularnewline
127 & 0.3704 & -0.47 & 0.1909 & 0.3852 & 0.1056 & 0.3249 \tabularnewline
128 & 0.3637 & -0.2762 & 0.2031 & 0.1762 & 0.1157 & 0.3401 \tabularnewline
129 & 0.4693 & -0.0921 & 0.1892 & 0.0124 & 0.1028 & 0.3206 \tabularnewline
130 & 0.4361 & -0.1282 & 0.1824 & 0.0311 & 0.0948 & 0.3079 \tabularnewline
131 & 0.42 & -0.0661 & 0.1708 & 0.0098 & 0.0863 & 0.2938 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111302&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.2298[/C][C]-0.1168[/C][C]0[/C][C]0.0252[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]123[/C][C]0.2335[/C][C]-0.2508[/C][C]0.1838[/C][C]0.1357[/C][C]0.0804[/C][C]0.2836[/C][/ROW]
[ROW][C]124[/C][C]0.3466[/C][C]-0.0842[/C][C]0.1506[/C][C]0.0085[/C][C]0.0564[/C][C]0.2375[/C][/ROW]
[ROW][C]125[/C][C]0.3365[/C][C]0.0209[/C][C]0.1182[/C][C]7e-04[/C][C]0.0425[/C][C]0.2062[/C][/ROW]
[ROW][C]126[/C][C]0.345[/C][C]-0.2028[/C][C]0.1351[/C][C]0.0783[/C][C]0.0497[/C][C]0.2228[/C][/ROW]
[ROW][C]127[/C][C]0.3704[/C][C]-0.47[/C][C]0.1909[/C][C]0.3852[/C][C]0.1056[/C][C]0.3249[/C][/ROW]
[ROW][C]128[/C][C]0.3637[/C][C]-0.2762[/C][C]0.2031[/C][C]0.1762[/C][C]0.1157[/C][C]0.3401[/C][/ROW]
[ROW][C]129[/C][C]0.4693[/C][C]-0.0921[/C][C]0.1892[/C][C]0.0124[/C][C]0.1028[/C][C]0.3206[/C][/ROW]
[ROW][C]130[/C][C]0.4361[/C][C]-0.1282[/C][C]0.1824[/C][C]0.0311[/C][C]0.0948[/C][C]0.3079[/C][/ROW]
[ROW][C]131[/C][C]0.42[/C][C]-0.0661[/C][C]0.1708[/C][C]0.0098[/C][C]0.0863[/C][C]0.2938[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111302&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111302&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.2298-0.116800.025200
1230.2335-0.25080.18380.13570.08040.2836
1240.3466-0.08420.15060.00850.05640.2375
1250.33650.02090.11827e-040.04250.2062
1260.345-0.20280.13510.07830.04970.2228
1270.3704-0.470.19090.38520.10560.3249
1280.3637-0.27620.20310.17620.11570.3401
1290.4693-0.09210.18920.01240.10280.3206
1300.4361-0.12820.18240.03110.09480.3079
1310.42-0.06610.17080.00980.08630.2938



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