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 computationFri, 17 Dec 2010 21:41:18 +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/17/t1292622029gmud2nrxd4l1z9m.htm/, Retrieved Sat, 04 May 2024 03:59:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111744, Retrieved Sat, 04 May 2024 03:59:10 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact152
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Bouwvergunningen] [2009-11-02 16:57:06] [11ac052cc87d77b9933b02bea117068e]
-   P   [Univariate Data Series] [Bouwvergunningen ...] [2009-11-11 14:29:30] [11ac052cc87d77b9933b02bea117068e]
- RMPD    [Variance Reduction Matrix] [Workshop 6] [2010-12-16 20:00:53] [29e492448d11757ae0fad5ef6e7f8e86]
- RMPD        [ARIMA Forecasting] [] [2010-12-17 21:41:18] [0956ee981dded61b2e7128dae94e5715] [Current]
Feedback Forum

Post a new message
Dataseries X:
2617.2
2506.13
2679.07
2589.73
2457.46
2517.3
2386.53
2453.37
2529.66
2475.14
2525.93
2480.93
2229.85
2169.14
2030.98
2071.37
1953.35
1748.74
1696.58
1900.09
1908.64
1881.46
2100.18
2672.2
3136
2994.38
3168.22
3751.41
3925.43
3719.52
3757.12
3722.23
4127.47
4162.5
4441.82
4325.29
4350.83
4384.47
4639.4
4697.86
4614.76
4471.65
4305.23
4433.57
4388.53
4140.3
4144.38
4070.78
3906.01
3795.91
3703.32
3675.8
3911.06
3912.28
3839.25
3744.63
3549.25
3394.14
3264.26
3328.8
3223.98
3228.01
3112.83
3051.67
3039.71
3125.67
3106.54




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 7 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111744&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]7 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111744&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111744&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 time7 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[61])
493906.01-------
503795.91-------
513703.32-------
523675.8-------
533911.06-------
543912.28-------
553839.25-------
563744.63-------
573549.25-------
583394.14-------
593264.26-------
603328.8-------
613223.98-------
623228.012883.67362605.20153162.14570.00770.008300.0083
633112.832788.73582299.45913278.01250.09710.03921e-040.0406
643051.672970.28992299.18753641.39220.40610.33860.01970.2294
653039.712753.34421896.03273610.65580.25630.24760.00410.141
663125.672396.88091342.98843450.77350.08760.11590.00240.062
673106.542248.419992.9993503.83910.09020.08540.00650.0639

