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 computationSun, 12 Dec 2010 16:26:01 +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/12/t1292171050tizc7tey7u8xg9a.htm/, Retrieved Tue, 07 May 2024 14:54:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=108544, Retrieved Tue, 07 May 2024 14:54:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact127
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-20 10:30:19] [ebd107afac1bd6180acb277edd05815b]
- R PD  [ARIMA Forecasting] [ARIMA forecast aa...] [2010-12-11 20:18:57] [04d4386fa51dbd2ef12d0f1f80644886]
-   PD      [ARIMA Forecasting] [ARIMA forecast in...] [2010-12-12 16:26:01] [de8ccb310fbbdc3d90ae577a3e011cf9] [Current]
Feedback Forum

Post a new message
Dataseries X:
16
29
22
30
20
39
18
9,6
10,2
20,2
50
120
19,8
18
3
11
15
27
28
14
5,6
6,5
8,5
87,9
5,8
25,2
7,5
13,7
34
17
9
9,2
5
24
40
86,5
0,54
14
4,8
28
16
5,8
16
9,1
6
17
26
99,6
41
72
23
42
40
18
45
18
2
10
13,6
160




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108544&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108544&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108544&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[48])
3686.5-------
370.54-------
3814-------
394.8-------
4028-------
4116-------
425.8-------
4316-------
449.1-------
456-------
4617-------
4726-------
4899.6-------
494113.6968-10.962838.35640.01500.85220
507214-16.196344.19631e-040.03980.50
51234.8-25.396334.99630.118700.50
524228-2.196358.19630.18170.62720.50
534016-14.196346.19630.05960.04570.50
54185.8-24.396335.99630.21420.01320.50
554516-14.196346.19630.02990.44840.50
56189.1-21.096339.29630.28170.00990.50
5726-24.196336.19630.39760.2180.50
581017-13.196347.19630.32480.83490.50
5913.626-4.196356.19630.21040.85050.50
6016099.669.4037129.7963010.50.5

