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, 07 Dec 2010 16:42:35 +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/07/t129174005446131svp7hbnpds.htm/, Retrieved Fri, 03 May 2024 22:16:09 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106508, Retrieved Fri, 03 May 2024 22:16:09 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact134
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [Univariate Data Series] [Identifying Integ...] [2009-11-22 12:08:06] [b98453cac15ba1066b407e146608df68]
- RMP         [Standard Deviation-Mean Plot] [Births] [2010-11-29 10:52:49] [b98453cac15ba1066b407e146608df68]
- RMP           [ARIMA Forecasting] [Births] [2010-11-29 20:53:49] [b98453cac15ba1066b407e146608df68]
- R PD              [ARIMA Forecasting] [Workshop 9 (7)] [2010-12-07 16:42:35] [c9b1b69acb8f4b2b921fdfd5091a94b7] [Current]
Feedback Forum

Post a new message
Dataseries X:
12008
9169
8788
8417
8247
8197
8236
8253
7733
8366
8626
8863
10102
8463
9114
8563
8872
8301
8301
8278
7736
7973
8268
9476
11100
8962
9173
8738
8459
8078
8411
8291
7810
8616
8312
9692
9911
8915
9452
9112
8472
8230
8384
8625
8221
8649
8625
10443
10357
8586
8892
8329
8101
7922
8120
7838
7735
8406
8209
9451
10041
9411
10405
8467
8464
8102
7627
7513
7510
8291
8064
9383
9706
8579
9474
8318
8213
8059
9111
7708
7680
8014
8007
8718
9486
9113
9025
8476
7952
7759
7835
7600
7651
8319
8812
8630




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106508&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106508&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106508&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[90])
848718-------
859486-------
869113-------
879025-------
888476-------
897952-------
907759-------
9178358819.50357941.44469697.56240.0140.9910.06840.991
9276007716.49486746.22068686.7690.4070.40540.00240.4658
9376517899.05866909.54268888.57470.31160.72320.01290.6093
9483198145.23987151.51929138.96030.36590.83520.25710.7769
9588128206.16797211.53079200.80520.11630.4120.69180.8109
9686308962.2257967.43539957.01470.25640.61640.99110.9911

