Home » date » 2008 » Dec » 15 »

*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, 15 Dec 2008 02:50:05 -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/15/t1229334797tefc3f4r0s2ds1v.htm/, Retrieved Mon, 15 Dec 2008 10:53:19 +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/15/t1229334797tefc3f4r0s2ds1v.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 «
31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835
 
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'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[16])
426105-------
522397-------
623843-------
721705-------
818089-------
920764-------
1025316-------
1117704-------
1215548-------
1328029-------
1429383-------
1536438-------
1632034-------
17226792239712533.107232260.89280.47770.02780.50.0278
18243192384313979.107233706.89280.46230.59150.50.0518
19180042170511841.107231568.89280.2310.30170.50.0201
2017537180898225.107227952.89280.45630.50670.50.0028
21203662076410900.107230627.89280.46850.73930.50.0126
22227822531615452.107235179.89280.30730.83730.50.091
2319169177047840.107227567.89280.38550.15650.50.0022
2413807155485684.107225411.89280.36470.23590.55e-04
25297432802918165.107237892.89280.36670.99760.50.2131
26255912938319519.107239246.89280.22560.47150.50.2992
27290963643826574.107246301.89280.07230.98440.50.8092
28264823203422170.107241897.89280.1350.72030.50.5
2922405223978447.34936346.6510.49960.2830.48420.0879
3027044238439893.34937792.6510.32640.58010.47330.1249
3117970217057755.34935654.6510.29990.22660.69850.0734
3218730180894139.34932038.6510.46410.50670.53090.025
3319684207646814.34934713.6510.43970.61250.52230.0567
34197852531611366.34939265.6510.21850.78560.63910.1726
3518479177043754.34931653.6510.45660.3850.41850.022
3610698155481598.34929497.6510.24780.34020.59660.0103
37319562802914079.34941978.6510.29060.99260.40480.2868
38295062938315433.34943332.6510.49310.35890.70290.3548
39345063643822488.34950387.6510.3930.8350.84890.732
40271653203418084.34945983.6510.24690.36420.78230.5
4126736223975312.236539481.76350.30930.29220.49960.1345
4223691238436758.236540927.76350.4930.370.35670.1737
4318157217054620.236538789.76350.3420.40990.66590.118
4417328180891004.236535173.76350.46520.49690.47070.0548
4518205207643679.236537848.76350.38450.65330.54930.098
4620995253168231.236542400.76350.310.79270.73710.2204
471738217704619.236534788.76350.48530.35290.46460.0501
48936715548-1536.763532632.76350.23910.41670.7110.0293
49311242802910944.236545113.76350.36130.98390.32620.323
50265512938312298.236546467.76350.37260.42080.49440.3805
51306513643819353.236553522.76350.25340.87170.58770.6933
52258593203414949.236549118.76350.23930.5630.71180.5
5325100223972669.214342124.78570.39410.36540.33320.1692
5425778238434115.214343570.78570.42380.45030.5060.2079
5520418217051977.214341432.78570.44910.34290.63780.1524
561868818089-1638.785737816.78570.47630.40850.53010.083
5720424207641036.214340491.78570.48650.58170.60030.1314
5824776253165588.214345043.78570.47860.68650.66610.2522
591981417704-2023.785737431.78570.4170.24110.51280.0773
601273815548-4179.785735275.78570.39010.33580.73040.0507
6131566280298301.214347756.78570.36260.93560.37920.3453
6230111293839655.214349110.78570.47120.41410.61080.3961
63300193643816710.214356165.78570.26180.73520.71730.6691
64319343203412306.214351761.78570.4960.57930.73020.5
652582622397340.665144453.33490.38030.19840.40510.1959
6626835238431786.665145899.33490.39520.43010.43170.2333


Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
170.22470.01263e-04795241590.4839.8808
180.21110.024e-042265764531.5267.3166
190.2319-0.17050.003413697401273948.02523.4004
200.2782-0.03056e-043047046094.0878.0646
210.2424-0.01924e-041584043168.0856.2857
220.1988-0.10010.0026421156128423.12358.3617
230.28430.08270.0017214622542924.5207.1823
240.3237-0.1120.0022303108160621.62246.2146
250.17950.06120.0012293779658755.92242.3962
260.1713-0.12910.002614379264287585.28536.2698
270.1381-0.20150.004539049641078099.281038.3156
280.1571-0.17330.003530824704616494.08785.1714
290.31784e-040641.281.1314
300.29850.13430.002710246401204928.02452.6898
310.3279-0.17210.003413950225279004.5528.2088
320.39350.03547e-044108818217.6290.6511
330.3428-0.0520.001116640023328152.7351
340.2811-0.21850.004430591961611839.22782.2015
350.4020.04389e-0460062512012.5109.6016
360.4578-0.31190.006223522500470450685.8936
370.25390.14010.002815421329308426.58555.3617
380.24220.00421e-0415129302.5817.3948
390.1953-0.0530.0011373262474652.48273.2261
400.2222-0.1520.00323707161474143.22688.5806
410.38920.19370.003918826921376538.42613.6273
420.3656-0.00641e-0423104462.0821.496
430.4016-0.16350.003312588304251766.08501.763
440.4819-0.04218e-0457912111582.42107.6217
450.4198-0.12320.00256548481130969.62361.8973
460.3443-0.17070.003418671041373420.82611.0817
470.4924-0.01824e-041036842073.6845.5377
480.5606-0.39750.00838204761764095.22874.1254
490.3110.11040.00229579025191580.5437.6991
500.2967-0.09640.00198020224160404.48400.5053
510.2392-0.15880.003233489369669787.38818.4054
520.2721-0.19280.003938130625762612.5873.2769
530.44940.12070.00247306209146124.18382.2619
540.42210.08120.0016374422574884.5273.6503
550.4637-0.05930.0012165636933127.38182.0093
560.55640.03317e-043588017176.0284.7114
570.4847-0.01643e-04115600231248.0833
580.3976-0.02134e-04291600583276.3675
590.56850.11920.0024445210089042298.3991
600.6474-0.18070.00367896100157922397.394
610.35910.12620.002512510369250207.38500.2073
620.34260.02485e-0452998410599.68102.9547
630.2762-0.17620.003541203561824071.22907.7837
640.3142-0.00311e-041000020014.1421
650.50240.15310.003111758041235160.82484.9338
660.4720.12550.00258952064179041.28423.1327
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229334797tefc3f4r0s2ds1v/1do481229334603.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229334797tefc3f4r0s2ds1v/1do481229334603.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229334797tefc3f4r0s2ds1v/2gxm21229334603.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229334797tefc3f4r0s2ds1v/2gxm21229334603.ps (open in new window)


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