Home » date » 2008 » Dec » 18 »

Japan Forecast

*Unverified author*
R Software Module: rwasp_arimaforecasting.wasp (opens new window with default values)
Title produced by software: ARIMA Forecasting
Date of computation: Thu, 18 Dec 2008 04:39:04 -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/18/t1229600424rfm08hj3j62bc8e.htm/, Retrieved Thu, 18 Dec 2008 12:40:24 +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/18/t1229600424rfm08hj3j62bc8e.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 «
122.36 123.33 123.04 124.53 125.13 125.85 126.50 126.53 127.07 124.55 124.90 124.32 122.84 123.31 123.31 124.87 124.64 124.73 124.90 124.04 123.28 123.86 122.29 124.09 124.54 125.65 125.70 125.53 125.61 125.55 125.41 127.60 124.68 124.41 126.43 126.38 125.78 124.70 125.07 125.25 126.58 127.13 125.82 123.70 124.39 123.70 124.42 121.05 121.02 123.23 121.32 120.91 120.72 123.31 119.58 119.53 120.59 118.63 118.47 111.81 114.71 117.34 115.77 118.38 117.84 118.83 120.02 116.21 117.08 120.20 119.83 118.92 118.03 117.71 119.55 116.13 115.97 115.99 114.96 116.46 116.55 113.05 117.44 118.84 117.06 117.54 119.31 118.72 121.55 122.61 121.53 123.31 124.07 123.59 122.97 123.22 123.04 122.96 122.81 122.81 122.62 120.82 119.41 121.56 121.59 118.50 118.77 118.86 117.60 119.90 121.83 121.84 122.12 122.12 121.36 119.66 119.32 120.36 117.06 117.48 115.60 113.86 116.92 117.75 117.75 115.31 116.28 115.22 115.65 115.11 118.67 118.04 116.50 119.78 119.95 120.37 119.79 119.43 121.06 121.74 121.09 122.97 120.50 117.18 115.03 113.36 112.59 111.65 111.98 114.87 114.67 114.09 114.77 117.05 117.22 113.18 110.95 112.14 112.72 110.01 110.29 110.74 110.32 105.89 108.97 109.34 106.57 99.49 101.81 104.29 109.73 105.06 107.97 108.13 109.86 108.95 111.20 110.69 106.10 105.68 104.12 104.71 104.30 103.52 107.76 107.80 107.30 108.64 105.03 108.30 107.21 109.27 109.50 111.68 111.80 111.75 106.68 106.37 105.76 109.01 109.01 109.01 109.01 107.69 105.19 105.48 102.22 100.54 105.00 105.44 107.89 108.64 106.70 109.10 105.23 108.41 108.80 110.39 110.22 110.86 108.58 107.70 106.62 109.84 107.16 107.26 108.70 109.85 109.41 112.36 111.03 110.67 109.21 113.58 113.88 114.08 112.33 113.92 114.41 114.57 115.35 113.13 113.29 112.56 113.06 113.46 115.39 116.62 117.04 117.42 115.62 115.16 115.69 112.85 114.05 112.00 113.74 116.26 118.63 116.49 118.23 116.83 118.82 114.36 112.02 113.24 109.75 110.33 112.86 113.04 113.80 110.90 109.96 108.69 108.84 108.47 108.07 107.94 108.11 108.11 106.81 105.58 105.61 106.52 103.86 104.60 104.73 105.12 104.76 103.85 103.83 103.22 101.64 102.13 104.33 104.92 107.78 104.49 102.80 102.86 104.51 104.73 102.58 99.93 101.41 101.05 99.86 101.11 100.89 101.09 98.31 98.08 99.55 99.62 97.37 98.16 97.98 98.15 97.10 97.24 96.70 96.64 100.65 96.75 97.74 97.92 98.34 93.84 97.80 96.20 95.99 95.18 95.95 92.23 91.78 92.97 89.76 92.88 96.23 95.79 93.97 93.90 93.60 93.96 88.69 88.57 85.62 86.25 85.33 83.33 77.78 78.70 72.05 80.75 81.41 82.65 75.85 75.70 78.25 77.41 76.84 74.25 74.95 68.78 73.21 73.26 78.67 75.63 74.99 83.87 79.62 80.13 79.76 78.20 78.05 79.05 73.32 75.17 73.26 73.72 73.57 70.60 71.25 74.22 73.32 73.01 74.21 75.32 71.73 71.94 72.94 72.47 71.94 74.30 74.30
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


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[375])
37478.2-------
37578.05-------
37679.0578.180674.198982.16240.33440.52560.52560.5256
37773.3278.256873.301983.21180.02540.37690.37690.5326
37875.1778.305672.586184.02510.14130.95620.95620.5349
37973.2678.328172.02584.63130.05750.8370.8370.5345
38073.7278.338671.531585.14570.09180.92820.92820.5331
38173.5778.343171.081385.60490.09880.89390.89390.5315
38270.678.34570.66186.0290.02410.88840.88840.53
38371.2578.345870.26486.42750.04260.96980.96980.5286
38474.2278.346169.886186.80610.16960.94990.94990.5273
38573.3278.346269.524587.16790.13210.82040.82040.5262
38673.0178.346369.177387.51520.1270.85870.85870.5252
38774.2178.346368.842887.84980.19680.86450.86450.5244
38875.3278.346368.519788.17290.2730.79530.79530.5236
38971.7378.346368.206888.48580.10050.72070.72070.5228
39071.9478.346367.903488.78920.11460.89280.89280.5222
39172.9478.346367.608589.08410.16190.87890.87890.5216
39272.4778.346367.321589.37110.14810.83180.83180.521
39371.9478.346367.041789.65090.13330.84590.84590.5205
39474.378.346366.768889.92380.24670.86090.86090.52
39574.378.346366.502190.19050.25160.74840.74840.5196


Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
3760.0260.01116e-040.75580.03780.1944
3770.0323-0.06310.003224.37231.21861.1039
3780.0373-0.040.0029.83190.49160.7011
3790.0411-0.06470.003225.68611.28431.1333
3800.0443-0.0590.002921.33161.06661.0328
3810.0473-0.06090.00322.78251.13911.0673
3820.05-0.09890.004959.9852.99921.7318
3830.0526-0.09060.004550.352.51751.5867
3840.0551-0.05270.002617.02460.85120.9226
3850.0574-0.06420.003225.26281.26311.1239
3860.0597-0.06810.003428.47571.42381.1932
3870.0619-0.05280.002617.10880.85540.9249
3880.064-0.03860.00199.15840.45790.6767
3890.066-0.08440.004243.77542.18881.4794
3900.068-0.08180.004141.04062.0521.4325
3910.0699-0.0690.003529.2281.46141.2089
3920.0718-0.0750.003834.53091.72651.314
3930.0736-0.08180.004141.04062.0521.4325
3940.0754-0.05160.002616.37250.81860.9048
3950.0771-0.05160.002616.37250.81860.9048
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t1229600424rfm08hj3j62bc8e/1j9i41229600331.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t1229600424rfm08hj3j62bc8e/1j9i41229600331.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t1229600424rfm08hj3j62bc8e/2zeik1229600331.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/18/t1229600424rfm08hj3j62bc8e/2zeik1229600331.ps (open in new window)


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