\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[48]) \tabularnewline
36 & 86.5 & - & - & - & - & - & - & - \tabularnewline
37 & 0.54 & - & - & - & - & - & - & - \tabularnewline
38 & 14 & - & - & - & - & - & - & - \tabularnewline
39 & 4.8 & - & - & - & - & - & - & - \tabularnewline
40 & 28 & - & - & - & - & - & - & - \tabularnewline
41 & 16 & - & - & - & - & - & - & - \tabularnewline
42 & 5.8 & - & - & - & - & - & - & - \tabularnewline
43 & 16 & - & - & - & - & - & - & - \tabularnewline
44 & 9.1 & - & - & - & - & - & - & - \tabularnewline
45 & 6 & - & - & - & - & - & - & - \tabularnewline
46 & 17 & - & - & - & - & - & - & - \tabularnewline
47 & 26 & - & - & - & - & - & - & - \tabularnewline
48 & 99.6 & - & - & - & - & - & - & - \tabularnewline
49 & 41 & 13.6968 & -10.9628 & 38.3564 & 0.015 & 0 & 0.8522 & 0 \tabularnewline
50 & 72 & 14 & -16.1963 & 44.1963 & 1e-04 & 0.0398 & 0.5 & 0 \tabularnewline
51 & 23 & 4.8 & -25.3963 & 34.9963 & 0.1187 & 0 & 0.5 & 0 \tabularnewline
52 & 42 & 28 & -2.1963 & 58.1963 & 0.1817 & 0.6272 & 0.5 & 0 \tabularnewline
53 & 40 & 16 & -14.1963 & 46.1963 & 0.0596 & 0.0457 & 0.5 & 0 \tabularnewline
54 & 18 & 5.8 & -24.3963 & 35.9963 & 0.2142 & 0.0132 & 0.5 & 0 \tabularnewline
55 & 45 & 16 & -14.1963 & 46.1963 & 0.0299 & 0.4484 & 0.5 & 0 \tabularnewline
56 & 18 & 9.1 & -21.0963 & 39.2963 & 0.2817 & 0.0099 & 0.5 & 0 \tabularnewline
57 & 2 & 6 & -24.1963 & 36.1963 & 0.3976 & 0.218 & 0.5 & 0 \tabularnewline
58 & 10 & 17 & -13.1963 & 47.1963 & 0.3248 & 0.8349 & 0.5 & 0 \tabularnewline
59 & 13.6 & 26 & -4.1963 & 56.1963 & 0.2104 & 0.8505 & 0.5 & 0 \tabularnewline
60 & 160 & 99.6 & 69.4037 & 129.7963 & 0 & 1 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108544&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[48])[/C][/ROW]
[ROW][C]36[/C][C]86.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]0.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]4.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]5.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]16[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]9.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]99.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]41[/C][C]13.6968[/C][C]-10.9628[/C][C]38.3564[/C][C]0.015[/C][C]0[/C][C]0.8522[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]72[/C][C]14[/C][C]-16.1963[/C][C]44.1963[/C][C]1e-04[/C][C]0.0398[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]23[/C][C]4.8[/C][C]-25.3963[/C][C]34.9963[/C][C]0.1187[/C][C]0[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]52[/C][C]42[/C][C]28[/C][C]-2.1963[/C][C]58.1963[/C][C]0.1817[/C][C]0.6272[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]53[/C][C]40[/C][C]16[/C][C]-14.1963[/C][C]46.1963[/C][C]0.0596[/C][C]0.0457[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]54[/C][C]18[/C][C]5.8[/C][C]-24.3963[/C][C]35.9963[/C][C]0.2142[/C][C]0.0132[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]55[/C][C]45[/C][C]16[/C][C]-14.1963[/C][C]46.1963[/C][C]0.0299[/C][C]0.4484[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]56[/C][C]18[/C][C]9.1[/C][C]-21.0963[/C][C]39.2963[/C][C]0.2817[/C][C]0.0099[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]57[/C][C]2[/C][C]6[/C][C]-24.1963[/C][C]36.1963[/C][C]0.3976[/C][C]0.218[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]58[/C][C]10[/C][C]17[/C][C]-13.1963[/C][C]47.1963[/C][C]0.3248[/C][C]0.8349[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]59[/C][C]13.6[/C][C]26[/C][C]-4.1963[/C][C]56.1963[/C][C]0.2104[/C][C]0.8505[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]160[/C][C]99.6[/C][C]69.4037[/C][C]129.7963[/C][C]0[/C][C]1[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108544&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108544&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[48])
3686.5-------
370.54-------
3814-------
394.8-------
4028-------
4116-------
425.8-------
4316-------
449.1-------
456-------
4617-------
4726-------
4899.6-------
494113.6968-10.962838.35640.01500.85220
507214-16.196344.19631e-040.03980.50
51234.8-25.396334.99630.118700.50
524228-2.196358.19630.18170.62720.50
534016-14.196346.19630.05960.04570.50
54185.8-24.396335.99630.21420.01320.50
554516-14.196346.19630.02990.44840.50
56189.1-21.096339.29630.28170.00990.50
5726-24.196336.19630.39760.2180.50
581017-13.196347.19630.32480.83490.50
5913.626-4.196356.19630.21040.85050.50
6016099.669.4037129.7963010.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.91861.99340745.465700
501.10044.14293.068133642054.732845.3292
513.20963.79173.3093331.241480.235238.4738
520.55020.52.6071961159.176434.0467
530.96291.52.38565761042.541132.2884
542.65632.10342.3386148.84893.590929.893
550.96291.81252.2634841886.07829.7671
561.6930.9782.102779.21785.219528.0218
572.5677-0.66671.943216699.750626.4528
580.9063-0.41181.7949634.675625.1928
590.5925-0.47691.6707153.76590.95624.3096
600.15470.60641.5823648.16845.72329.0813

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.9186 & 1.9934 & 0 & 745.4657 & 0 & 0 \tabularnewline
50 & 1.1004 & 4.1429 & 3.0681 & 3364 & 2054.7328 & 45.3292 \tabularnewline
51 & 3.2096 & 3.7917 & 3.3093 & 331.24 & 1480.2352 & 38.4738 \tabularnewline
52 & 0.5502 & 0.5 & 2.607 & 196 & 1159.1764 & 34.0467 \tabularnewline
53 & 0.9629 & 1.5 & 2.3856 & 576 & 1042.5411 & 32.2884 \tabularnewline
54 & 2.6563 & 2.1034 & 2.3386 & 148.84 & 893.5909 & 29.893 \tabularnewline
55 & 0.9629 & 1.8125 & 2.2634 & 841 & 886.078 & 29.7671 \tabularnewline
56 & 1.693 & 0.978 & 2.1027 & 79.21 & 785.2195 & 28.0218 \tabularnewline
57 & 2.5677 & -0.6667 & 1.9432 & 16 & 699.7506 & 26.4528 \tabularnewline
58 & 0.9063 & -0.4118 & 1.79 & 49 & 634.6756 & 25.1928 \tabularnewline
59 & 0.5925 & -0.4769 & 1.6707 & 153.76 & 590.956 & 24.3096 \tabularnewline
60 & 0.1547 & 0.6064 & 1.582 & 3648.16 & 845.723 & 29.0813 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108544&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]49[/C][C]0.9186[/C][C]1.9934[/C][C]0[/C][C]745.4657[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]1.1004[/C][C]4.1429[/C][C]3.0681[/C][C]3364[/C][C]2054.7328[/C][C]45.3292[/C][/ROW]
[ROW][C]51[/C][C]3.2096[/C][C]3.7917[/C][C]3.3093[/C][C]331.24[/C][C]1480.2352[/C][C]38.4738[/C][/ROW]
[ROW][C]52[/C][C]0.5502[/C][C]0.5[/C][C]2.607[/C][C]196[/C][C]1159.1764[/C][C]34.0467[/C][/ROW]
[ROW][C]53[/C][C]0.9629[/C][C]1.5[/C][C]2.3856[/C][C]576[/C][C]1042.5411[/C][C]32.2884[/C][/ROW]
[ROW][C]54[/C][C]2.6563[/C][C]2.1034[/C][C]2.3386[/C][C]148.84[/C][C]893.5909[/C][C]29.893[/C][/ROW]
[ROW][C]55[/C][C]0.9629[/C][C]1.8125[/C][C]2.2634[/C][C]841[/C][C]886.078[/C][C]29.7671[/C][/ROW]
[ROW][C]56[/C][C]1.693[/C][C]0.978[/C][C]2.1027[/C][C]79.21[/C][C]785.2195[/C][C]28.0218[/C][/ROW]
[ROW][C]57[/C][C]2.5677[/C][C]-0.6667[/C][C]1.9432[/C][C]16[/C][C]699.7506[/C][C]26.4528[/C][/ROW]
[ROW][C]58[/C][C]0.9063[/C][C]-0.4118[/C][C]1.79[/C][C]49[/C][C]634.6756[/C][C]25.1928[/C][/ROW]
[ROW][C]59[/C][C]0.5925[/C][C]-0.4769[/C][C]1.6707[/C][C]153.76[/C][C]590.956[/C][C]24.3096[/C][/ROW]
[ROW][C]60[/C][C]0.1547[/C][C]0.6064[/C][C]1.582[/C][C]3648.16[/C][C]845.723[/C][C]29.0813[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108544&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108544&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
490.91861.99340745.465700
501.10044.14293.068133642054.732845.3292
513.20963.79173.3093331.241480.235238.4738
520.55020.52.6071961159.176434.0467
530.96291.52.38565761042.541132.2884
542.65632.10342.3386148.84893.590929.893
550.96291.81252.2634841886.07829.7671
561.6930.9782.102779.21785.219528.0218
572.5677-0.66671.943216699.750626.4528
580.9063-0.41181.7949634.675625.1928
590.5925-0.47691.6707153.76590.95624.3096
600.15470.60641.5823648.16845.72329.0813



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