Home » date » 2008 » Dec » 14 »

invoer

*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: Sun, 14 Dec 2008 10:54:54 -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/14/t1229277455qagf7z0mqx0okn3.htm/, Retrieved Sun, 14 Dec 2008 18:57:38 +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/14/t1229277455qagf7z0mqx0okn3.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
11554.5 13182.1 14800.1 12150.7 14478.2 13253.9 12036.8 12653.2 14035.4 14571.4 15400.9 14283.2 14485.3 14196.3 15559.1 13767.4 14634 14381.1 12509.9 12122.3 13122.3 13908.7 13456.5 12441.6 12953 13057.2 14350.1 13830.2 13755.5 13574.4 12802.6 11737.3 13850.2 15081.8 13653.3 14019.1 13962 13768.7 14747.1 13858.1 13188 13693.1 12970 11392.8 13985.2 14994.7 13584.7 14257.8 13553.4 14007.3 16535.8 14721.4 13664.6 16805.9 13829.4 13735.6 15870.5 15962.4 15744.1 16083.7 14863.9 15533.1 17473.1 15925.5 15573.7 17495 14155.8 14913.9 17250.4 15879.8 17647.8 17749.9 17111.8 16934.8 20280 16238.2 17896.1 18089.3 15660 16162.4 17850.1 18520.4 18524.7 16843.7
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132


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])
3614019.1-------
3713962-------
3813768.7-------
3914747.1-------
4013858.1-------
4113188-------
4213693.1-------
4312970-------
4411392.8-------
4513985.2-------
4614994.7-------
4713584.7-------
4814257.8-------
4913553.413955.568712754.959515156.17780.25570.31090.49580.3109
5014007.313888.339912500.604215276.07560.43330.68190.56710.3009
5116535.814964.687413277.220116652.15460.0340.86690.59980.7942
5214721.413911.104511680.759316141.44980.23820.01050.51860.3803
5313664.613380.70510938.457615822.95240.40990.1410.56150.2407
5416805.913871.4511080.799516662.10060.01970.55780.54980.3931
5513829.413073.90859932.321516215.49550.31870.00990.52580.2301
5613735.611600.82138246.436514955.20610.10610.09640.54840.0603
5715870.514138.688510472.817817804.55920.17720.58530.53270.4746
5815962.415136.483511216.465419056.50150.33980.35680.52830.6698
5915744.113783.77669654.096517913.45670.17610.15060.53760.411
6016083.714403.618110012.650718794.58550.22660.27480.52590.5259
6114863.914120.10079037.229819202.97160.38710.22450.58650.4788
6215533.114072.81988583.609119562.03060.3010.38880.50930.4737
6317473.115113.59369112.459821114.72740.22050.44550.32110.6101
6415925.514085.66597456.029720715.30210.29320.15830.42550.4797
6515573.713553.42926498.797920608.06050.28730.25490.48770.4224
661749514027.35556443.036821611.67420.18510.34470.23640.4763
6714155.813250.29145159.91621340.66680.41320.15190.44420.4036
6814913.911766.90263267.23520266.57020.2340.29090.32490.2829
6917250.414301.14475323.005723279.28360.25980.44680.36590.5038
7015879.815310.78285912.328824709.23680.45280.34290.4460.5869
7117647.813947.52514161.108123733.94210.22930.34940.35950.4752
7217749.914570.40864364.738324776.07890.27070.27730.38570.5239
7317111.814291.38183342.857625239.90610.30680.26790.45920.5024
7416934.814236.79822743.900725729.69570.32270.3120.41250.4986
752028015282.43543169.30727395.56370.20940.39460.36150.5658
7616238.214254.5081424.41327084.6030.38090.17870.39930.4998
7717896.113718.6425329.798327107.48680.27040.35610.3930.4685
7818089.314196.6509168.164428225.13750.29330.30260.32250.4966
791566013417.7141-1234.79528070.22310.38210.2660.46070.4553
8016162.411933.3815-3259.82527126.58790.29270.31530.35030.3821
8117850.114470.0852-1319.378130259.54860.33740.41680.3650.5105
8218520.415477.6632-859.124131814.45050.35750.3880.48080.5582
8318524.714114.8818-2737.652230967.41580.3040.30420.34060.4934
8416843.714738.77-2654.682732132.22280.40630.33480.36720.5216


Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0439-0.02888e-04161739.62944492.767567.0281
500.0510.00862e-0414151.5158393.097719.8267
510.05750.1050.00292468394.886768566.5246261.8521
520.08180.05820.0016656578.725218238.2979135.0492
530.09310.02126e-0480596.36492238.787947.3158
540.10260.21150.00598610996.5742239194.3493489.075
550.12260.05780.0016570767.420115854.6506125.9153
560.14750.1840.00514557280.1959126591.1166355.7965
570.13230.12250.00342999171.145183310.3096288.6353
580.13210.05460.0015682138.14218948.2817137.6528
590.15290.14220.0043842867.8584106746.3294326.7206
600.15550.11660.00322822675.141278407.6428280.0136
610.18370.05270.0015553237.403915367.7057123.9666
620.1990.10380.00292132418.252459233.8403243.38
630.20260.15610.00435567270.3562154646.3988393.2511
640.24010.13060.00363384989.469594027.4853306.639
650.26560.14910.00414081494.1441113374.8373336.7118
660.27590.24720.006912024558.4618334015.5128577.9408
670.31150.06830.0019819945.782522776.2717150.9181
680.36850.26740.00749903592.6674275099.7963524.4996
690.32030.20620.00578698106.8422241614.079491.5426
700.31320.03720.001323780.53618993.903894.8362
710.3580.26530.007413692034.5552380334.2932616.7125
720.35740.21820.006110109165.6805280810.1578529.9152
730.39090.19740.00557954758.611220965.517470.0697
740.41190.18950.00537279213.614202200.3782449.667
750.40440.3270.009124975652.4185693768.1227832.9274
760.45920.13920.00393935033.8362109306.4954330.6153
770.49790.30450.008517451150.9197484754.1922696.2429
780.50420.27420.007615152716.9094420908.803648.7748
790.55720.16710.00465027846.2409139662.3956373.7143
800.64960.35440.009817884597.7296496794.3814704.8364
810.55670.23360.006511424499.9124317347.2198563.3358
820.53850.19660.00559258247.2595257173.535507.1228
830.60920.31240.008719446496.2385540180.4511734.9697
840.60210.14280.0044430730.1737123075.8382350.8217
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229277455qagf7z0mqx0okn3/1vznb1229277293.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229277455qagf7z0mqx0okn3/1vznb1229277293.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229277455qagf7z0mqx0okn3/2lnci1229277293.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/14/t1229277455qagf7z0mqx0okn3/2lnci1229277293.ps (open in new window)


 
Parameters (Session):
par1 = 36 ; par2 = 1.3 ; par3 = 1 ; par4 = 1 ; par5 = 12 ;
 
Parameters (R input):
par1 = 36 ; par2 = 1 ; par3 = 1 ; 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,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