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 computationWed, 24 Jan 2018 10:45:57 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2018/Jan/24/t15167872030vrcd88arsbqbwc.htm/, Retrieved Mon, 06 May 2024 07:26:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=312442, Retrieved Mon, 06 May 2024 07:26:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact52
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2018-01-24 09:45:57] [eea26683481d1970ffe2162bfa111b12] [Current]
Feedback Forum

Post a new message
Dataseries X:
97.7
88.9
96.5
89.5
85.4
84.3
83.7
86.2
90.7
95.7
95.6
97
97.2
86.6
88.4
81.4
86.9
84.9
83.7
86.8
88.3
92.5
94.7
94.5
98.7
88.6
95.2
91.3
91.7
89.3
88.7
91.2
88.6
94.6
96
94.3
102
93.4
96.7
93.7
91.6
89.6
92.9
94.1
92
97.5
92.7
100.7
105.9
95.3
99.8
91.3
90.8
87.1
91.4
86.1
87.1
92.6
96.6
105.3
102.4
98.2
98.6
92.6
87.9
84.1
86.7
84.4
86
90.4
92.9
105.8
106
99.1
99.9
88.1
87.8
87.1
85.9
86.5
84.1
92.1
93.3
98.9
103
98.4
100.7
92.3
89
88.9
85.5
90.1
87
97.1
101.5
103
106.1
96.1
94.2
89.1
85.2
86.5
88
88.4
87.9
95.7
94.8
105.2
108.7
96.1
98.3
88.6
90.8
88.1
91.9
98.5
98.6
100.3
98.7
110.7
115.4
105.4
108
94.5
96.5
91
94.1
96.4
93.1
97.5
102.5
105.7
109.1
97.2
100.3
91.3
94.3
89.5
89.3
93.4
91.9
92.9
93.7
100.1
105.5
110.5
89.5
90.4
89.9
84.6
86.2
83.4
82.9
81.8
87.6
94.6
99.6
96.7
99.8
83.8
82.4
86.8
91
85.3
83.6
94
100.3
107.1
100.7
95.5
92.9
79.2
82
79.3
81.5
76
73.1
80.4
82.1
90.5
98.1
89.5
86.5
77
74.7
73.4
72.5
69.3
75.2
83.5
90.5
92.2
110.5
101.8
107.4
95.5
84.5
81.1
86.2
91.5
84.7
92.2
99.2
104.5
113
100.4
101
84.8
86.5
91.7
94.8
95




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=312442&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=312442&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=312442&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center







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[200])
19986.2-------
20091.5-------
20184.70-181.6637181.66370.18040.16180.16180.1618
20292.20-181.6637181.66370.15990.18040.18040.1618
20399.20-181.6637181.66370.14220.15990.15990.1618
204104.50-181.6637181.66370.12980.14220.14220.1618
2051130-181.6637181.66370.11140.12980.12980.1618
206100.40-181.6637181.66370.13940.11140.11140.1618
2071010-181.6637181.66370.13790.13940.13940.1618
20884.80-181.6637181.66370.18010.13790.13790.1618
20986.50-181.6637181.66370.17530.18010.18010.1618
21091.70-181.6637181.66370.16120.17530.17530.1618
21194.80-181.6637181.66370.15320.16120.16120.1618
212950-181.6637181.66370.15270.15320.15320.1618

