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, 20 Dec 2011 13:16:40 -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/2011/Dec/20/t1324405272zzddjaykqtakqh9.htm/, Retrieved Mon, 06 May 2024 02:27:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=158119, Retrieved Mon, 06 May 2024 02:27:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact174
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]
-    D      [ARIMA Forecasting] [WS 9 Forecasting ...] [2010-12-03 22:01:04] [8081b8996d5947580de3eb171e82db4f]
-   PD        [ARIMA Forecasting] [Workshop 9, Forecast] [2010-12-05 20:21:31] [3635fb7041b1998c5a1332cf9de22bce]
-   P           [ARIMA Forecasting] [ARIMA Extrapolati...] [2010-12-06 22:58:10] [3635fb7041b1998c5a1332cf9de22bce]
-   P             [ARIMA Forecasting] [Verbetering WS9] [2010-12-14 19:20:19] [3635fb7041b1998c5a1332cf9de22bce]
- R PD              [ARIMA Forecasting] [WS9 ARIMA forecas...] [2011-12-03 10:54:00] [74be16979710d4c4e7c6647856088456]
- R PD                  [ARIMA Forecasting] [paper] [2011-12-20 18:16:40] [6e647d331a8f33aa61a2d78ef323178e] [Current]
Feedback Forum

Post a new message
Dataseries X:
589
559
623
617
603
558
609
583
570
543
598
569
552
514
569
529
515
481
536
498
446
503
470
458
437
502
482
474
457
522
513
515
506
576
556
559
541
606
600
588
570
626
601
588
573
622
570
547
512
554
517
506
479
527
508
532
532
588
566
573
545
597
555
548
524
572




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=158119&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 time1 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[58])
54527-------
55508-------
56532-------
57532-------
58588-------
59566566.2729525.259607.28690.49480.14960.99730.1496
60573591.2025542.081640.32410.23380.84270.99090.5508
61545590.8857532.3699649.40150.06220.72540.97570.5385
62597646.9937581.1561712.83130.06830.99880.96050.9605
63555625.2298527.8568722.60290.07870.71510.88340.7732
64548650.172537.0522763.29180.03830.95040.90940.8593
65524649.8508520.6604779.04120.02810.93890.94420.826
66572705.9603563.1966848.72390.03290.99380.93270.9473

