Home » date » 2010 » Dec » 27 »

paper Forward

*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: Mon, 27 Dec 2010 16:34:15 +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/27/t1293467547fbmeff8s802ofye.htm/, Retrieved Mon, 27 Dec 2010 17:32:28 +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/27/t1293467547fbmeff8s802ofye.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 «
5.2 7.9 8.7 8.9 15.3 15.4 18.1 19.7 13 12.6 6.2 3.5 3.4 0 9.5 8.9 10.4 13.2 18.9 19 16.3 10.6 5.8 3.6 2.6 5 7.3 9.2 15.7 16.8 18.4 18.1 14.6 7.8 7.6 3.8 5.6 2.2 6.8 11.8 14.9 16.7 16.7 15.9 13.6 9.2 2.8 2.5 4.8 2.8 7.8 9 12.9 16.4 21.8 17.8 13.5 10 10.4 5.5 4 6.8 5.7 9.1 13.6 15 20.9 20.4 14 13.7 7.1 0.8 2.1 1.3 3.9 10.7 11.1 16.4 17.1 17.3 12.9 10.9 5.3 0.7 -0.2 6.5 8.6 8.5 13.3 16.2 17.5 21.2 14.8 10.3 7.3 5.1 4.4 6.2 7.7 9.3 15.6 16.3 16.6 17.4 15.3 9.7 3.7 4.6 5.4 3.1 7.9 10.1 15 15.6 19.7 18.1 17.7 10.7 6.2 4.2 4 5.9 7.1 10.5 15.1 16.8 15.3 18.4 16.1 11.3 7.9 5.6 3.4 4.8 6.5 8.5 15.1 15.7 18.7 19.2 12.9 14.4 6.2 3.3 4.6 7.2 7.8 9.9 13.6 17.1 17.8 18.6 14.7 10.5 8.6 4.4 2.3 2.8 8.8 10.7 13.9 19.3 19.5 20.4 15.3 7.9 8.3 4.5 3.2 5 6.6 11.1 12.8 16.3 17.4 18.9 15.8 11.7 6.4 2.9 4.7 2.4 7.2 10.7 13.4 18.5 18.3 16.8 16.6 14. etc...
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


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[216])
2045.9-------
2057.2-------
2066.8-------
2078-------
20814.3-------
20914.6-------
21017.5-------
21117.2-------
21217.2-------
21314.1-------
21410.5-------
2156.8-------
2164.1-------
2176.56.22791.598910.85690.45410.81620.34030.8162
2186.16.19041.525710.8550.48490.44820.39890.8101
2196.37.56952.890412.24870.29740.73090.42850.9269
2209.314.04959.296518.80250.02510.99930.45891
22116.414.44239.684119.20040.210.98290.47411
22216.117.394412.634222.15460.2970.65890.48271
2231817.136112.372921.89920.36110.66510.48951
22417.617.159712.396121.92330.42810.36480.49341
2251414.07379.3118.83750.48790.07340.49571
22610.510.48385.719915.24770.49730.0740.49730.9957
2276.96.78982.025811.55370.48190.06340.49830.8658
2282.84.0934-0.67058.85740.29730.12410.49890.4989
2290.76.2238-0.424712.87220.05170.84360.46750.7344
2303.66.1878-0.48612.86150.22360.94650.51030.7301
2316.77.56790.883914.25190.39960.87770.6450.8454
23212.514.04857.312320.78470.32620.98370.91650.9981
23314.414.44167.701821.18150.49520.71380.28450.9987
23416.517.39410.652724.13530.39750.8080.64660.9999
23518.717.135810.392423.87920.32470.57330.40080.9999
23619.417.159510.415823.90320.25750.32720.44910.9999
23715.814.07367.329820.81750.30790.06080.50850.9981
23811.310.48373.739717.22770.40620.06120.49810.9682
2399.76.78970.045713.53370.19880.0950.48720.7828
2402.94.0934-2.650610.83740.36440.05160.64650.4992


Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
2170.37920.043700.07400
2180.3845-0.01460.02910.00820.04110.2027
2190.3154-0.16770.07531.61170.56470.7514
2200.1726-0.33810.14122.55816.0632.4623
2210.16810.13560.13993.83275.61692.37
2220.1396-0.07440.1291.67554.962.2271
2230.14180.05040.11780.74634.35812.0876
2240.14160.02570.10630.19393.83761.959
2250.1727-0.00520.0950.00543.41181.8471
2260.23180.00150.08573e-043.07061.7523
2270.3580.01620.07940.01222.79261.6711
2280.5938-0.3160.09911.67292.69931.6429
2290.545-0.88750.159730.51214.83872.1997
2300.5503-0.41820.17826.69654.97142.2297
2310.4506-0.11470.1740.75324.69022.1657
2320.2446-0.11020.172.39784.54692.1324
2330.2381-0.00290.16020.00174.27962.0687
2340.1977-0.05140.15410.79934.08622.0214
2350.20080.09130.15082.44663.99992
2360.20050.13060.14985.01984.05092.0127
2370.24450.12270.14852.98033.99992
2380.32820.07790.14530.66633.84841.9617
2390.50680.42860.15768.46984.04932.0123
2400.8406-0.29150.16321.42423.941.9849
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293467547fbmeff8s802ofye/1blr71293467651.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293467547fbmeff8s802ofye/1blr71293467651.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293467547fbmeff8s802ofye/27dpg1293467651.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293467547fbmeff8s802ofye/27dpg1293467651.ps (open in new window)


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