| Paper - Werkloosheid 25-50 jaar (leeftijd) ARIMA | *The author of this computation has been verified* | R Software Module: /rwasp_arimaforecasting.wasp (opens new window with default values) | Title produced by software: ARIMA Forecasting | Date of computation: Fri, 03 Dec 2010 12:22:40 +0000 | | Cite this page as follows: | Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379259udxtzuh238zvvyn.htm/, Retrieved Fri, 03 Dec 2010 13:27:41 +0100 | | BibTeX entries for LaTeX users: | @Manual{KEY,
author = {{YOUR NAME}},
publisher = {Office for Research Development and Education},
title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379259udxtzuh238zvvyn.htm/},
year = {2010},
}
@Manual{R,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Development Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2010},
note = {{ISBN} 3-900051-07-0},
url = {http://www.R-project.org},
}
| | Original text written by user: | | | IsPrivate? | No (this computation is public) | | User-defined keywords: | | | Dataseries X: | » Textbox « » Textfile « » CSV « | 376.974
377.632
378.205
370.861
369.167
371.551
382.842
381.903
384.502
392.058
384.359
388.884
386.586
387.495
385.705
378.67
377.367
376.911
389.827
387.82
387.267
380.575
372.402
376.74
377.795
376.126
370.804
367.98
367.866
366.121
379.421
378.519
372.423
355.072
344.693
342.892
344.178
337.606
327.103
323.953
316.532
306.307
327.225
329.573
313.761
307.836
300.074
304.198
306.122
300.414
292.133
290.616
280.244
285.179
305.486
305.957
293.886
289.441
288.776
299.149
306.532
309.914
313.468
314.901
309.16
316.15
336.544
339.196
326.738
320.838
318.62
331.533
335.378 | | Output produced by software: |
Univariate ARIMA Extrapolation Forecast | 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]) | 49 | 306.122 | - | - | - | - | - | - | - | 50 | 300.414 | - | - | - | - | - | - | - | 51 | 292.133 | - | - | - | - | - | - | - | 52 | 290.616 | - | - | - | - | - | - | - | 53 | 280.244 | - | - | - | - | - | - | - | 54 | 285.179 | - | - | - | - | - | - | - | 55 | 305.486 | - | - | - | - | - | - | - | 56 | 305.957 | - | - | - | - | - | - | - | 57 | 293.886 | - | - | - | - | - | - | - | 58 | 289.441 | - | - | - | - | - | - | - | 59 | 288.776 | - | - | - | - | - | - | - | 60 | 299.149 | - | - | - | - | - | - | - | 61 | 306.532 | - | - | - | - | - | - | - | 62 | 309.914 | 303.1343 | 291.6269 | 314.2206 | 0.1153 | 0.274 | 0.6847 | 0.274 | 63 | 313.468 | 297.0394 | 279.2289 | 313.8409 | 0.0277 | 0.0666 | 0.7165 | 0.1341 | 64 | 314.901 | 297.439 | 274.2727 | 318.927 | 0.0556 | 0.0719 | 0.7331 | 0.2034 | 65 | 309.16 | 289.0609 | 259.8696 | 315.5634 | 0.0686 | 0.028 | 0.7428 | 0.0982 | 66 | 316.15 | 295.383 | 261.8594 | 325.4718 | 0.0881 | 0.1847 | 0.7469 | 0.2338 | 67 | 336.544 | 316.3196 | 280.7306 | 348.2908 | 0.1075 | 0.5041 | 0.7467 | 0.7258 | 68 | 339.196 | 317.9239 | 278.0864 | 353.2975 | 0.1193 | 0.1511 | 0.7464 | 0.736 | 69 | 326.738 | 307.3923 | 261.3713 | 347.3688 | 0.1714 | 0.0595 | 0.7461 | 0.5168 | 70 | 320.838 | 304.1142 | 252.858 | 347.8991 | 0.227 | 0.1556 | 0.7444 | 0.4569 | 71 | 318.62 | 304.3507 | 248.521 | 351.4199 | 0.2762 | 0.2462 | 0.7417 | 0.4638 | 72 | 331.533 | 314.9641 | 257.0406 | 363.7786 | 0.2529 | 0.4416 | 0.7373 | 0.6325 | 73 | 335.378 | 322.6457 | 262.2071 | 373.4272 | 0.3116 | 0.3658 | 0.733 | 0.733 |
Univariate ARIMA Extrapolation Forecast Performance | time | % S.E. | PE | MAPE | Sq.E | MSE | RMSE | 62 | 0.0187 | 0.0224 | 0 | 45.9639 | 0 | 0 | 63 | 0.0289 | 0.0553 | 0.0388 | 269.8974 | 157.9306 | 12.567 | 64 | 0.0369 | 0.0587 | 0.0455 | 304.9209 | 206.9274 | 14.385 | 65 | 0.0468 | 0.0695 | 0.0515 | 403.9719 | 256.1885 | 16.0059 | 66 | 0.052 | 0.0703 | 0.0552 | 431.2672 | 291.2043 | 17.0647 | 67 | 0.0516 | 0.0639 | 0.0567 | 409.0264 | 310.8413 | 17.6307 | 68 | 0.0568 | 0.0669 | 0.0582 | 452.5037 | 331.0788 | 18.1956 | 69 | 0.0664 | 0.0629 | 0.0587 | 374.2569 | 336.476 | 18.3433 | 70 | 0.0735 | 0.055 | 0.0583 | 279.6842 | 330.1658 | 18.1705 | 71 | 0.0789 | 0.0469 | 0.0572 | 203.6143 | 317.5107 | 17.8188 | 72 | 0.0791 | 0.0526 | 0.0568 | 274.5296 | 313.6033 | 17.7088 | 73 | 0.0803 | 0.0395 | 0.0553 | 162.1123 | 300.9791 | 17.3487 |
| | Charts produced by software: | | http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379259udxtzuh238zvvyn/13e3j1291378957.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379259udxtzuh238zvvyn/13e3j1291378957.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379259udxtzuh238zvvyn/2sx0v1291378957.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/03/t1291379259udxtzuh238zvvyn/2sx0v1291378957.ps (open in new window) |
| | Parameters (Session): | par1 = FALSE ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ; | | Parameters (R input): | par1 = 12 ; par2 = 2.0 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; 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<br />(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')
| |
Copyright
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
Software written by Ed van Stee & Patrick Wessa
Disclaimer
Information provided on this web site is provided
"AS IS" without warranty of any kind, either express or implied,
including, without limitation, warranties of merchantability, fitness
for a particular purpose, and noninfringement. We use reasonable
efforts to include accurate and timely information and periodically
update the information, and software without notice. However, we make
no warranties or representations as to the accuracy or
completeness of such information (or software), and we assume no
liability or responsibility for errors or omissions in the content of
this web site, or any software bugs in online applications. Your use of
this web site is AT YOUR OWN RISK. Under no circumstances and under no
legal theory shall we be liable to you or any other person
for any direct, indirect, special, incidental, exemplary, or
consequential damages arising from your access to, or use of, this web
site.
Privacy Policy
We may request personal information to be submitted to our servers in order to be able to:
- personalize online software applications according to your needs
- enforce strict security rules with respect to the data that you upload (e.g. statistical data)
- manage user sessions of online applications
- alert you about important changes or upgrades in resources or applications
We NEVER allow other companies to directly offer registered users
information about their products and services. Banner references and
hyperlinks of third parties NEVER contain any personal data of the
visitor.
We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.
We carefully protect your data from loss, misuse, alteration,
and destruction. However, at any time, and under any circumstance you
are solely responsible for managing your passwords, and keeping them
secret.
We store a unique ANONYMOUS USER ID in the form of a small
'Cookie' on your computer. This allows us to track your progress when
using this website which is necessary to create state-dependent
features. The cookie is used for NO OTHER PURPOSE. At any time you may
opt to disallow cookies from this website - this will not affect other
features of this website.
We examine cookies that are used by third-parties (banner and
online ads) very closely: abuse from third-parties automatically
results in termination of the advertising contract without refund. We
have very good reason to believe that the cookies that are produced by
third parties (banner ads) do NOT cause any privacy or security risk.
FreeStatistics.org is safe. There is no need to download any
software to use the applications and services contained in this
website. Hence, your system's security is not compromised by their use,
and your personal data - other than data you submit in the account
application form, and the user-agent information that is transmitted by
your browser - is never transmitted to our servers.
As a general rule, we do not log on-line behavior of
individuals (other than normal logging of webserver 'hits'). However,
in cases of abuse, hacking, unauthorized access, Denial of Service
attacks, illegal copying, hotlinking, non-compliance with international
webstandards (such as robots.txt), or any other harmful behavior, our
system engineers are empowered to log, track, identify, publish, and
ban misbehaving individuals - even if this leads to ban entire blocks
of IP addresses, or disclosing user's identity.
FreeStatistics.org is powered by
|