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 computationWed, 29 Dec 2010 16:24: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/29/t1293640431vlxfpzyxecasfie.htm/, Retrieved Fri, 03 May 2024 06:26:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116964, Retrieved Fri, 03 May 2024 06:26:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact124
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2010-12-29 16:24:18] [0956ee981dded61b2e7128dae94e5715] [Current]
Feedback Forum

Post a new message
Dataseries X:
1203.6
1180.59
1156.85
1191.5
1191.33
1234.18
1220.33
1228.81
1207.01
1249.48
1248.29
1280.08
1280.66
1294.87
1310.61
1270.09
1270.2
1276.66
1303.82
1335.85
1377.94
1400.63
1418.3
1438.24
1406.82
1420.86
1482.37
1530.62
1503.35
1455.27
1473.99
1526.75
1549.38
1481.14
1468.36
1378.55
1330.63
1322.7
1385.59
1400.38
1280
1267.38
1282.83
1166.36
968.75
896.24
903.25
825.88
735.09
797.87
872.81
919.14
919.32
987.48
1020.62
1057.08
1036.19
1095.63
1115.1
1073.87
1104.49
1169.43
1186.69
1089.41
1030.71
1101.6
1049.33
1141.2
1183.26
1180.55
1258.51




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116964&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116964&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116964&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[65])
53919.32-------
54987.48-------
551020.62-------
561057.08-------
571036.19-------
581095.63-------
591115.1-------
601073.87-------
611104.49-------
621169.43-------
631186.69-------
641089.41-------
651030.71-------
661101.61011.0416890.64211118.55570.04940.360.66620.36
671049.331004.6128793.46851178.51660.30710.13720.42840.3843
681141.21002.5295710.07491227.16120.11310.34150.3170.4029
691183.261001.8564633.63831267.25490.09020.15170.39990.4156
701180.551001.6391559.68831301.27270.12090.11740.26930.4246
711258.511001.5689484.69031330.9230.06310.14340.24960.4312

