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 computationFri, 11 Dec 2009 06:41:26 -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/11/t1260540146gu1g63chnyg7emn.htm/, Retrieved Sun, 28 Apr 2024 20:33:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66203, Retrieved Sun, 28 Apr 2024 20:33:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact111
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2009-12-11 13:41:26] [c588bf81b9040ce04d6292d0d83341a9] [Current]
Feedback Forum

Post a new message
Dataseries X:
22
22
20
21
20
21
21
21
19
21
21
22
19
24
22
22
22
24
22
23
24
21
20
22
23
23
22
20
21
21
20
20
17
18
19
19
20
21
20
21
19
22
20
18
16
17
18
19
18
20
21
18
19
19
19
21
19
19
17
16
16
17
16
15
16
16
16
18
19
16
16
16




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66203&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 time1 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[60])
4819-------
4918-------
5020-------
5121-------
5218-------
5319-------
5419-------
5519-------
5621-------
5719-------
5819-------
5917-------
6016-------
611616.03112.825919.23610.49240.50760.11430.5076
621715.965911.433120.49860.32740.49410.04050.4941
631615.934910.383421.48630.49080.35340.03690.4908
641516.03019.619822.44040.37640.50370.27350.5037
6516168.833123.16690.50.60780.2060.5
661615.99698.14623.84790.49970.49970.22670.4997
671615.9997.51924.4790.49990.49990.2440.4999
681815.9376.871525.00250.32780.49460.13680.4946
691916.00326.387825.61870.27060.3420.27060.5003
701616.00225.866626.13770.49980.28110.28110.5002
711616.06525.43526.69550.49520.50480.43160.5048
721616.09634.993327.19920.49320.50680.50680.5068

