Home » date » 2007 » Dec » 08 » attachments

exclusief energie

R Software Module: rwasp_arimaforecasting.wasp (opens new window with default values)
Title produced by software: ARIMA Forecasting
Date of computation: Sat, 08 Dec 2007 06:56:55 -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/08/t1197121424pyqi1w15iuar61t.htm/, Retrieved Sat, 08 Dec 2007 14:43:44 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
96,9 98,0 97,9 100,9 103,9 103,1 102,5 104,3 102,6 101,7 102,8 105,4 110,9 113,5 116,3 124,0 128,8 133,5 132,6 128,4 127,3 126,7 123,3 123,2 124,4 128,2 128,7 135,7 139,0 145,4 142,4 137,7 137,0 137,1 139,3 139,6 140,4 142,3 148,3 157,7 161,6 161,7 171,8 185,1 176,7 184,4 183,0 180,9 187,0 189,9 193,8 194,5 198,7 204,7 213,2 214,7 211,0 213,2 206,3 210,8
 
Text written by user:
lambda -0,6 d=1 D=1 ARIMA maximum
 
Output produced by software:


Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


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])
12105.4-------
13110.9-------
14113.5-------
15116.3-------
16124-------
17128.8-------
18133.5-------
19132.6-------
20128.4-------
21127.3-------
22126.7-------
23123.3-------
24123.2-------
25124.4126.4379126.5954126.28071000
26128.2128.8175129.1137128.52231000
27128.7133.3834133.7607133.00781000
28135.7140.4807140.9889139.97541000
29139142.7823143.3946142.17421000
30145.4151.3793152.119150.64551000
31142.4151.0837151.9086150.2661000
32137.7141.5255142.3251140.73310.984700
33137142.6896143.5574141.83021000
34137.1143.3059144.2409142.38051000
35139.3136.3101137.2183135.411410.957500
36139.6132.2582133.1729131.35351100
37140.4129.2523130.2672128.25011100
38142.3129.0884130.2824127.9119110.06940
39148.3131.4279132.7997130.07861100
40157.7131.0131132.5302129.52361110
41161.6128.5581130.1776126.97061110
42161.7132.9635134.7962131.17031110
43171.8133.5578135.5417131.61991110
44185.1127.5994129.554125.69161110
45176.7129.9793132.1002127.91241110
46184.4131.2864133.5552129.07871110
47183127.011129.2565124.82731113e-04
48180.9122.5221124.7336120.37271110.7318
49187116.2005118.3426114.11981111
50189.9114.0105116.2095111.87731111
51193.8112.7801115.0534110.57781111
52194.5107.3781109.581105.24521111
53198.7103.6944105.8745101.58521111
54204.7102.6627104.8952100.50521111
55213.2103.324105.669101.06111111
56214.7103.5814106.0214101.231111
57211105.0367107.6154102.55551111
58213.2105.8409108.5363103.2511111
59206.3106.3606109.1583103.67591111
60210.8104.7373107.5446102.04551111


Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
25-6e-04-0.01614e-044.1530.11540.3396
26-0.0012-0.00481e-040.38130.01060.1029
27-0.0014-0.03510.00121.93450.60930.7806
28-0.0018-0.0349e-0422.85520.63490.7968
29-0.0022-0.02657e-0414.3060.39740.6304
30-0.0025-0.03950.001135.75260.99310.9966
31-0.0028-0.05750.001675.40752.09471.4473
32-0.0029-0.0278e-0414.63420.40650.6376
33-0.0031-0.03990.001132.37180.89920.9483
34-0.0033-0.04330.001238.51291.06981.0343
35-0.00340.02196e-048.93980.24830.4983
36-0.00350.05550.001553.90211.49731.2236
37-0.0040.08620.0024124.27023.4521.8579
38-0.00470.10230.0028174.54624.84852.2019
39-0.00520.12840.0036284.66867.90752.812
40-0.00580.20370.0057712.191719.78314.4478
41-0.00630.2570.00711091.769830.32695.507
42-0.00690.21610.006825.787322.93854.7894
43-0.00740.28630.0081462.467840.62416.3737
44-0.00760.45060.01253306.315791.84219.5834
45-0.00810.35940.012182.823260.6347.7868
46-0.00860.40460.01122821.051978.36268.8523
47-0.00880.44080.01223134.768687.07699.3315
48-0.0090.47650.01323407.980594.66619.7297
49-0.00910.60930.01695012.5695139.23811.7999
50-0.00950.66560.01855759.2191159.978312.6483
51-0.010.71840.026564.2246182.339613.5033
52-0.01010.81140.02257590.2276210.839714.5203
53-0.01040.91620.02559026.0713250.724215.8343
54-0.01070.99390.027610411.6185289.211617.0062
55-0.01121.06340.029512072.7412335.353918.3127
56-0.01161.07280.029812347.3472342.981918.5198
57-0.01211.00880.02811228.2115311.894817.6605
58-0.01251.01430.028211525.9757320.16617.8932
59-0.01290.93960.02619987.8843277.441216.6566
60-0.01311.01270.028111249.2867312.480217.6771
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/08/t1197121424pyqi1w15iuar61t/1o71r1197122204.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/08/t1197121424pyqi1w15iuar61t/1o71r1197122204.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/08/t1197121424pyqi1w15iuar61t/2xolj1197122204.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2007/Dec/08/t1197121424pyqi1w15iuar61t/2xolj1197122204.ps (open in new window)


 
Parameters:
par1 = 36 ; par2 = -0.6 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 2 ; 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,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