\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[65]) \tabularnewline
53 & 919.32 & - & - & - & - & - & - & - \tabularnewline
54 & 987.48 & - & - & - & - & - & - & - \tabularnewline
55 & 1020.62 & - & - & - & - & - & - & - \tabularnewline
56 & 1057.08 & - & - & - & - & - & - & - \tabularnewline
57 & 1036.19 & - & - & - & - & - & - & - \tabularnewline
58 & 1095.63 & - & - & - & - & - & - & - \tabularnewline
59 & 1115.1 & - & - & - & - & - & - & - \tabularnewline
60 & 1073.87 & - & - & - & - & - & - & - \tabularnewline
61 & 1104.49 & - & - & - & - & - & - & - \tabularnewline
62 & 1169.43 & - & - & - & - & - & - & - \tabularnewline
63 & 1186.69 & - & - & - & - & - & - & - \tabularnewline
64 & 1089.41 & - & - & - & - & - & - & - \tabularnewline
65 & 1030.71 & - & - & - & - & - & - & - \tabularnewline
66 & 1101.6 & 1011.0416 & 890.6421 & 1118.5557 & 0.0494 & 0.36 & 0.6662 & 0.36 \tabularnewline
67 & 1049.33 & 1004.6128 & 793.4685 & 1178.5166 & 0.3071 & 0.1372 & 0.4284 & 0.3843 \tabularnewline
68 & 1141.2 & 1002.5295 & 710.0749 & 1227.1612 & 0.1131 & 0.3415 & 0.317 & 0.4029 \tabularnewline
69 & 1183.26 & 1001.8564 & 633.6383 & 1267.2549 & 0.0902 & 0.1517 & 0.3999 & 0.4156 \tabularnewline
70 & 1180.55 & 1001.6391 & 559.6883 & 1301.2727 & 0.1209 & 0.1174 & 0.2693 & 0.4246 \tabularnewline
71 & 1258.51 & 1001.5689 & 484.6903 & 1330.923 & 0.0631 & 0.1434 & 0.2496 & 0.4312 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116964&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[65])[/C][/ROW]
[ROW][C]53[/C][C]919.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]987.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]1020.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]1057.08[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1036.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1095.63[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]1115.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]1073.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]1104.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]1169.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]1186.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]1089.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]1030.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]1101.6[/C][C]1011.0416[/C][C]890.6421[/C][C]1118.5557[/C][C]0.0494[/C][C]0.36[/C][C]0.6662[/C][C]0.36[/C][/ROW]
[ROW][C]67[/C][C]1049.33[/C][C]1004.6128[/C][C]793.4685[/C][C]1178.5166[/C][C]0.3071[/C][C]0.1372[/C][C]0.4284[/C][C]0.3843[/C][/ROW]
[ROW][C]68[/C][C]1141.2[/C][C]1002.5295[/C][C]710.0749[/C][C]1227.1612[/C][C]0.1131[/C][C]0.3415[/C][C]0.317[/C][C]0.4029[/C][/ROW]
[ROW][C]69[/C][C]1183.26[/C][C]1001.8564[/C][C]633.6383[/C][C]1267.2549[/C][C]0.0902[/C][C]0.1517[/C][C]0.3999[/C][C]0.4156[/C][/ROW]
[ROW][C]70[/C][C]1180.55[/C][C]1001.6391[/C][C]559.6883[/C][C]1301.2727[/C][C]0.1209[/C][C]0.1174[/C][C]0.2693[/C][C]0.4246[/C][/ROW]
[ROW][C]71[/C][C]1258.51[/C][C]1001.5689[/C][C]484.6903[/C][C]1330.923[/C][C]0.0631[/C][C]0.1434[/C][C]0.2496[/C][C]0.4312[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116964&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116964&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[65])
53919.32-------
54987.48-------
551020.62-------
561057.08-------
571036.19-------
581095.63-------
591115.1-------
601073.87-------
611104.49-------
621169.43-------
631186.69-------
641089.41-------
651030.71-------
661101.61011.0416890.64211118.55570.04940.360.66620.36
671049.331004.6128793.46851178.51660.30710.13720.42840.3843
681141.21002.5295710.07491227.16120.11310.34150.3170.4029
691183.261001.8564633.63831267.25490.09020.15170.39990.4156
701180.551001.6391559.68831301.27270.12090.11740.26930.4246
711258.511001.5689484.69031330.9230.06310.14340.24960.4312







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
660.05430.089608200.826100
670.08830.04450.0671999.6295100.227571.4159
680.11430.13830.090819229.49679809.983999.0454
690.13520.18110.113432907.270115584.3055124.8371
700.15260.17860.126432009.117418869.2678137.3655
710.16780.25650.148166018.704226727.5072163.4855

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
66 & 0.0543 & 0.0896 & 0 & 8200.8261 & 0 & 0 \tabularnewline
67 & 0.0883 & 0.0445 & 0.067 & 1999.629 & 5100.2275 & 71.4159 \tabularnewline
68 & 0.1143 & 0.1383 & 0.0908 & 19229.4967 & 9809.9839 & 99.0454 \tabularnewline
69 & 0.1352 & 0.1811 & 0.1134 & 32907.2701 & 15584.3055 & 124.8371 \tabularnewline
70 & 0.1526 & 0.1786 & 0.1264 & 32009.1174 & 18869.2678 & 137.3655 \tabularnewline
71 & 0.1678 & 0.2565 & 0.1481 & 66018.7042 & 26727.5072 & 163.4855 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116964&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]66[/C][C]0.0543[/C][C]0.0896[/C][C]0[/C][C]8200.8261[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]67[/C][C]0.0883[/C][C]0.0445[/C][C]0.067[/C][C]1999.629[/C][C]5100.2275[/C][C]71.4159[/C][/ROW]
[ROW][C]68[/C][C]0.1143[/C][C]0.1383[/C][C]0.0908[/C][C]19229.4967[/C][C]9809.9839[/C][C]99.0454[/C][/ROW]
[ROW][C]69[/C][C]0.1352[/C][C]0.1811[/C][C]0.1134[/C][C]32907.2701[/C][C]15584.3055[/C][C]124.8371[/C][/ROW]
[ROW][C]70[/C][C]0.1526[/C][C]0.1786[/C][C]0.1264[/C][C]32009.1174[/C][C]18869.2678[/C][C]137.3655[/C][/ROW]
[ROW][C]71[/C][C]0.1678[/C][C]0.2565[/C][C]0.1481[/C][C]66018.7042[/C][C]26727.5072[/C][C]163.4855[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116964&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116964&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
660.05430.089608200.826100
670.08830.04450.0671999.6295100.227571.4159
680.11430.13830.090819229.49679809.983999.0454
690.13520.18110.113432907.270115584.3055124.8371
700.15260.17860.126432009.117418869.2678137.3655
710.16780.25650.148166018.704226727.5072163.4855



Parameters (Session):
par1 = 12 ;
Parameters (R input):
par1 = 6 ; par2 = 2.0 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 1 ; 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.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')