Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 06 Jun 2025 09:38:22 +0200
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2025/Jun/06/t17491955480six3twsih2rh16.htm/, Retrieved Sun, 23 Aug 2026 11:55:42 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Sun, 23 Aug 2026 11:55:42 +0200
QR Codes:

Original text written by user:
IsPrivate?This computation is private
User-defined keywords
Estimated Impact0
Dataseries X:
May-05	15.2	-
Jun-05	15.88	4.50%
Jul-05	16.6	4.50%
Aug-05	16.32	-1.71%
Sep-05	15.75	-3.45%
Oct-05	15.39	-2.27%
Nov-05	14.81	-3.77%
Dec-05	15.6	5.34%
Jan-06	15.12	-3.13%
Feb-06	14.9	-1.43%
Mar-06	17.12	14.87%
Apr-06	19.89	16.20%
May-06	22.31	12.16%
Jun-06	24.48	9.75%
Jul-06	22.53	-7.98%
Aug-06	21.42	-4.89%
Sep-06	17.34	-19.09%
Oct-06	15.82	-8.75%
Nov-06	15.7	-0.72%
Dec-06	16.03	2.07%
Jan-07	15.64	-2.41%
Feb-07	16.15	3.25%
Mar-07	16.41	1.62%
Apr-07	16.44	0.14%
May-07	15.07	-8.32%
Jun-07	14.54	-3.53%
Jul-07	14.97	2.99%
Aug-07	16.48	10.09%
Sep-07	15.91	-3.51%
Oct-07	15.14	-4.84%
Nov-07	15.11	-0.18%
Dec-07	15.57	3.06%
Jan-08	15.72	0.95%
Feb-08	15.27	-2.83%
Mar-08	16.63	8.91%
Apr-08	16.19	-2.67%
May-08	17.09	5.54%
Jun-08	16.78	-1.82%
Jul-08	18.26	8.87%
Aug-08	17.87	-2.17%
Sep-08	17.07	-4.46%
Oct-08	14.67	-14.06%
Nov-08	13.7	-6.60%
Dec-08	13.87	1.19%
Jan-09	14.66	5.71%
Feb-09	14.99	2.28%
Mar-09	16.45	9.77%
Apr-09	17.33	5.31%
May-09	19.16	10.58%
Jun-09	19.35	0.98%
Jul-09	20.46	5.75%
Aug-09	17.55	-14.22%
Sep-09	17.48	-0.39%
Oct-09	16.37	-6.36%
Nov-09	16.98	3.72%
Dec-09	17.23	1.46%
Jan-10	17.38	0.89%
Feb-10	18.92	8.86%
Mar-10	19.92	5.27%
Apr-10	20.78	4.30%
May-10	20.58	-0.94%
Jun-10	19.42	-5.62%
Jul-10	20.25	4.25%
Aug-10	20.3	0.27%
Sep-10	19.26	-5.16%
Oct-10	19.75	2.57%
Nov-10	18.84	-4.59%
Dec-10	21.59	14.59%
Jan-11	20.82	-3.60%
Feb-11	21.25	2.10%
Mar-11	22.17	4.31%
Apr-11	23.62	6.55%
May-11	22.38	-5.23%
Jun-11	19.09	-14.73%
Jul-11	16.86	-11.67%
Aug-11	16.06	-4.74%
Sep-11	14.78	-7.99%
Oct-11	13.38	-9.47%
Nov-11	13.32	-0.41%
Dec-11	14.39	8.02%
Jan-12	13.54	-5.94%
Feb-12	14.43	6.60%
Mar-12	15.37	6.55%
Apr-12	15.25	-0.82%
May-12	15.51	1.71%
Jun-12	14.37	-7.36%
Jul-12	14.07	-2.08%
Aug-12	14.49	3.01%
Sep-12	14.82	2.23%
Oct-12	13.55	-8.59%
Nov-12	14.32	5.69%
Dec-12	16.01	11.83%
Jan-13	18.73	16.96%
Feb-13	19.92	6.38%
Mar-13	20.39	2.38%
Apr-13	21.56	5.72%
May-13	22.2	2.98%
Jun-13	21.66	-2.43%
Jul-13	23.45	8.26%
Aug-13	22.84	-2.62%
Sep-13	18.87	-17.38%
Oct-13	19.39	2.75%
Nov-13	20.4	5.20%
Dec-13	24.47	19.98%
Jan-14	26.62	8.78%
Feb-14	25.79	-3.13%
Mar-14	24.4	-5.39%
Apr-14	24.63	0.93%
May-14	22.83	-7.29%
Jun-14	19.92	-12.74%
Jul-14	20.35	2.14%
Aug-14	18.85	-7.38%
Sep-14	17.67	-6.26%
Oct-14	17.56	-0.63%
Nov-14	19.22	9.47%
Dec-14	21.4	11.35%
Jan-15	21.35	-0.24%
Feb-15	20.06	-6.06%
Mar-15	18.92	-5.67%
Apr-15	18.61	-1.61%
May-15	18.45	-0.89%
Jun-15	19.29	4.58%
Jul-15	20.11	4.24%
Aug-15	22.13	10.02%
Sep-15	21.64	-2.20%
Oct-15	21.45	-0.88%
Nov-15	21.68	1.06%
Dec-15	24.79	14.35%
Jan-16	28.02	13.05%
Feb-16	25.72	-8.23%
Mar-16	28.22	9.73%
Apr-16	27.76	-1.63%
May-16	29.41	5.94%
Jun-16	31.37	6.68%
Jul-16	32.22	2.69%
Aug-16	28.43	-11.75%
Sep-16	27.4	-3.61%
Oct-16	30.12	9.92%
Nov-16	31.64	5.03%
Dec-16	35.07	10.84%
Jan-17	38.55	9.94%
Feb-17	35.03	-9.15%
Mar-17	31.96	-8.74%
Apr-17	32.79	2.58%
May-17	34.61	5.57%
Jun-17	34.63	0.05%
Jul-17	34.49	-0.40%
Aug-17	31.96	-7.34%
Sep-17	29.59	-7.42%
Oct-17	29.47	-0.39%
Nov-17	26.07	-11.54%
Dec-17	25.77	-1.15%
Jan-18	28.46	10.41%
Feb-18	28.49	0.12%
Mar-18	33.21	16.55%
Apr-18	34.51	3.92%
May-18	35.67	3.36%
Jun-18	31.56	-11.53%
Jul-18	28.27	-10.44%
Aug-18	27.25	-3.59%
Sep-18	30.39	11.53%
Oct-18	29.49	-2.98%
Nov-18	28	-5.02%
Dec-18	28.27	0.94%
Jan-19	30.79	8.92%
Feb-19	27.42	-10.94%
Mar-19	32.71	19.31%
Apr-19	32.75	0.10%
May-19	30.44	-7.04%
Jun-19	30.67	0.76%
Jul-19	29.11	-5.09%
Aug-19	25.3	-13.10%
Sep-19	24.02	-5.03%
Oct-19	23.25	-3.23%
Nov-19	25.78	10.88%
Dec-19	31.64	22.73%
Jan-20	34.4	8.74%
Feb-20	30.36	-11.74%
Mar-20	26.81	-11.70%
Apr-20	23.95	-10.65%
May-20	26.15	9.18%
Jun-20	28.99	10.84%
Jul-20	24.81	-14.39%
Aug-20	23.76	-4.25%
Sep-20	22.5	-5.31%
Oct-20	21.72	-3.45%
Nov-20	21.62	-0.48%
Dec-20	22.55	4.31%
Jan-21	23.17	2.76%
Feb-21	24.44	5.46%
Mar-21	30.08	23.09%
Apr-21	31.18	3.65%
May-21	33.18	6.40%
Jun-21	29.27	-11.76%
Jul-21	30.02	2.55%
Aug-21	27.94	-6.92%
Sep-21	25.73	-7.92%
Oct-21	27.85	8.22%
Nov-21	27.38	-1.66%
Dec-21	31.27	14.18%
Jan-22	33.6	7.45%
Feb-22	36.98	10.07%
Mar-22	39.57	7.02%
Apr-22	44.29	11.91%
May-22	46.22	4.36%
Jun-22	43.66	-5.53%
Jul-22	39.27	-10.07%
Aug-22	33.18	-15.50%
Sep-22	28.06	-15.44%
Oct-22	31.07	10.74%
Nov-22	32.55	4.78%
Dec-22	34.82	6.94%
Jan-23	39.97	14.79%
Feb-23	41.52	3.89%
Mar-23	50.27	21.07%
Apr-23	47.85	-4.81%
May-23	46.44	-2.96%
Jun-23	42.28	-8.95%
Jul-23	41.94	-0.81%
Aug-23	35.67	-14.96%
Sep-23	33.37	-6.44%
Oct-23	35.65	6.84%
Nov-23	35.3	-0.97%
Dec-23	38.67	9.53%
Jan-24	47.83	23.70%
Feb-24	49.01	2.46%
Mar-24	47.91	-2.24%
Apr-24	52.25	9.06%
May-24	52.32	0.13%
Jun-24	40.84	-21.95%
Jul-24	34.56	-15.37%
Aug-24	33	-4.52%
Sep-24	29.61	-10.26%
Oct-24	29.25	-1.22%
Nov-24	32.35	10.60%




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time0 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 time0 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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]0 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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 time0 seconds
R ServerBig Analytics Cloud Computing Center



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