\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[200]) \tabularnewline
199 & 86.2 & - & - & - & - & - & - & - \tabularnewline
200 & 91.5 & - & - & - & - & - & - & - \tabularnewline
201 & 84.7 & 0 & -181.6637 & 181.6637 & 0.1804 & 0.1618 & 0.1618 & 0.1618 \tabularnewline
202 & 92.2 & 0 & -181.6637 & 181.6637 & 0.1599 & 0.1804 & 0.1804 & 0.1618 \tabularnewline
203 & 99.2 & 0 & -181.6637 & 181.6637 & 0.1422 & 0.1599 & 0.1599 & 0.1618 \tabularnewline
204 & 104.5 & 0 & -181.6637 & 181.6637 & 0.1298 & 0.1422 & 0.1422 & 0.1618 \tabularnewline
205 & 113 & 0 & -181.6637 & 181.6637 & 0.1114 & 0.1298 & 0.1298 & 0.1618 \tabularnewline
206 & 100.4 & 0 & -181.6637 & 181.6637 & 0.1394 & 0.1114 & 0.1114 & 0.1618 \tabularnewline
207 & 101 & 0 & -181.6637 & 181.6637 & 0.1379 & 0.1394 & 0.1394 & 0.1618 \tabularnewline
208 & 84.8 & 0 & -181.6637 & 181.6637 & 0.1801 & 0.1379 & 0.1379 & 0.1618 \tabularnewline
209 & 86.5 & 0 & -181.6637 & 181.6637 & 0.1753 & 0.1801 & 0.1801 & 0.1618 \tabularnewline
210 & 91.7 & 0 & -181.6637 & 181.6637 & 0.1612 & 0.1753 & 0.1753 & 0.1618 \tabularnewline
211 & 94.8 & 0 & -181.6637 & 181.6637 & 0.1532 & 0.1612 & 0.1612 & 0.1618 \tabularnewline
212 & 95 & 0 & -181.6637 & 181.6637 & 0.1527 & 0.1532 & 0.1532 & 0.1618 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=312442&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[200])[/C][/ROW]
[ROW][C]199[/C][C]86.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]91.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]84.7[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1804[/C][C]0.1618[/C][C]0.1618[/C][C]0.1618[/C][/ROW]
[ROW][C]202[/C][C]92.2[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1599[/C][C]0.1804[/C][C]0.1804[/C][C]0.1618[/C][/ROW]
[ROW][C]203[/C][C]99.2[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1422[/C][C]0.1599[/C][C]0.1599[/C][C]0.1618[/C][/ROW]
[ROW][C]204[/C][C]104.5[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1298[/C][C]0.1422[/C][C]0.1422[/C][C]0.1618[/C][/ROW]
[ROW][C]205[/C][C]113[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1114[/C][C]0.1298[/C][C]0.1298[/C][C]0.1618[/C][/ROW]
[ROW][C]206[/C][C]100.4[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1394[/C][C]0.1114[/C][C]0.1114[/C][C]0.1618[/C][/ROW]
[ROW][C]207[/C][C]101[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1379[/C][C]0.1394[/C][C]0.1394[/C][C]0.1618[/C][/ROW]
[ROW][C]208[/C][C]84.8[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1801[/C][C]0.1379[/C][C]0.1379[/C][C]0.1618[/C][/ROW]
[ROW][C]209[/C][C]86.5[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1753[/C][C]0.1801[/C][C]0.1801[/C][C]0.1618[/C][/ROW]
[ROW][C]210[/C][C]91.7[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1612[/C][C]0.1753[/C][C]0.1753[/C][C]0.1618[/C][/ROW]
[ROW][C]211[/C][C]94.8[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1532[/C][C]0.1612[/C][C]0.1612[/C][C]0.1618[/C][/ROW]
[ROW][C]212[/C][C]95[/C][C]0[/C][C]-181.6637[/C][C]181.6637[/C][C]0.1527[/C][C]0.1532[/C][C]0.1532[/C][C]0.1618[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=312442&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=312442&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[200])
19986.2-------
20091.5-------
20184.70-181.6637181.66370.18040.16180.16180.1618
20292.20-181.6637181.66370.15990.18040.18040.1618
20399.20-181.6637181.66370.14220.15990.15990.1618
204104.50-181.6637181.66370.12980.14220.14220.1618
2051130-181.6637181.66370.11140.12980.12980.1618
206100.40-181.6637181.66370.13940.11140.11140.1618
2071010-181.6637181.66370.13790.13940.13940.1618
20884.80-181.6637181.66370.18010.13790.13790.1618
20986.50-181.6637181.66370.17530.18010.18010.1618
21091.70-181.6637181.66370.16120.17530.17530.1618
21194.80-181.6637181.66370.15320.16120.16120.1618
212950-181.6637181.66370.15270.15320.15320.1618







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
201Inf1127174.090013.721613.7216
202Inf1128500.847837.46588.529514.936714.3292
203Inf1129840.648505.1992.223616.070714.9097
204Inf11210920.259108.95595.440816.929315.4146
205Inf112127699840.96499.201618.306315.9929
206Inf11210080.169880.8399.402416.265116.0383
207Inf112102019926.568699.632216.362316.0846
208Inf1127191.049584.627597.901113.737815.7912
209Inf1127482.259351.0396.700714.013315.5937
210Inf1128408.899256.81696.212314.855715.5199
211Inf1128987.049232.290996.084815.357915.5052
212Inf11290259215.016795.994915.390315.4956

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
201 & Inf & 1 & 1 & 2 & 7174.09 & 0 & 0 & 13.7216 & 13.7216 \tabularnewline
202 & Inf & 1 & 1 & 2 & 8500.84 & 7837.465 & 88.5295 & 14.9367 & 14.3292 \tabularnewline
203 & Inf & 1 & 1 & 2 & 9840.64 & 8505.19 & 92.2236 & 16.0707 & 14.9097 \tabularnewline
204 & Inf & 1 & 1 & 2 & 10920.25 & 9108.955 & 95.4408 & 16.9293 & 15.4146 \tabularnewline
205 & Inf & 1 & 1 & 2 & 12769 & 9840.964 & 99.2016 & 18.3063 & 15.9929 \tabularnewline
206 & Inf & 1 & 1 & 2 & 10080.16 & 9880.83 & 99.4024 & 16.2651 & 16.0383 \tabularnewline
207 & Inf & 1 & 1 & 2 & 10201 & 9926.5686 & 99.6322 & 16.3623 & 16.0846 \tabularnewline
208 & Inf & 1 & 1 & 2 & 7191.04 & 9584.6275 & 97.9011 & 13.7378 & 15.7912 \tabularnewline
209 & Inf & 1 & 1 & 2 & 7482.25 & 9351.03 & 96.7007 & 14.0133 & 15.5937 \tabularnewline
210 & Inf & 1 & 1 & 2 & 8408.89 & 9256.816 & 96.2123 & 14.8557 & 15.5199 \tabularnewline
211 & Inf & 1 & 1 & 2 & 8987.04 & 9232.2909 & 96.0848 & 15.3579 & 15.5052 \tabularnewline
212 & Inf & 1 & 1 & 2 & 9025 & 9215.0167 & 95.9949 & 15.3903 & 15.4956 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=312442&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]sMAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][C]ScaledE[/C][C]MASE[/C][/ROW]
[ROW][C]201[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]7174.09[/C][C]0[/C][C]0[/C][C]13.7216[/C][C]13.7216[/C][/ROW]
[ROW][C]202[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]8500.84[/C][C]7837.465[/C][C]88.5295[/C][C]14.9367[/C][C]14.3292[/C][/ROW]
[ROW][C]203[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]9840.64[/C][C]8505.19[/C][C]92.2236[/C][C]16.0707[/C][C]14.9097[/C][/ROW]
[ROW][C]204[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]10920.25[/C][C]9108.955[/C][C]95.4408[/C][C]16.9293[/C][C]15.4146[/C][/ROW]
[ROW][C]205[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]12769[/C][C]9840.964[/C][C]99.2016[/C][C]18.3063[/C][C]15.9929[/C][/ROW]
[ROW][C]206[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]10080.16[/C][C]9880.83[/C][C]99.4024[/C][C]16.2651[/C][C]16.0383[/C][/ROW]
[ROW][C]207[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]10201[/C][C]9926.5686[/C][C]99.6322[/C][C]16.3623[/C][C]16.0846[/C][/ROW]
[ROW][C]208[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]7191.04[/C][C]9584.6275[/C][C]97.9011[/C][C]13.7378[/C][C]15.7912[/C][/ROW]
[ROW][C]209[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]7482.25[/C][C]9351.03[/C][C]96.7007[/C][C]14.0133[/C][C]15.5937[/C][/ROW]
[ROW][C]210[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]8408.89[/C][C]9256.816[/C][C]96.2123[/C][C]14.8557[/C][C]15.5199[/C][/ROW]
[ROW][C]211[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]8987.04[/C][C]9232.2909[/C][C]96.0848[/C][C]15.3579[/C][C]15.5052[/C][/ROW]
[ROW][C]212[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]9025[/C][C]9215.0167[/C][C]95.9949[/C][C]15.3903[/C][C]15.4956[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=312442&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=312442&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.PEMAPEsMAPESq.EMSERMSEScaledEMASE
201Inf1127174.090013.721613.7216
202Inf1128500.847837.46588.529514.936714.3292
203Inf1129840.648505.1992.223616.070714.9097
204Inf11210920.259108.95595.440816.929315.4146
205Inf112127699840.96499.201618.306315.9929
206Inf11210080.169880.8399.402416.265116.0383
207Inf112102019926.568699.632216.362316.0846
208Inf1127191.049584.627597.901113.737815.7912
209Inf1127482.259351.0396.700714.013315.5937
210Inf1128408.899256.81696.212314.855715.5199
211Inf1128987.049232.290996.084815.357915.5052
212Inf11290259215.016795.994915.390315.4956



Parameters (Session):
par1 = two.sided ; par2 = 0.99 ; par3 = 0 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 0 ; par5 = 1 ; 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*2
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.spe <- array(0, dim=fx)
perf.scalederr <- array(0, dim=fx)
perf.mase <- array(0, dim=fx)
perf.mase1 <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.smape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.smape1 <- 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)
perf.scaleddenom <- 0
for (i in 2:fx) {
perf.scaleddenom = perf.scaleddenom + abs(x[nx+i] - x[nx+i-1])
}
perf.scaleddenom = perf.scaleddenom / (fx-1)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.scalederr[i] = (x[nx+i] - forecast$pred[i]) / perf.scaleddenom
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / x[nx+i]
perf.spe[i] = 2*(x[nx+i] - forecast$pred[i]) / (x[nx+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.smape[1] = abs(perf.spe[1])
perf.mape1[1] = perf.mape[1]
perf.smape1[1] = perf.smape[1]
perf.mse[1] = perf.se[1]
perf.mase[1] = abs(perf.scalederr[1])
perf.mase1[1] = perf.mase[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.smape[i] = perf.smape[i-1] + abs(perf.spe[i])
perf.smape1[i] = perf.smape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
perf.mase[i] = perf.mase[i-1] + abs(perf.scalederr[i])
perf.mase1[i] = perf.mase[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',10,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,'sMAPE',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.element(a,'ScaledE',1,header=TRUE)
a<-table.element(a,'MASE',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.smape1[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.element(a,round(perf.scalederr[i],4))
a<-table.element(a,round(perf.mase1[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')