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, 16 Dec 2014 14:03:24 +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/2014/Dec/16/t1418738677bm2i1u2th2tjb28.htm/, Retrieved Thu, 16 May 2024 09:20:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=269585, Retrieved Thu, 16 May 2024 09:20:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact83
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [forecast ex] [2014-12-16 14:03:24] [9636d26fd774798d33054b538c301d75] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.894
1.757
3.582
5.321
5.561
5.907
4.944
4.966
3.258
1.964
1.743
1.262
2.086
1.793
3.548
5.672
6.084
4.914
4.990
5.139
3.218
2.179
2.238
1.442
2.205
2.025
3.531
4.977
7.998
4.880
5.231
5.202
3.303
2.683
2.202
1.376
2.422
1.997
3.163
5.964
5.657
6.415
6.208
4.500
2.939
2.702
2.090
1.504
2.549
1.931
3.013
6.204
5.788
5.611
5.594
4.647
3.490
2.487
1.992
1.507
2.306
2.002
3.075
5.331
5.589
5.813
4.876
4.665
3.601
2.192
2.111
1.580
2.288
1.993
3.228
5.000
5.480
5.770
4.962
4.685
3.607
2.222
2.467
1.594
2.228
1.910
3.157
4.809
6.249
4.607
4.975
4.784
3.028
2.461
2.218
1.351
2.070
1.887
3.024
4.596
6.398
4.459
5.382
4.359
2.687
2.249
2.154
1.169
2.429
1.762
2.846
5.627
5.749
4.502
5.720
4.403
2.867
2.635
2.059
1.511
2.359
1.741
2.917
6.249
5.760
6.250
5.134
4.831
3.695
2.462
2.146
1.579




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ yule.wessa.net

\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 & 'George Udny Yule' @ yule.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=269585&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]'George Udny Yule' @ yule.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=269585&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=269585&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'George Udny Yule' @ yule.wessa.net







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[120])
1192.059-------
1201.511-------
1212.3590-7.73427.73420.2750.35090.35090.3509
1221.7410-7.73427.73420.32950.2750.2750.3509
1232.9170-7.73427.73420.22990.32950.32950.3509
1246.2490-7.73427.73420.05660.22990.22990.3509
1255.760-7.73427.73420.07220.05660.05660.3509
1266.250-7.73427.73420.05660.07220.07220.3509
1275.1340-7.73427.73420.09660.05660.05660.3509
1284.8310-7.73427.73420.11040.09660.09660.3509
1293.6950-7.73427.73420.17450.11040.11040.3509
1302.4620-7.73427.73420.26630.17450.17450.3509
1312.1460-7.73427.73420.29330.26630.26630.3509
1321.5790-7.73427.73420.34450.29330.29330.3509

