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 computationTue, 23 Dec 2008 01:25:28 -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/2008/Dec/23/t1230020780lyxbhnb0565irih.htm/, Retrieved Sun, 19 May 2024 00:23:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36264, Retrieved Sun, 19 May 2024 00:23:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact182
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [ARMA forecasting ...] [2007-12-18 14:23:57] [68bf27730ab6cad0c08724e0f0b374d3]
-   PD    [ARIMA Forecasting] [forecast] [2008-12-23 08:25:28] [96839c4b6d4e03ef3851369c676780bf] [Current]
Feedback Forum

Post a new message
Dataseries X:
15
13
8
7
3
3
4
4
0
-4
-14
-18
-8
-1
1
2
0
1
0
-1
-3
-3
-3
-4
-8
-9
-13
-18
-11
-9
-10
-13
-11
-5
-15
-6
-6
-3
-1
-3
-4
-6
0
-4
-2
-2
-6
-7
-6
-6
-3
-2
-5
-11
-11
-11
-10
-14
-8
-9
-5
-1
-2
-5
-4
-6
-2
-2
-2
-2
2
1
-8
-1
1
-1
2
2
1
-1
-2
-2
-1
-8
-4
-6
-3
-3
-7
-9
-11
-13
-11
-9
-17
-22
-25




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36264&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36264&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36264&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[85])
73-8-------
74-1-------
751-------
76-1-------
772-------
782-------
791-------
80-1-------
81-2-------
82-2-------
83-1-------
84-8-------
85-4-------
86-6-4-11.42973.42970.29890.50.21430.5
87-3-4-14.50726.50720.4260.64550.17550.5
88-3-4-16.86868.86860.43950.43950.32390.5
89-7-4-18.859410.85940.34620.44750.21430.5
90-9-4-20.613312.61330.27760.63830.23950.5
91-11-4-22.198914.19890.22550.70490.29510.5
92-13-4-23.657115.65710.18480.75740.38240.5
93-11-4-25.014317.01430.25690.79940.4260.5
94-9-4-26.28918.2890.33010.73090.43020.5
95-17-4-27.494719.49470.13910.66170.40120.5
96-22-4-28.641520.64150.07610.84940.62480.5
97-25-4-29.737221.73720.05490.91480.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[85]) \tabularnewline
73 & -8 & - & - & - & - & - & - & - \tabularnewline
74 & -1 & - & - & - & - & - & - & - \tabularnewline
75 & 1 & - & - & - & - & - & - & - \tabularnewline
76 & -1 & - & - & - & - & - & - & - \tabularnewline
77 & 2 & - & - & - & - & - & - & - \tabularnewline
78 & 2 & - & - & - & - & - & - & - \tabularnewline
79 & 1 & - & - & - & - & - & - & - \tabularnewline
80 & -1 & - & - & - & - & - & - & - \tabularnewline
81 & -2 & - & - & - & - & - & - & - \tabularnewline
82 & -2 & - & - & - & - & - & - & - \tabularnewline
83 & -1 & - & - & - & - & - & - & - \tabularnewline
84 & -8 & - & - & - & - & - & - & - \tabularnewline
85 & -4 & - & - & - & - & - & - & - \tabularnewline
86 & -6 & -4 & -11.4297 & 3.4297 & 0.2989 & 0.5 & 0.2143 & 0.5 \tabularnewline
87 & -3 & -4 & -14.5072 & 6.5072 & 0.426 & 0.6455 & 0.1755 & 0.5 \tabularnewline
88 & -3 & -4 & -16.8686 & 8.8686 & 0.4395 & 0.4395 & 0.3239 & 0.5 \tabularnewline
89 & -7 & -4 & -18.8594 & 10.8594 & 0.3462 & 0.4475 & 0.2143 & 0.5 \tabularnewline
90 & -9 & -4 & -20.6133 & 12.6133 & 0.2776 & 0.6383 & 0.2395 & 0.5 \tabularnewline
91 & -11 & -4 & -22.1989 & 14.1989 & 0.2255 & 0.7049 & 0.2951 & 0.5 \tabularnewline
92 & -13 & -4 & -23.6571 & 15.6571 & 0.1848 & 0.7574 & 0.3824 & 0.5 \tabularnewline
93 & -11 & -4 & -25.0143 & 17.0143 & 0.2569 & 0.7994 & 0.426 & 0.5 \tabularnewline
94 & -9 & -4 & -26.289 & 18.289 & 0.3301 & 0.7309 & 0.4302 & 0.5 \tabularnewline
95 & -17 & -4 & -27.4947 & 19.4947 & 0.1391 & 0.6617 & 0.4012 & 0.5 \tabularnewline
96 & -22 & -4 & -28.6415 & 20.6415 & 0.0761 & 0.8494 & 0.6248 & 0.5 \tabularnewline
97 & -25 & -4 & -29.7372 & 21.7372 & 0.0549 & 0.9148 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36264&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[85])[/C][/ROW]
[ROW][C]73[/C][C]-8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]-1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]-1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]-1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]-2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]-2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]-1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]-8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]-4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]-6[/C][C]-4[/C][C]-11.4297[/C][C]3.4297[/C][C]0.2989[/C][C]0.5[/C][C]0.2143[/C][C]0.5[/C][/ROW]
[ROW][C]87[/C][C]-3[/C][C]-4[/C][C]-14.5072[/C][C]6.5072[/C][C]0.426[/C][C]0.6455[/C][C]0.1755[/C][C]0.5[/C][/ROW]
[ROW][C]88[/C][C]-3[/C][C]-4[/C][C]-16.8686[/C][C]8.8686[/C][C]0.4395[/C][C]0.4395[/C][C]0.3239[/C][C]0.5[/C][/ROW]
[ROW][C]89[/C][C]-7[/C][C]-4[/C][C]-18.8594[/C][C]10.8594[/C][C]0.3462[/C][C]0.4475[/C][C]0.2143[/C][C]0.5[/C][/ROW]
[ROW][C]90[/C][C]-9[/C][C]-4[/C][C]-20.6133[/C][C]12.6133[/C][C]0.2776[/C][C]0.6383[/C][C]0.2395[/C][C]0.5[/C][/ROW]
[ROW][C]91[/C][C]-11[/C][C]-4[/C][C]-22.1989[/C][C]14.1989[/C][C]0.2255[/C][C]0.7049[/C][C]0.2951[/C][C]0.5[/C][/ROW]
[ROW][C]92[/C][C]-13[/C][C]-4[/C][C]-23.6571[/C][C]15.6571[/C][C]0.1848[/C][C]0.7574[/C][C]0.3824[/C][C]0.5[/C][/ROW]
[ROW][C]93[/C][C]-11[/C][C]-4[/C][C]-25.0143[/C][C]17.0143[/C][C]0.2569[/C][C]0.7994[/C][C]0.426[/C][C]0.5[/C][/ROW]
[ROW][C]94[/C][C]-9[/C][C]-4[/C][C]-26.289[/C][C]18.289[/C][C]0.3301[/C][C]0.7309[/C][C]0.4302[/C][C]0.5[/C][/ROW]
[ROW][C]95[/C][C]-17[/C][C]-4[/C][C]-27.4947[/C][C]19.4947[/C][C]0.1391[/C][C]0.6617[/C][C]0.4012[/C][C]0.5[/C][/ROW]
[ROW][C]96[/C][C]-22[/C][C]-4[/C][C]-28.6415[/C][C]20.6415[/C][C]0.0761[/C][C]0.8494[/C][C]0.6248[/C][C]0.5[/C][/ROW]
[ROW][C]97[/C][C]-25[/C][C]-4[/C][C]-29.7372[/C][C]21.7372[/C][C]0.0549[/C][C]0.9148[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36264&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36264&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[85])
73-8-------
74-1-------
751-------
76-1-------
772-------
782-------
791-------
80-1-------
81-2-------
82-2-------
83-1-------
84-8-------
85-4-------
86-6-4-11.42973.42970.29890.50.21430.5
87-3-4-14.50726.50720.4260.64550.17550.5
88-3-4-16.86868.86860.43950.43950.32390.5
89-7-4-18.859410.85940.34620.44750.21430.5
90-9-4-20.613312.61330.27760.63830.23950.5
91-11-4-22.198914.19890.22550.70490.29510.5
92-13-4-23.657115.65710.18480.75740.38240.5
93-11-4-25.014317.01430.25690.79940.4260.5
94-9-4-26.28918.2890.33010.73090.43020.5
95-17-4-27.494719.49470.13910.66170.40120.5
96-22-4-28.641520.64150.07610.84940.62480.5
97-25-4-29.737221.73720.05490.91480.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
86-0.94770.50.041740.33330.5774
87-1.3402-0.250.020810.08330.2887
88-1.6414-0.250.020810.08330.2887
89-1.89530.750.062590.750.866
90-2.1191.250.1042252.08331.4434
91-2.32131.750.1458494.08332.0207
92-2.50732.250.1875816.752.5981
93-2.68041.750.1458494.08332.0207
94-2.8431.250.1042252.08331.4434
95-2.99683.250.270816914.08333.7528
96-3.1434.50.375324275.1962
97-3.28285.250.437544136.756.0622

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
86 & -0.9477 & 0.5 & 0.0417 & 4 & 0.3333 & 0.5774 \tabularnewline
87 & -1.3402 & -0.25 & 0.0208 & 1 & 0.0833 & 0.2887 \tabularnewline
88 & -1.6414 & -0.25 & 0.0208 & 1 & 0.0833 & 0.2887 \tabularnewline
89 & -1.8953 & 0.75 & 0.0625 & 9 & 0.75 & 0.866 \tabularnewline
90 & -2.119 & 1.25 & 0.1042 & 25 & 2.0833 & 1.4434 \tabularnewline
91 & -2.3213 & 1.75 & 0.1458 & 49 & 4.0833 & 2.0207 \tabularnewline
92 & -2.5073 & 2.25 & 0.1875 & 81 & 6.75 & 2.5981 \tabularnewline
93 & -2.6804 & 1.75 & 0.1458 & 49 & 4.0833 & 2.0207 \tabularnewline
94 & -2.843 & 1.25 & 0.1042 & 25 & 2.0833 & 1.4434 \tabularnewline
95 & -2.9968 & 3.25 & 0.2708 & 169 & 14.0833 & 3.7528 \tabularnewline
96 & -3.143 & 4.5 & 0.375 & 324 & 27 & 5.1962 \tabularnewline
97 & -3.2828 & 5.25 & 0.4375 & 441 & 36.75 & 6.0622 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36264&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]86[/C][C]-0.9477[/C][C]0.5[/C][C]0.0417[/C][C]4[/C][C]0.3333[/C][C]0.5774[/C][/ROW]
[ROW][C]87[/C][C]-1.3402[/C][C]-0.25[/C][C]0.0208[/C][C]1[/C][C]0.0833[/C][C]0.2887[/C][/ROW]
[ROW][C]88[/C][C]-1.6414[/C][C]-0.25[/C][C]0.0208[/C][C]1[/C][C]0.0833[/C][C]0.2887[/C][/ROW]
[ROW][C]89[/C][C]-1.8953[/C][C]0.75[/C][C]0.0625[/C][C]9[/C][C]0.75[/C][C]0.866[/C][/ROW]
[ROW][C]90[/C][C]-2.119[/C][C]1.25[/C][C]0.1042[/C][C]25[/C][C]2.0833[/C][C]1.4434[/C][/ROW]
[ROW][C]91[/C][C]-2.3213[/C][C]1.75[/C][C]0.1458[/C][C]49[/C][C]4.0833[/C][C]2.0207[/C][/ROW]
[ROW][C]92[/C][C]-2.5073[/C][C]2.25[/C][C]0.1875[/C][C]81[/C][C]6.75[/C][C]2.5981[/C][/ROW]
[ROW][C]93[/C][C]-2.6804[/C][C]1.75[/C][C]0.1458[/C][C]49[/C][C]4.0833[/C][C]2.0207[/C][/ROW]
[ROW][C]94[/C][C]-2.843[/C][C]1.25[/C][C]0.1042[/C][C]25[/C][C]2.0833[/C][C]1.4434[/C][/ROW]
[ROW][C]95[/C][C]-2.9968[/C][C]3.25[/C][C]0.2708[/C][C]169[/C][C]14.0833[/C][C]3.7528[/C][/ROW]
[ROW][C]96[/C][C]-3.143[/C][C]4.5[/C][C]0.375[/C][C]324[/C][C]27[/C][C]5.1962[/C][/ROW]
[ROW][C]97[/C][C]-3.2828[/C][C]5.25[/C][C]0.4375[/C][C]441[/C][C]36.75[/C][C]6.0622[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36264&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36264&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
86-0.94770.50.041740.33330.5774
87-1.3402-0.250.020810.08330.2887
88-1.6414-0.250.020810.08330.2887
89-1.89530.750.062590.750.866
90-2.1191.250.1042252.08331.4434
91-2.32131.750.1458494.08332.0207
92-2.50732.250.1875816.752.5981
93-2.68041.750.1458494.08332.0207
94-2.8431.250.1042252.08331.4434
95-2.99683.250.270816914.08333.7528
96-3.1434.50.375324275.1962
97-3.28285.250.437544136.756.0622



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')