\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[61]) \tabularnewline
49 & 3906.01 & - & - & - & - & - & - & - \tabularnewline
50 & 3795.91 & - & - & - & - & - & - & - \tabularnewline
51 & 3703.32 & - & - & - & - & - & - & - \tabularnewline
52 & 3675.8 & - & - & - & - & - & - & - \tabularnewline
53 & 3911.06 & - & - & - & - & - & - & - \tabularnewline
54 & 3912.28 & - & - & - & - & - & - & - \tabularnewline
55 & 3839.25 & - & - & - & - & - & - & - \tabularnewline
56 & 3744.63 & - & - & - & - & - & - & - \tabularnewline
57 & 3549.25 & - & - & - & - & - & - & - \tabularnewline
58 & 3394.14 & - & - & - & - & - & - & - \tabularnewline
59 & 3264.26 & - & - & - & - & - & - & - \tabularnewline
60 & 3328.8 & - & - & - & - & - & - & - \tabularnewline
61 & 3223.98 & - & - & - & - & - & - & - \tabularnewline
62 & 3228.01 & 2883.6736 & 2605.2015 & 3162.1457 & 0.0077 & 0.0083 & 0 & 0.0083 \tabularnewline
63 & 3112.83 & 2788.7358 & 2299.4591 & 3278.0125 & 0.0971 & 0.0392 & 1e-04 & 0.0406 \tabularnewline
64 & 3051.67 & 2970.2899 & 2299.1875 & 3641.3922 & 0.4061 & 0.3386 & 0.0197 & 0.2294 \tabularnewline
65 & 3039.71 & 2753.3442 & 1896.0327 & 3610.6558 & 0.2563 & 0.2476 & 0.0041 & 0.141 \tabularnewline
66 & 3125.67 & 2396.8809 & 1342.9884 & 3450.7735 & 0.0876 & 0.1159 & 0.0024 & 0.062 \tabularnewline
67 & 3106.54 & 2248.419 & 992.999 & 3503.8391 & 0.0902 & 0.0854 & 0.0065 & 0.0639 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111744&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[61])[/C][/ROW]
[ROW][C]49[/C][C]3906.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]3795.91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]3703.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]3675.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]3911.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]3912.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]3839.25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]3744.63[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]3549.25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]3394.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]3264.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]3328.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]3223.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]3228.01[/C][C]2883.6736[/C][C]2605.2015[/C][C]3162.1457[/C][C]0.0077[/C][C]0.0083[/C][C]0[/C][C]0.0083[/C][/ROW]
[ROW][C]63[/C][C]3112.83[/C][C]2788.7358[/C][C]2299.4591[/C][C]3278.0125[/C][C]0.0971[/C][C]0.0392[/C][C]1e-04[/C][C]0.0406[/C][/ROW]
[ROW][C]64[/C][C]3051.67[/C][C]2970.2899[/C][C]2299.1875[/C][C]3641.3922[/C][C]0.4061[/C][C]0.3386[/C][C]0.0197[/C][C]0.2294[/C][/ROW]
[ROW][C]65[/C][C]3039.71[/C][C]2753.3442[/C][C]1896.0327[/C][C]3610.6558[/C][C]0.2563[/C][C]0.2476[/C][C]0.0041[/C][C]0.141[/C][/ROW]
[ROW][C]66[/C][C]3125.67[/C][C]2396.8809[/C][C]1342.9884[/C][C]3450.7735[/C][C]0.0876[/C][C]0.1159[/C][C]0.0024[/C][C]0.062[/C][/ROW]
[ROW][C]67[/C][C]3106.54[/C][C]2248.419[/C][C]992.999[/C][C]3503.8391[/C][C]0.0902[/C][C]0.0854[/C][C]0.0065[/C][C]0.0639[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111744&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111744&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[61])
493906.01-------
503795.91-------
513703.32-------
523675.8-------
533911.06-------
543912.28-------
553839.25-------
563744.63-------
573549.25-------
583394.14-------
593264.26-------
603328.8-------
613223.98-------
623228.012883.67362605.20153162.14570.00770.008300.0083
633112.832788.73582299.45913278.01250.09710.03921e-040.0406
643051.672970.28992299.18753641.39220.40610.33860.01970.2294
653039.712753.34421896.03273610.65580.25630.24760.00410.141
663125.672396.88091342.98843450.77350.08760.11590.00240.062
673106.542248.419992.9993503.83910.09020.08540.00650.0639







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.04930.11940118567.553500
630.08950.11620.1178105037.052111802.3027334.3685
640.11530.02740.08776622.725876742.4437277.0243
650.15890.1040.091882005.345378058.1691279.3889
660.22430.30410.1342531133.5269168673.2407410.6985
670.28490.38170.1755736371.5971263289.6334513.1176

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0493 & 0.1194 & 0 & 118567.5535 & 0 & 0 \tabularnewline
63 & 0.0895 & 0.1162 & 0.1178 & 105037.052 & 111802.3027 & 334.3685 \tabularnewline
64 & 0.1153 & 0.0274 & 0.0877 & 6622.7258 & 76742.4437 & 277.0243 \tabularnewline
65 & 0.1589 & 0.104 & 0.0918 & 82005.3453 & 78058.1691 & 279.3889 \tabularnewline
66 & 0.2243 & 0.3041 & 0.1342 & 531133.5269 & 168673.2407 & 410.6985 \tabularnewline
67 & 0.2849 & 0.3817 & 0.1755 & 736371.5971 & 263289.6334 & 513.1176 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111744&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]62[/C][C]0.0493[/C][C]0.1194[/C][C]0[/C][C]118567.5535[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]0.0895[/C][C]0.1162[/C][C]0.1178[/C][C]105037.052[/C][C]111802.3027[/C][C]334.3685[/C][/ROW]
[ROW][C]64[/C][C]0.1153[/C][C]0.0274[/C][C]0.0877[/C][C]6622.7258[/C][C]76742.4437[/C][C]277.0243[/C][/ROW]
[ROW][C]65[/C][C]0.1589[/C][C]0.104[/C][C]0.0918[/C][C]82005.3453[/C][C]78058.1691[/C][C]279.3889[/C][/ROW]
[ROW][C]66[/C][C]0.2243[/C][C]0.3041[/C][C]0.1342[/C][C]531133.5269[/C][C]168673.2407[/C][C]410.6985[/C][/ROW]
[ROW][C]67[/C][C]0.2849[/C][C]0.3817[/C][C]0.1755[/C][C]736371.5971[/C][C]263289.6334[/C][C]513.1176[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111744&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111744&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
620.04930.11940118567.553500
630.08950.11620.1178105037.052111802.3027334.3685
640.11530.02740.08776622.725876742.4437277.0243
650.15890.1040.091882005.345378058.1691279.3889
660.22430.30410.1342531133.5269168673.2407410.6985
670.28490.38170.1755736371.5971263289.6334513.1176



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