\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[120]) \tabularnewline
119 & 2.059 & - & - & - & - & - & - & - \tabularnewline
120 & 1.511 & - & - & - & - & - & - & - \tabularnewline
121 & 2.359 & 0 & -7.7342 & 7.7342 & 0.275 & 0.3509 & 0.3509 & 0.3509 \tabularnewline
122 & 1.741 & 0 & -7.7342 & 7.7342 & 0.3295 & 0.275 & 0.275 & 0.3509 \tabularnewline
123 & 2.917 & 0 & -7.7342 & 7.7342 & 0.2299 & 0.3295 & 0.3295 & 0.3509 \tabularnewline
124 & 6.249 & 0 & -7.7342 & 7.7342 & 0.0566 & 0.2299 & 0.2299 & 0.3509 \tabularnewline
125 & 5.76 & 0 & -7.7342 & 7.7342 & 0.0722 & 0.0566 & 0.0566 & 0.3509 \tabularnewline
126 & 6.25 & 0 & -7.7342 & 7.7342 & 0.0566 & 0.0722 & 0.0722 & 0.3509 \tabularnewline
127 & 5.134 & 0 & -7.7342 & 7.7342 & 0.0966 & 0.0566 & 0.0566 & 0.3509 \tabularnewline
128 & 4.831 & 0 & -7.7342 & 7.7342 & 0.1104 & 0.0966 & 0.0966 & 0.3509 \tabularnewline
129 & 3.695 & 0 & -7.7342 & 7.7342 & 0.1745 & 0.1104 & 0.1104 & 0.3509 \tabularnewline
130 & 2.462 & 0 & -7.7342 & 7.7342 & 0.2663 & 0.1745 & 0.1745 & 0.3509 \tabularnewline
131 & 2.146 & 0 & -7.7342 & 7.7342 & 0.2933 & 0.2663 & 0.2663 & 0.3509 \tabularnewline
132 & 1.579 & 0 & -7.7342 & 7.7342 & 0.3445 & 0.2933 & 0.2933 & 0.3509 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=269585&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[120])[/C][/ROW]
[ROW][C]119[/C][C]2.059[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]1.511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]2.359[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.275[/C][C]0.3509[/C][C]0.3509[/C][C]0.3509[/C][/ROW]
[ROW][C]122[/C][C]1.741[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.3295[/C][C]0.275[/C][C]0.275[/C][C]0.3509[/C][/ROW]
[ROW][C]123[/C][C]2.917[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.2299[/C][C]0.3295[/C][C]0.3295[/C][C]0.3509[/C][/ROW]
[ROW][C]124[/C][C]6.249[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.0566[/C][C]0.2299[/C][C]0.2299[/C][C]0.3509[/C][/ROW]
[ROW][C]125[/C][C]5.76[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.0722[/C][C]0.0566[/C][C]0.0566[/C][C]0.3509[/C][/ROW]
[ROW][C]126[/C][C]6.25[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.0566[/C][C]0.0722[/C][C]0.0722[/C][C]0.3509[/C][/ROW]
[ROW][C]127[/C][C]5.134[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.0966[/C][C]0.0566[/C][C]0.0566[/C][C]0.3509[/C][/ROW]
[ROW][C]128[/C][C]4.831[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.1104[/C][C]0.0966[/C][C]0.0966[/C][C]0.3509[/C][/ROW]
[ROW][C]129[/C][C]3.695[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.1745[/C][C]0.1104[/C][C]0.1104[/C][C]0.3509[/C][/ROW]
[ROW][C]130[/C][C]2.462[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.2663[/C][C]0.1745[/C][C]0.1745[/C][C]0.3509[/C][/ROW]
[ROW][C]131[/C][C]2.146[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.2933[/C][C]0.2663[/C][C]0.2663[/C][C]0.3509[/C][/ROW]
[ROW][C]132[/C][C]1.579[/C][C]0[/C][C]-7.7342[/C][C]7.7342[/C][C]0.3445[/C][C]0.2933[/C][C]0.2933[/C][C]0.3509[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=269585&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=269585&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[120])
1192.059-------
1201.511-------
1212.3590-7.73427.73420.2750.35090.35090.3509
1221.7410-7.73427.73420.32950.2750.2750.3509
1232.9170-7.73427.73420.22990.32950.32950.3509
1246.2490-7.73427.73420.05660.22990.22990.3509
1255.760-7.73427.73420.07220.05660.05660.3509
1266.250-7.73427.73420.05660.07220.07220.3509
1275.1340-7.73427.73420.09660.05660.05660.3509
1284.8310-7.73427.73420.11040.09660.09660.3509
1293.6950-7.73427.73420.17450.11040.11040.3509
1302.4620-7.73427.73420.26630.17450.17450.3509
1312.1460-7.73427.73420.29330.26630.26630.3509
1321.5790-7.73427.73420.34450.29330.29330.3509







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
121Inf1125.5649002.4082.408
122Inf1123.03114.2982.07321.77722.0926
123Inf1128.50895.70162.38782.97762.3876
124Inf11239.0514.03873.74686.37893.3854
125Inf11233.177617.86654.22695.87973.8843
126Inf11239.062521.39924.62596.37994.3002
127Inf11226.35822.10764.70195.24074.4346
128Inf11223.338622.26144.71824.93144.4967
129Inf11213.65321.30494.61573.77184.4162
130Inf1126.061419.78064.44752.51324.2259
131Inf1124.605318.4014.28962.19064.0408
132Inf1122.493217.07544.13221.61183.8384

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
121 & Inf & 1 & 1 & 2 & 5.5649 & 0 & 0 & 2.408 & 2.408 \tabularnewline
122 & Inf & 1 & 1 & 2 & 3.0311 & 4.298 & 2.0732 & 1.7772 & 2.0926 \tabularnewline
123 & Inf & 1 & 1 & 2 & 8.5089 & 5.7016 & 2.3878 & 2.9776 & 2.3876 \tabularnewline
124 & Inf & 1 & 1 & 2 & 39.05 & 14.0387 & 3.7468 & 6.3789 & 3.3854 \tabularnewline
125 & Inf & 1 & 1 & 2 & 33.1776 & 17.8665 & 4.2269 & 5.8797 & 3.8843 \tabularnewline
126 & Inf & 1 & 1 & 2 & 39.0625 & 21.3992 & 4.6259 & 6.3799 & 4.3002 \tabularnewline
127 & Inf & 1 & 1 & 2 & 26.358 & 22.1076 & 4.7019 & 5.2407 & 4.4346 \tabularnewline
128 & Inf & 1 & 1 & 2 & 23.3386 & 22.2614 & 4.7182 & 4.9314 & 4.4967 \tabularnewline
129 & Inf & 1 & 1 & 2 & 13.653 & 21.3049 & 4.6157 & 3.7718 & 4.4162 \tabularnewline
130 & Inf & 1 & 1 & 2 & 6.0614 & 19.7806 & 4.4475 & 2.5132 & 4.2259 \tabularnewline
131 & Inf & 1 & 1 & 2 & 4.6053 & 18.401 & 4.2896 & 2.1906 & 4.0408 \tabularnewline
132 & Inf & 1 & 1 & 2 & 2.4932 & 17.0754 & 4.1322 & 1.6118 & 3.8384 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=269585&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]121[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]5.5649[/C][C]0[/C][C]0[/C][C]2.408[/C][C]2.408[/C][/ROW]
[ROW][C]122[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]3.0311[/C][C]4.298[/C][C]2.0732[/C][C]1.7772[/C][C]2.0926[/C][/ROW]
[ROW][C]123[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]8.5089[/C][C]5.7016[/C][C]2.3878[/C][C]2.9776[/C][C]2.3876[/C][/ROW]
[ROW][C]124[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]39.05[/C][C]14.0387[/C][C]3.7468[/C][C]6.3789[/C][C]3.3854[/C][/ROW]
[ROW][C]125[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]33.1776[/C][C]17.8665[/C][C]4.2269[/C][C]5.8797[/C][C]3.8843[/C][/ROW]
[ROW][C]126[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]39.0625[/C][C]21.3992[/C][C]4.6259[/C][C]6.3799[/C][C]4.3002[/C][/ROW]
[ROW][C]127[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]26.358[/C][C]22.1076[/C][C]4.7019[/C][C]5.2407[/C][C]4.4346[/C][/ROW]
[ROW][C]128[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]23.3386[/C][C]22.2614[/C][C]4.7182[/C][C]4.9314[/C][C]4.4967[/C][/ROW]
[ROW][C]129[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]13.653[/C][C]21.3049[/C][C]4.6157[/C][C]3.7718[/C][C]4.4162[/C][/ROW]
[ROW][C]130[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]6.0614[/C][C]19.7806[/C][C]4.4475[/C][C]2.5132[/C][C]4.2259[/C][/ROW]
[ROW][C]131[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]4.6053[/C][C]18.401[/C][C]4.2896[/C][C]2.1906[/C][C]4.0408[/C][/ROW]
[ROW][C]132[/C][C]Inf[/C][C]1[/C][C]1[/C][C]2[/C][C]2.4932[/C][C]17.0754[/C][C]4.1322[/C][C]1.6118[/C][C]3.8384[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=269585&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=269585&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
121Inf1125.5649002.4082.408
122Inf1123.03114.2982.07321.77722.0926
123Inf1128.50895.70162.38782.97762.3876
124Inf11239.0514.03873.74686.37893.3854
125Inf11233.177617.86654.22695.87973.8843
126Inf11239.062521.39924.62596.37994.3002
127Inf11226.35822.10764.70195.24074.4346
128Inf11223.338622.26144.71824.93144.4967
129Inf11213.65321.30494.61573.77184.4162
130Inf1126.061419.78064.44752.51324.2259
131Inf1124.605318.4014.28962.19064.0408
132Inf1122.493217.07544.13221.61183.8384



Parameters (Session):
par1 = 12 ;
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
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.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')