\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[90]) \tabularnewline
84 & 8718 & - & - & - & - & - & - & - \tabularnewline
85 & 9486 & - & - & - & - & - & - & - \tabularnewline
86 & 9113 & - & - & - & - & - & - & - \tabularnewline
87 & 9025 & - & - & - & - & - & - & - \tabularnewline
88 & 8476 & - & - & - & - & - & - & - \tabularnewline
89 & 7952 & - & - & - & - & - & - & - \tabularnewline
90 & 7759 & - & - & - & - & - & - & - \tabularnewline
91 & 7835 & 8819.5035 & 7941.4446 & 9697.5624 & 0.014 & 0.991 & 0.0684 & 0.991 \tabularnewline
92 & 7600 & 7716.4948 & 6746.2206 & 8686.769 & 0.407 & 0.4054 & 0.0024 & 0.4658 \tabularnewline
93 & 7651 & 7899.0586 & 6909.5426 & 8888.5747 & 0.3116 & 0.7232 & 0.0129 & 0.6093 \tabularnewline
94 & 8319 & 8145.2398 & 7151.5192 & 9138.9603 & 0.3659 & 0.8352 & 0.2571 & 0.7769 \tabularnewline
95 & 8812 & 8206.1679 & 7211.5307 & 9200.8052 & 0.1163 & 0.412 & 0.6918 & 0.8109 \tabularnewline
96 & 8630 & 8962.225 & 7967.4353 & 9957.0147 & 0.2564 & 0.6164 & 0.9911 & 0.9911 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106508&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[90])[/C][/ROW]
[ROW][C]84[/C][C]8718[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]9486[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]9113[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]9025[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]8476[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]7952[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]7759[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]7835[/C][C]8819.5035[/C][C]7941.4446[/C][C]9697.5624[/C][C]0.014[/C][C]0.991[/C][C]0.0684[/C][C]0.991[/C][/ROW]
[ROW][C]92[/C][C]7600[/C][C]7716.4948[/C][C]6746.2206[/C][C]8686.769[/C][C]0.407[/C][C]0.4054[/C][C]0.0024[/C][C]0.4658[/C][/ROW]
[ROW][C]93[/C][C]7651[/C][C]7899.0586[/C][C]6909.5426[/C][C]8888.5747[/C][C]0.3116[/C][C]0.7232[/C][C]0.0129[/C][C]0.6093[/C][/ROW]
[ROW][C]94[/C][C]8319[/C][C]8145.2398[/C][C]7151.5192[/C][C]9138.9603[/C][C]0.3659[/C][C]0.8352[/C][C]0.2571[/C][C]0.7769[/C][/ROW]
[ROW][C]95[/C][C]8812[/C][C]8206.1679[/C][C]7211.5307[/C][C]9200.8052[/C][C]0.1163[/C][C]0.412[/C][C]0.6918[/C][C]0.8109[/C][/ROW]
[ROW][C]96[/C][C]8630[/C][C]8962.225[/C][C]7967.4353[/C][C]9957.0147[/C][C]0.2564[/C][C]0.6164[/C][C]0.9911[/C][C]0.9911[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106508&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106508&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[90])
848718-------
859486-------
869113-------
879025-------
888476-------
897952-------
907759-------
9178358819.50357941.44469697.56240.0140.9910.06840.991
9276007716.49486746.22068686.7690.4070.40540.00240.4658
9376517899.05866909.54268888.57470.31160.72320.01290.6093
9483198145.23987151.51929138.96030.36590.83520.25710.7769
9588128206.16797211.53079200.80520.11630.4120.69180.8109
9686308962.2257967.43539957.01470.25640.61640.99110.9911







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
910.0508-0.11160969247.183800
920.0642-0.01510.063413571.0401491409.1119701.0058
930.0639-0.03140.052761533.0913348117.105590.0145
940.06220.02130.044930192.6174268635.9831518.3011
950.06180.07380.0507367032.4783288315.2822536.95
960.0566-0.03710.0484110373.4489258658.31508.5846

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
91 & 0.0508 & -0.1116 & 0 & 969247.1838 & 0 & 0 \tabularnewline
92 & 0.0642 & -0.0151 & 0.0634 & 13571.0401 & 491409.1119 & 701.0058 \tabularnewline
93 & 0.0639 & -0.0314 & 0.0527 & 61533.0913 & 348117.105 & 590.0145 \tabularnewline
94 & 0.0622 & 0.0213 & 0.0449 & 30192.6174 & 268635.9831 & 518.3011 \tabularnewline
95 & 0.0618 & 0.0738 & 0.0507 & 367032.4783 & 288315.2822 & 536.95 \tabularnewline
96 & 0.0566 & -0.0371 & 0.0484 & 110373.4489 & 258658.31 & 508.5846 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106508&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]91[/C][C]0.0508[/C][C]-0.1116[/C][C]0[/C][C]969247.1838[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]92[/C][C]0.0642[/C][C]-0.0151[/C][C]0.0634[/C][C]13571.0401[/C][C]491409.1119[/C][C]701.0058[/C][/ROW]
[ROW][C]93[/C][C]0.0639[/C][C]-0.0314[/C][C]0.0527[/C][C]61533.0913[/C][C]348117.105[/C][C]590.0145[/C][/ROW]
[ROW][C]94[/C][C]0.0622[/C][C]0.0213[/C][C]0.0449[/C][C]30192.6174[/C][C]268635.9831[/C][C]518.3011[/C][/ROW]
[ROW][C]95[/C][C]0.0618[/C][C]0.0738[/C][C]0.0507[/C][C]367032.4783[/C][C]288315.2822[/C][C]536.95[/C][/ROW]
[ROW][C]96[/C][C]0.0566[/C][C]-0.0371[/C][C]0.0484[/C][C]110373.4489[/C][C]258658.31[/C][C]508.5846[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106508&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106508&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
910.0508-0.11160969247.183800
920.0642-0.01510.063413571.0401491409.1119701.0058
930.0639-0.03140.052761533.0913348117.105590.0145
940.06220.02130.044930192.6174268635.9831518.3011
950.06180.07380.0507367032.4783288315.2822536.95
960.0566-0.03710.0484110373.4489258658.31508.5846



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