Home » date » 2007 » Dec » 06 » attachments

WS5: Q1 inflatie

R Software Module: rwasp_arimaforecasting.wasp (opens new window with default values)
Title produced by software: ARIMA Forecasting
Date of computation: Thu, 06 Dec 2007 09:15:38 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2007/Dec/06/t1196956947l4qe4kf508ryz8p.htm/, Retrieved Thu, 06 Dec 2007 17:02:30 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1,1 1,3 1,2 1,6 1,7 1,5 0,9 1,5 1,4 1,6 1,7 1,4 1,8 1,7 1,4 1,2 1 1,7 2,4 2 2,1 2 1,8 2,7 2,3 1,9 2 2,3 2,8 2,4 2,3 2,7 2,7 2,9 3 2,2 2,3 2,8 2,8 2,8 2,2 2,6 2,8 2,5 2,4 2,3 1,9 1,7 2 2,1 1,7 1,8 1,8 1,8 1,3 1,3 1,3 1,2 1,4 2,2
 
Text written by user:
 
Output produced by software:


Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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[24])
121.4-------
131.8-------
141.7-------
151.4-------
161.2-------
171-------
181.7-------
192.4-------
202-------
212.1-------
222-------
231.8-------
242.7-------
252.30-3.26483.26480.08370.05250.13990.0525
261.90-3.26483.26480.1270.08370.15370.0525
2720-3.26483.26480.11490.1270.20030.0525
282.30-3.26483.26480.08370.11490.23560.0525
292.80-3.26483.26480.04640.08370.27410.0525
302.40-3.26483.26480.07480.04640.15370.0525
312.30-3.26483.26480.08370.07480.07480.0525
322.70-3.26483.26480.05250.08370.11490.0525
332.70-3.26483.26480.05250.05250.10370.0525
342.90-3.26483.26480.04080.05250.11490.0525
3530-3.26483.26480.03580.04080.13990.0525
362.20-3.26483.26480.09330.03580.05250.0525
372.30-3.26483.26480.08370.09330.08370.0525
382.80-3.26483.26480.04640.08370.1270.0525
392.80-3.26483.26480.04640.04640.11490.0525
402.80-3.26483.26480.04640.04640.08370.0525
412.20-3.26483.26480.09330.04640.04640.0525
422.60-3.26483.26480.05930.09330.07480.0525
432.80-3.26483.26480.04640.05930.08370.0525
442.50-3.26483.26480.06670.04640.05250.0525
452.40-3.26483.26480.07480.06670.05250.0525
462.30-3.26483.26480.08370.07480.04080.0525
471.90-3.26483.26480.1270.08370.03580.0525
481.70-3.26483.26480.15370.1270.09330.0525
4920-3.26483.26480.11490.15370.08370.0525
502.10-3.26483.26480.10370.11490.04640.0525
511.70-3.26483.26480.15370.10370.04640.0525
521.80-3.26483.26480.13990.15370.04640.0525
531.80-3.26483.26480.13990.13990.09330.0525
541.80-3.26483.26480.13990.13990.05930.0525
551.30-3.26483.26480.21760.13990.04640.0525
561.30-3.26483.26480.21760.21760.06670.0525
571.30-3.26483.26480.21760.21760.07480.0525
581.20-3.26483.26480.23560.21760.08370.0525
591.40-3.26483.26480.20030.23560.1270.0525
602.20-3.26483.26480.09330.20030.15370.0525


Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
25InfInfInf5.290.14690.3833
26InfInfInf3.610.10030.3167
27InfInfInf40.11110.3333
28InfInfInf5.290.14690.3833
29InfInfInf7.840.21780.4667
30InfInfInf5.760.160.4
31InfInfInf5.290.14690.3833
32InfInfInf7.290.20250.45
33InfInfInf7.290.20250.45
34InfInfInf8.410.23360.4833
35InfInfInf90.250.5
36InfInfInf4.840.13440.3667
37InfInfInf5.290.14690.3833
38InfInfInf7.840.21780.4667
39InfInfInf7.840.21780.4667
40InfInfInf7.840.21780.4667
41InfInfInf4.840.13440.3667
42InfInfInf6.760.18780.4333
43InfInfInf7.840.21780.4667
44InfInfInf6.250.17360.4167
45InfInfInf5.760.160.4
46InfInfInf5.290.14690.3833
47InfInfInf3.610.10030.3167
48InfInfInf2.890.08030.2833
49InfInfInf40.11110.3333
50InfInfInf4.410.12250.35
51InfInfInf2.890.08030.2833
52InfInfInf3.240.090.3
53InfInfInf3.240.090.3
54InfInfInf3.240.090.3
55InfInfInf1.690.04690.2167
56InfInfInf1.690.04690.2167
57InfInfInf1.690.04690.2167
58InfInfInf1.440.040.2
59InfInfInf1.960.05440.2333
60InfInfInf4.840.13440.3667
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196956947l4qe4kf508ryz8p/1r1061196957735.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196956947l4qe4kf508ryz8p/1r1061196957735.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196956947l4qe4kf508ryz8p/2ijib1196957735.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/06/t1196956947l4qe4kf508ryz8p/2ijib1196957735.ps (open in new window)


 
Parameters:
par1 = Default ; par2 = 1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ;
 
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,fx))
(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)
}
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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

Creative Commons License

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:

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