Home » date » 2008 » Dec » 13 »

loïqueverhasselt

*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: Sat, 13 Dec 2008 10:45:08 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/13/t1229190371c7r615rts8irknw.htm/, Retrieved Sat, 13 Dec 2008 18:46:11 +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/2008/Dec/13/t1229190371c7r615rts8irknw.htm/},
    year = {2008},
}
@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 = {2008},
    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:
workshop arima forecast step 1
 
Dataseries X:
» Textbox « » Textfile « » CSV «
99.4 97.5 94.6 92.6 92.5 89.8 88.8 87.4 85.2 83.1 84.7 84.8 85.8 86.3 89 89 89.3 91.9 94.9 94.4 96.8 96.9 98 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 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 145.4 142.4 137.7 137 137.1 139.3 139.6 140.4 142.3 148.3
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


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[20])
887.4-------
985.2-------
1083.1-------
1184.7-------
1284.8-------
1385.8-------
1486.3-------
1589-------
1689-------
1789.3-------
1891.9-------
1994.9-------
2094.4-------
2196.894.163491.045197.28160.04870.440910.4409
2296.994.051488.49999.60370.15730.1660.99990.451
239893.998486.3277101.6690.15330.22920.99120.4591
2497.993.973384.4624103.48420.20920.20330.97060.465
25100.993.961482.8322105.09060.11090.2440.92470.4692
26103.993.955881.3811106.53040.06060.13950.88360.4724
27103.193.953180.068107.83830.09830.08010.75780.4749
28102.593.951978.8632109.04050.13340.11740.740.4768
29104.393.951377.7454110.15710.10540.15060.71310.4784
30102.693.95176.6988111.20320.16290.11980.59210.4797
31101.793.950975.7118112.190.20250.17630.45940.4808
32102.893.950874.7752113.12640.18290.21420.48170.4817
33105.493.950873.8823114.01930.13170.19370.39040.4825
34110.993.950873.0273114.87420.05620.14170.39120.4832
35113.593.950872.206115.69550.0390.06330.35760.4838
36116.393.950771.4145116.4870.0260.04450.36560.4844
3712493.950770.65117.25150.00570.03010.27940.4849
38128.893.950769.9097117.99180.00220.00710.20860.4854
39133.593.950769.1915118.719e-040.00290.23440.4858
40132.693.950768.4936119.40790.00150.00120.25520.4862
41128.493.950767.8143120.08720.00490.00190.21880.4866
42127.393.950767.1523120.74920.00740.00590.26350.4869
43126.793.950766.5062121.39530.00970.00860.290.4872
44123.393.950765.8749122.02660.02020.01110.26840.4875
45123.293.950765.2576122.64390.02290.02250.21710.4878
46124.493.950764.6532123.24830.02080.02520.12840.488
47128.293.950764.0611123.84040.01240.02290.09990.4882
48128.793.950763.4805124.4210.01270.01380.07530.4885
49135.793.950762.9107124.99080.00420.01410.02890.4887
5013993.950762.3512125.55030.00260.00480.01530.4889
51145.493.950761.8014126.19e-040.0030.0080.4891
52142.493.950761.2609126.64060.00180.0010.01020.4893
53137.793.950760.7292127.17230.00490.00210.02110.4894
5413793.950760.2059127.69560.00620.00550.02640.4896
55137.193.950759.6905128.2110.00680.00690.03050.4897
56139.393.950759.1828128.71870.00530.00750.0490.4899
57139.693.950758.6824129.21910.00560.00590.0520.49
58140.493.950758.189129.71250.00550.00620.04760.4902
59142.393.950757.7023130.19920.00450.0060.0320.4903
60148.393.950757.2221130.67940.00190.00490.03180.4904


Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
210.01690.0287e-046.95180.17380.4169
220.03010.03038e-048.11470.20290.4504
230.04160.04260.001116.01310.40030.6327
240.05160.04180.00115.41910.38550.6209
250.06040.07380.001848.1441.20361.0971
260.06830.10580.002698.88722.47221.5723
270.07540.09740.002483.66512.09161.4462
280.08190.0910.002373.07041.82681.3516
290.0880.11010.0028107.0962.67741.6363
300.09370.09210.002374.80521.87011.3675
310.0990.08250.002160.04911.50121.2252
320.10410.09420.002478.30831.95771.3992
330.1090.12190.003131.08483.27711.8103
340.11360.18040.0045287.27687.18192.6799
350.11810.20810.0052382.17319.55433.091
360.12240.23790.0059499.48912.48723.5337
370.12650.31980.008902.957622.57394.7512
380.13060.37090.00931214.470530.36185.5102
390.13450.4210.01051564.143539.10366.2533
400.13820.41140.01031493.764937.34416.111
410.14190.36670.00921186.751129.66885.4469
420.14550.3550.00891112.172827.80435.273
430.1490.34860.00871072.513726.81285.1781
440.15250.31240.0078861.378721.53454.6405
450.15580.31130.0078855.518921.3884.6247
460.15910.32410.0081927.157123.17894.8144
470.16230.36450.00911173.011429.32535.4153
480.16550.36990.00921207.510730.18785.4943
490.16860.44440.01111743.000343.5756.6011
500.17160.47950.0122029.435350.73597.1229
510.17460.54760.01372647.025866.17568.1348
520.17750.51570.01292347.330358.68337.6605
530.18040.46570.01161913.997347.84996.9174
540.18330.45820.01151853.238346.3316.8067
550.18610.45930.01151861.858246.54656.8225
560.18880.48270.01212056.554951.41397.1703
570.19150.48590.01212083.854452.09647.2178
580.19420.49440.01242157.533253.93837.3443
590.19680.51460.01292337.650458.44137.6447
600.19950.57850.01452953.841573.8468.5934
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229190371c7r615rts8irknw/1j1821229190303.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229190371c7r615rts8irknw/1j1821229190303.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229190371c7r615rts8irknw/249pq1229190303.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229190371c7r615rts8irknw/249pq1229190303.ps (open in new window)


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

  • 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