\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[60]) \tabularnewline
48 & 19 & - & - & - & - & - & - & - \tabularnewline
49 & 18 & - & - & - & - & - & - & - \tabularnewline
50 & 20 & - & - & - & - & - & - & - \tabularnewline
51 & 21 & - & - & - & - & - & - & - \tabularnewline
52 & 18 & - & - & - & - & - & - & - \tabularnewline
53 & 19 & - & - & - & - & - & - & - \tabularnewline
54 & 19 & - & - & - & - & - & - & - \tabularnewline
55 & 19 & - & - & - & - & - & - & - \tabularnewline
56 & 21 & - & - & - & - & - & - & - \tabularnewline
57 & 19 & - & - & - & - & - & - & - \tabularnewline
58 & 19 & - & - & - & - & - & - & - \tabularnewline
59 & 17 & - & - & - & - & - & - & - \tabularnewline
60 & 16 & - & - & - & - & - & - & - \tabularnewline
61 & 16 & 16.031 & 12.8259 & 19.2361 & 0.4924 & 0.5076 & 0.1143 & 0.5076 \tabularnewline
62 & 17 & 15.9659 & 11.4331 & 20.4986 & 0.3274 & 0.4941 & 0.0405 & 0.4941 \tabularnewline
63 & 16 & 15.9349 & 10.3834 & 21.4863 & 0.4908 & 0.3534 & 0.0369 & 0.4908 \tabularnewline
64 & 15 & 16.0301 & 9.6198 & 22.4404 & 0.3764 & 0.5037 & 0.2735 & 0.5037 \tabularnewline
65 & 16 & 16 & 8.8331 & 23.1669 & 0.5 & 0.6078 & 0.206 & 0.5 \tabularnewline
66 & 16 & 15.9969 & 8.146 & 23.8479 & 0.4997 & 0.4997 & 0.2267 & 0.4997 \tabularnewline
67 & 16 & 15.999 & 7.519 & 24.479 & 0.4999 & 0.4999 & 0.244 & 0.4999 \tabularnewline
68 & 18 & 15.937 & 6.8715 & 25.0025 & 0.3278 & 0.4946 & 0.1368 & 0.4946 \tabularnewline
69 & 19 & 16.0032 & 6.3878 & 25.6187 & 0.2706 & 0.342 & 0.2706 & 0.5003 \tabularnewline
70 & 16 & 16.0022 & 5.8666 & 26.1377 & 0.4998 & 0.2811 & 0.2811 & 0.5002 \tabularnewline
71 & 16 & 16.0652 & 5.435 & 26.6955 & 0.4952 & 0.5048 & 0.4316 & 0.5048 \tabularnewline
72 & 16 & 16.0963 & 4.9933 & 27.1992 & 0.4932 & 0.5068 & 0.5068 & 0.5068 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66203&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[60])[/C][/ROW]
[ROW][C]48[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]20[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]16[/C][C]16.031[/C][C]12.8259[/C][C]19.2361[/C][C]0.4924[/C][C]0.5076[/C][C]0.1143[/C][C]0.5076[/C][/ROW]
[ROW][C]62[/C][C]17[/C][C]15.9659[/C][C]11.4331[/C][C]20.4986[/C][C]0.3274[/C][C]0.4941[/C][C]0.0405[/C][C]0.4941[/C][/ROW]
[ROW][C]63[/C][C]16[/C][C]15.9349[/C][C]10.3834[/C][C]21.4863[/C][C]0.4908[/C][C]0.3534[/C][C]0.0369[/C][C]0.4908[/C][/ROW]
[ROW][C]64[/C][C]15[/C][C]16.0301[/C][C]9.6198[/C][C]22.4404[/C][C]0.3764[/C][C]0.5037[/C][C]0.2735[/C][C]0.5037[/C][/ROW]
[ROW][C]65[/C][C]16[/C][C]16[/C][C]8.8331[/C][C]23.1669[/C][C]0.5[/C][C]0.6078[/C][C]0.206[/C][C]0.5[/C][/ROW]
[ROW][C]66[/C][C]16[/C][C]15.9969[/C][C]8.146[/C][C]23.8479[/C][C]0.4997[/C][C]0.4997[/C][C]0.2267[/C][C]0.4997[/C][/ROW]
[ROW][C]67[/C][C]16[/C][C]15.999[/C][C]7.519[/C][C]24.479[/C][C]0.4999[/C][C]0.4999[/C][C]0.244[/C][C]0.4999[/C][/ROW]
[ROW][C]68[/C][C]18[/C][C]15.937[/C][C]6.8715[/C][C]25.0025[/C][C]0.3278[/C][C]0.4946[/C][C]0.1368[/C][C]0.4946[/C][/ROW]
[ROW][C]69[/C][C]19[/C][C]16.0032[/C][C]6.3878[/C][C]25.6187[/C][C]0.2706[/C][C]0.342[/C][C]0.2706[/C][C]0.5003[/C][/ROW]
[ROW][C]70[/C][C]16[/C][C]16.0022[/C][C]5.8666[/C][C]26.1377[/C][C]0.4998[/C][C]0.2811[/C][C]0.2811[/C][C]0.5002[/C][/ROW]
[ROW][C]71[/C][C]16[/C][C]16.0652[/C][C]5.435[/C][C]26.6955[/C][C]0.4952[/C][C]0.5048[/C][C]0.4316[/C][C]0.5048[/C][/ROW]
[ROW][C]72[/C][C]16[/C][C]16.0963[/C][C]4.9933[/C][C]27.1992[/C][C]0.4932[/C][C]0.5068[/C][C]0.5068[/C][C]0.5068[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66203&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66203&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[60])
4819-------
4918-------
5020-------
5121-------
5218-------
5319-------
5419-------
5519-------
5621-------
5719-------
5819-------
5917-------
6016-------
611616.03112.825919.23610.49240.50760.11430.5076
621715.965911.433120.49860.32740.49410.04050.4941
631615.934910.383421.48630.49080.35340.03690.4908
641516.03019.619822.44040.37640.50370.27350.5037
6516168.833123.16690.50.60780.2060.5
661615.99698.14623.84790.49970.49970.22670.4997
671615.9997.51924.4790.49990.49990.2440.4999
681815.9376.871525.00250.32780.49460.13680.4946
691916.00326.387825.61870.27060.3420.27060.5003
701616.00225.866626.13770.49980.28110.28110.5002
711616.06525.43526.69550.49520.50480.43160.5048
721616.09634.993327.19920.49320.50680.50680.5068







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.102-0.001900.00100
620.14480.06480.03341.06950.53520.7316
630.17770.00410.02360.00420.35820.5985
640.204-0.06430.03381.0610.53390.7307
650.228500.02700.42710.6536
660.25042e-040.022500.3560.5966
670.27041e-040.019300.30510.5524
680.29020.12940.03314.25610.7990.8939
690.30660.18730.05028.98051.7081.3069
700.3232-1e-040.045201.53721.2399
710.3376-0.00410.04150.00431.39791.1823
720.3519-0.0060.03850.00931.28221.1323

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.102 & -0.0019 & 0 & 0.001 & 0 & 0 \tabularnewline
62 & 0.1448 & 0.0648 & 0.0334 & 1.0695 & 0.5352 & 0.7316 \tabularnewline
63 & 0.1777 & 0.0041 & 0.0236 & 0.0042 & 0.3582 & 0.5985 \tabularnewline
64 & 0.204 & -0.0643 & 0.0338 & 1.061 & 0.5339 & 0.7307 \tabularnewline
65 & 0.2285 & 0 & 0.027 & 0 & 0.4271 & 0.6536 \tabularnewline
66 & 0.2504 & 2e-04 & 0.0225 & 0 & 0.356 & 0.5966 \tabularnewline
67 & 0.2704 & 1e-04 & 0.0193 & 0 & 0.3051 & 0.5524 \tabularnewline
68 & 0.2902 & 0.1294 & 0.0331 & 4.2561 & 0.799 & 0.8939 \tabularnewline
69 & 0.3066 & 0.1873 & 0.0502 & 8.9805 & 1.708 & 1.3069 \tabularnewline
70 & 0.3232 & -1e-04 & 0.0452 & 0 & 1.5372 & 1.2399 \tabularnewline
71 & 0.3376 & -0.0041 & 0.0415 & 0.0043 & 1.3979 & 1.1823 \tabularnewline
72 & 0.3519 & -0.006 & 0.0385 & 0.0093 & 1.2822 & 1.1323 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66203&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]61[/C][C]0.102[/C][C]-0.0019[/C][C]0[/C][C]0.001[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.1448[/C][C]0.0648[/C][C]0.0334[/C][C]1.0695[/C][C]0.5352[/C][C]0.7316[/C][/ROW]
[ROW][C]63[/C][C]0.1777[/C][C]0.0041[/C][C]0.0236[/C][C]0.0042[/C][C]0.3582[/C][C]0.5985[/C][/ROW]
[ROW][C]64[/C][C]0.204[/C][C]-0.0643[/C][C]0.0338[/C][C]1.061[/C][C]0.5339[/C][C]0.7307[/C][/ROW]
[ROW][C]65[/C][C]0.2285[/C][C]0[/C][C]0.027[/C][C]0[/C][C]0.4271[/C][C]0.6536[/C][/ROW]
[ROW][C]66[/C][C]0.2504[/C][C]2e-04[/C][C]0.0225[/C][C]0[/C][C]0.356[/C][C]0.5966[/C][/ROW]
[ROW][C]67[/C][C]0.2704[/C][C]1e-04[/C][C]0.0193[/C][C]0[/C][C]0.3051[/C][C]0.5524[/C][/ROW]
[ROW][C]68[/C][C]0.2902[/C][C]0.1294[/C][C]0.0331[/C][C]4.2561[/C][C]0.799[/C][C]0.8939[/C][/ROW]
[ROW][C]69[/C][C]0.3066[/C][C]0.1873[/C][C]0.0502[/C][C]8.9805[/C][C]1.708[/C][C]1.3069[/C][/ROW]
[ROW][C]70[/C][C]0.3232[/C][C]-1e-04[/C][C]0.0452[/C][C]0[/C][C]1.5372[/C][C]1.2399[/C][/ROW]
[ROW][C]71[/C][C]0.3376[/C][C]-0.0041[/C][C]0.0415[/C][C]0.0043[/C][C]1.3979[/C][C]1.1823[/C][/ROW]
[ROW][C]72[/C][C]0.3519[/C][C]-0.006[/C][C]0.0385[/C][C]0.0093[/C][C]1.2822[/C][C]1.1323[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66203&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66203&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
610.102-0.001900.00100
620.14480.06480.03341.06950.53520.7316
630.17770.00410.02360.00420.35820.5985
640.204-0.06430.03381.0610.53390.7307
650.228500.02700.42710.6536
660.25042e-040.022500.3560.5966
670.27041e-040.019300.30510.5524
680.29020.12940.03314.25610.7990.8939
690.30660.18730.05028.98051.7081.3069
700.3232-1e-040.045201.53721.2399
710.3376-0.00410.04150.00431.39791.1823
720.3519-0.0060.03850.00931.28221.1323



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