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 computationThu, 20 Dec 2012 09:10:52 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/20/t1356012660o3isd490it6dyvl.htm/, Retrieved Fri, 19 Apr 2024 02:11:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=202692, Retrieved Fri, 19 Apr 2024 02:11:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact140
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
- R PD      [ARIMA Forecasting] [Apple Inc - ARIMA...] [2010-12-17 14:53:25] [afe9379cca749d06b3d6872e02cc47ed]
- R PD          [ARIMA Forecasting] [] [2012-12-20 14:10:52] [14d0a7ecb926325afa0eb6a607fbc7a0] [Current]
Feedback Forum

Post a new message
Dataseries X:
26.81
28.24
27.58
27.98
27.84
27.49
26.97
27.71
27.46
27.04
28.00
27.32
26.36
26.15
25.94
24.00
24.32
23.10
22.92
23.56
22.17
22.36
19.86
20.07
19.21
19.99
20.47
21.17
21.25
21.18
21.21
21.11
21.94
22.56
23.23
19.50
19.32
19.00
18.98
19.88
19.48
19.52
19.52
19.75
19.64
20.23
20.40
20.91
21.95
21.83
22.27
21.99
21.66
20.32
20.62
20.28
20.79
22.86
22.59
23.29
21.87
21.52
22.00




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gertrude Mary Cox' @ cox.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 & 2 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202692&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]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202692&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202692&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'Gertrude Mary Cox' @ cox.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[59])
5520.62-------
5620.28-------
5720.79-------
5822.86-------
5922.59-------
6023.2922.714921.013524.5540.270.55290.99530.5529
6121.8722.565320.320525.05820.29230.28440.91860.4923
6221.5222.093919.468225.07370.35290.55850.30720.3721
632222.131419.144325.58460.47030.63570.39730.3973

\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[59]) \tabularnewline
55 & 20.62 & - & - & - & - & - & - & - \tabularnewline
56 & 20.28 & - & - & - & - & - & - & - \tabularnewline
57 & 20.79 & - & - & - & - & - & - & - \tabularnewline
58 & 22.86 & - & - & - & - & - & - & - \tabularnewline
59 & 22.59 & - & - & - & - & - & - & - \tabularnewline
60 & 23.29 & 22.7149 & 21.0135 & 24.554 & 0.27 & 0.5529 & 0.9953 & 0.5529 \tabularnewline
61 & 21.87 & 22.5653 & 20.3205 & 25.0582 & 0.2923 & 0.2844 & 0.9186 & 0.4923 \tabularnewline
62 & 21.52 & 22.0939 & 19.4682 & 25.0737 & 0.3529 & 0.5585 & 0.3072 & 0.3721 \tabularnewline
63 & 22 & 22.1314 & 19.1443 & 25.5846 & 0.4703 & 0.6357 & 0.3973 & 0.3973 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202692&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[59])[/C][/ROW]
[ROW][C]55[/C][C]20.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]20.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]20.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]22.86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]22.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]23.29[/C][C]22.7149[/C][C]21.0135[/C][C]24.554[/C][C]0.27[/C][C]0.5529[/C][C]0.9953[/C][C]0.5529[/C][/ROW]
[ROW][C]61[/C][C]21.87[/C][C]22.5653[/C][C]20.3205[/C][C]25.0582[/C][C]0.2923[/C][C]0.2844[/C][C]0.9186[/C][C]0.4923[/C][/ROW]
[ROW][C]62[/C][C]21.52[/C][C]22.0939[/C][C]19.4682[/C][C]25.0737[/C][C]0.3529[/C][C]0.5585[/C][C]0.3072[/C][C]0.3721[/C][/ROW]
[ROW][C]63[/C][C]22[/C][C]22.1314[/C][C]19.1443[/C][C]25.5846[/C][C]0.4703[/C][C]0.6357[/C][C]0.3973[/C][C]0.3973[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202692&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202692&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[59])
5520.62-------
5620.28-------
5720.79-------
5822.86-------
5922.59-------
6023.2922.714921.013524.5540.270.55290.99530.5529
6121.8722.565320.320525.05820.29230.28440.91860.4923
6221.5222.093919.468225.07370.35290.55850.30720.3721
632222.131419.144325.58460.47030.63570.39730.3973







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
600.04130.025300.330800
610.0564-0.03080.02810.48350.40710.6381
620.0688-0.0260.02740.32940.38120.6174
630.0796-0.00590.0220.01730.29020.5387

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
60 & 0.0413 & 0.0253 & 0 & 0.3308 & 0 & 0 \tabularnewline
61 & 0.0564 & -0.0308 & 0.0281 & 0.4835 & 0.4071 & 0.6381 \tabularnewline
62 & 0.0688 & -0.026 & 0.0274 & 0.3294 & 0.3812 & 0.6174 \tabularnewline
63 & 0.0796 & -0.0059 & 0.022 & 0.0173 & 0.2902 & 0.5387 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=202692&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]60[/C][C]0.0413[/C][C]0.0253[/C][C]0[/C][C]0.3308[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]61[/C][C]0.0564[/C][C]-0.0308[/C][C]0.0281[/C][C]0.4835[/C][C]0.4071[/C][C]0.6381[/C][/ROW]
[ROW][C]62[/C][C]0.0688[/C][C]-0.026[/C][C]0.0274[/C][C]0.3294[/C][C]0.3812[/C][C]0.6174[/C][/ROW]
[ROW][C]63[/C][C]0.0796[/C][C]-0.0059[/C][C]0.022[/C][C]0.0173[/C][C]0.2902[/C][C]0.5387[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=202692&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=202692&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
600.04130.025300.330800
610.0564-0.03080.02810.48350.40710.6381
620.0688-0.0260.02740.32940.38120.6174
630.0796-0.00590.0220.01730.29020.5387



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