Home » date » 2009 » Dec » 31 »

forecasting (verkoopprijzen)

*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: Thu, 31 Dec 2009 08:08:41 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/31/t12622721838al3drnwu09gemq.htm/, Retrieved Thu, 31 Dec 2009 16:09:45 +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/2009/Dec/31/t12622721838al3drnwu09gemq.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
2072.65 2020.13 2032.76 2050.31 2128.98 2122.14 2122.89 2091.95 2002.97 1923.21 1834.44 1819.15 1792.00 1822.40 1900.70 1903.00 1958.80 1820.50 1719.80 1661.10 1664.40 1703.40 1774.90 1795.00 1816.30 1867.40 1900.00 1961.10 2065.70 2073.50 2080.80 2118.00 2099.00 2085.20 1937.70 1749.50 1750.30 1675.60 1697.50 1699.80 1655.90 1636.00 1614.20 1602.30 1548.70 1556.10 1526.90 1509.20 1566.30 1596.00 1654.50 1664.20 1687.70 1691.00 1664.60 1697.50 1685.10 1643.00 1559.60 1560.20 1590.16 1604.93 1661.80 1670.73 1692.40 1688.17 1658.04 1613.46 1595.11 1558.83 1526.65 1475.19
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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[48])
361749.5-------
371750.3-------
381675.6-------
391697.5-------
401699.8-------
411655.9-------
421636-------
431614.2-------
441602.3-------
451548.7-------
461556.1-------
471526.9-------
481509.2-------
491566.31514.10741449.55881587.05410.08040.552500.5525
5015961510.60511404.54071641.49850.10050.20210.00670.5084
511654.51533.70731388.76361728.38420.1120.26530.04960.5974
521664.21545.50641369.18751800.52170.18080.20110.11780.6099
531687.71566.57991359.86661888.16490.23020.27590.29310.6367
5416911542.16271322.95271898.60480.20660.21180.30290.5719
551664.61521.38051292.0461909.09740.23450.19560.31950.5245
561697.51508.60061268.85851929.86020.18970.2340.33140.4989
571685.11486.03191241.5761927.46270.18840.17390.39040.459
5816431483.71381228.28151963.19010.25750.20520.38370.4585
591559.61460.92761203.95791952.79720.34710.23410.39630.4237
601560.21432.57921177.66561925.83920.3060.30690.38040.3804
611590.161431.37141165.80411966.99230.28060.31870.31070.3879
621604.931426.00051152.15191999.16940.27030.28730.28050.388
631661.81444.66731152.15242096.54430.25690.3150.26410.4231
641670.731454.22171147.31552176.76020.27850.28670.28450.4407
651692.41471.85391146.92212289.48460.29850.31680.30240.4643
661688.171451.08721127.40082279.14020.28730.28390.28510.4453
671658.041433.3851110.19912274.82550.30040.27640.29510.4299
681613.461422.4761097.0452290.99720.33320.29750.26740.4224
691595.111403.17561080.30572273.59640.33280.31790.26280.4057
701558.831401.18671072.58242318.23480.36810.33930.30260.4087
711526.651381.62421056.75712292.7180.37750.35150.35090.3919
721475.191357.18311039.07182244.04370.39710.3540.32680.3684


Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.02460.034502724.070400
500.04420.05650.04557292.29565008.18370.7685
510.06480.07880.056614590.87228202.412890.5672
520.08420.07680.061614088.16899673.851898.3557
530.10470.07730.064814670.083810673.0982103.3107
540.11790.09650.070122152.534312586.3375112.1888
550.130.09410.073520511.831713718.551117.1262
560.14250.12520.0835682.965616464.1028128.3125
570.15160.1340.08639628.107319037.8811137.9778
580.16490.10740.088125372.099219671.3029140.2544
590.17180.06750.08629736.237818768.1152136.9968
600.17570.08910.086516287.07418561.3618136.2401
610.19090.11090.088425213.82419073.0896138.1054
620.20510.12550.09132015.768219997.5667141.4128
630.23020.15030.09547146.606621807.5027147.6736
640.25350.14890.098346875.834523374.2734152.8865
650.28340.14980.101448640.572424860.5263157.6722
660.29110.16340.104856208.241826602.066163.1014
670.29950.15670.107550469.846727858.265166.908
680.31150.13430.108936474.901228289.0968168.1936
690.31650.13680.110236838.812828696.2261169.3996
700.33390.11250.110324851.396128521.4611168.883
710.33640.1050.110121032.488128195.8536167.9162
720.33340.08690.109113925.629227601.2609166.1363
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/31/t12622721838al3drnwu09gemq/11dzo1262272118.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t12622721838al3drnwu09gemq/11dzo1262272118.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/31/t12622721838al3drnwu09gemq/2sv3x1262272118.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/31/t12622721838al3drnwu09gemq/2sv3x1262272118.ps (open in new window)


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

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:

  • 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