\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[58]) \tabularnewline
54 & 527 & - & - & - & - & - & - & - \tabularnewline
55 & 508 & - & - & - & - & - & - & - \tabularnewline
56 & 532 & - & - & - & - & - & - & - \tabularnewline
57 & 532 & - & - & - & - & - & - & - \tabularnewline
58 & 588 & - & - & - & - & - & - & - \tabularnewline
59 & 566 & 566.2729 & 525.259 & 607.2869 & 0.4948 & 0.1496 & 0.9973 & 0.1496 \tabularnewline
60 & 573 & 591.2025 & 542.081 & 640.3241 & 0.2338 & 0.8427 & 0.9909 & 0.5508 \tabularnewline
61 & 545 & 590.8857 & 532.3699 & 649.4015 & 0.0622 & 0.7254 & 0.9757 & 0.5385 \tabularnewline
62 & 597 & 646.9937 & 581.1561 & 712.8313 & 0.0683 & 0.9988 & 0.9605 & 0.9605 \tabularnewline
63 & 555 & 625.2298 & 527.8568 & 722.6029 & 0.0787 & 0.7151 & 0.8834 & 0.7732 \tabularnewline
64 & 548 & 650.172 & 537.0522 & 763.2918 & 0.0383 & 0.9504 & 0.9094 & 0.8593 \tabularnewline
65 & 524 & 649.8508 & 520.6604 & 779.0412 & 0.0281 & 0.9389 & 0.9442 & 0.826 \tabularnewline
66 & 572 & 705.9603 & 563.1966 & 848.7239 & 0.0329 & 0.9938 & 0.9327 & 0.9473 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=158119&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[58])[/C][/ROW]
[ROW][C]54[/C][C]527[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]508[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]588[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]566[/C][C]566.2729[/C][C]525.259[/C][C]607.2869[/C][C]0.4948[/C][C]0.1496[/C][C]0.9973[/C][C]0.1496[/C][/ROW]
[ROW][C]60[/C][C]573[/C][C]591.2025[/C][C]542.081[/C][C]640.3241[/C][C]0.2338[/C][C]0.8427[/C][C]0.9909[/C][C]0.5508[/C][/ROW]
[ROW][C]61[/C][C]545[/C][C]590.8857[/C][C]532.3699[/C][C]649.4015[/C][C]0.0622[/C][C]0.7254[/C][C]0.9757[/C][C]0.5385[/C][/ROW]
[ROW][C]62[/C][C]597[/C][C]646.9937[/C][C]581.1561[/C][C]712.8313[/C][C]0.0683[/C][C]0.9988[/C][C]0.9605[/C][C]0.9605[/C][/ROW]
[ROW][C]63[/C][C]555[/C][C]625.2298[/C][C]527.8568[/C][C]722.6029[/C][C]0.0787[/C][C]0.7151[/C][C]0.8834[/C][C]0.7732[/C][/ROW]
[ROW][C]64[/C][C]548[/C][C]650.172[/C][C]537.0522[/C][C]763.2918[/C][C]0.0383[/C][C]0.9504[/C][C]0.9094[/C][C]0.8593[/C][/ROW]
[ROW][C]65[/C][C]524[/C][C]649.8508[/C][C]520.6604[/C][C]779.0412[/C][C]0.0281[/C][C]0.9389[/C][C]0.9442[/C][C]0.826[/C][/ROW]
[ROW][C]66[/C][C]572[/C][C]705.9603[/C][C]563.1966[/C][C]848.7239[/C][C]0.0329[/C][C]0.9938[/C][C]0.9327[/C][C]0.9473[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=158119&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=158119&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[58])
54527-------
55508-------
56532-------
57532-------
58588-------
59566566.2729525.259607.28690.49480.14960.99730.1496
60573591.2025542.081640.32410.23380.84270.99090.5508
61545590.8857532.3699649.40150.06220.72540.97570.5385
62597646.9937581.1561712.83130.06830.99880.96050.9605
63555625.2298527.8568722.60290.07870.71510.88340.7732
64548650.172537.0522763.29180.03830.95040.90940.8593
65524649.8508520.6604779.04120.02810.93890.94420.826
66572705.9603563.1966848.72390.03290.99380.93270.9473







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
590.037-5e-0400.074500
600.0424-0.03080.0156331.3328165.703612.8726
610.0505-0.07770.03632105.4941812.300528.5009
620.0519-0.07730.04652499.36841234.067535.1293
630.0795-0.11230.05974932.22571973.699144.4263
640.0888-0.15710.075910439.10993384.600958.1773
650.1014-0.19370.092815838.42345163.718471.859
660.1032-0.18980.104917945.35596761.423182.2279

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
59 & 0.037 & -5e-04 & 0 & 0.0745 & 0 & 0 \tabularnewline
60 & 0.0424 & -0.0308 & 0.0156 & 331.3328 & 165.7036 & 12.8726 \tabularnewline
61 & 0.0505 & -0.0777 & 0.0363 & 2105.4941 & 812.3005 & 28.5009 \tabularnewline
62 & 0.0519 & -0.0773 & 0.0465 & 2499.3684 & 1234.0675 & 35.1293 \tabularnewline
63 & 0.0795 & -0.1123 & 0.0597 & 4932.2257 & 1973.6991 & 44.4263 \tabularnewline
64 & 0.0888 & -0.1571 & 0.0759 & 10439.1099 & 3384.6009 & 58.1773 \tabularnewline
65 & 0.1014 & -0.1937 & 0.0928 & 15838.4234 & 5163.7184 & 71.859 \tabularnewline
66 & 0.1032 & -0.1898 & 0.1049 & 17945.3559 & 6761.4231 & 82.2279 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=158119&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]59[/C][C]0.037[/C][C]-5e-04[/C][C]0[/C][C]0.0745[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]0.0424[/C][C]-0.0308[/C][C]0.0156[/C][C]331.3328[/C][C]165.7036[/C][C]12.8726[/C][/ROW]
[ROW][C]61[/C][C]0.0505[/C][C]-0.0777[/C][C]0.0363[/C][C]2105.4941[/C][C]812.3005[/C][C]28.5009[/C][/ROW]
[ROW][C]62[/C][C]0.0519[/C][C]-0.0773[/C][C]0.0465[/C][C]2499.3684[/C][C]1234.0675[/C][C]35.1293[/C][/ROW]
[ROW][C]63[/C][C]0.0795[/C][C]-0.1123[/C][C]0.0597[/C][C]4932.2257[/C][C]1973.6991[/C][C]44.4263[/C][/ROW]
[ROW][C]64[/C][C]0.0888[/C][C]-0.1571[/C][C]0.0759[/C][C]10439.1099[/C][C]3384.6009[/C][C]58.1773[/C][/ROW]
[ROW][C]65[/C][C]0.1014[/C][C]-0.1937[/C][C]0.0928[/C][C]15838.4234[/C][C]5163.7184[/C][C]71.859[/C][/ROW]
[ROW][C]66[/C][C]0.1032[/C][C]-0.1898[/C][C]0.1049[/C][C]17945.3559[/C][C]6761.4231[/C][C]82.2279[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=158119&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=158119&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
590.037-5e-0400.074500
600.0424-0.03080.0156331.3328165.703612.8726
610.0505-0.07770.03632105.4941812.300528.5009
620.0519-0.07730.04652499.36841234.067535.1293
630.0795-0.11230.05974932.22571973.699144.4263
640.0888-0.15710.075910439.10993384.600958.1773
650.1014-0.19370.092815838.42345163.718471.859
660.1032-0.18980.104917945.35596761.423182.2279



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