Home » date » 2009 » Dec » 11 »

Workshop 9 verbetering 3 link 4

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 11 Dec 2009 08:39:25 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546026yawwqc4z2wsu2nk.htm/, Retrieved Fri, 11 Dec 2009 16:40:30 +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/2009/Dec/11/t1260546026yawwqc4z2wsu2nk.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
8 8,1 7,7 7,5 7,6 7,8 7,8 7,8 7,5 7,5 7,1 7,5 7,5 7,6 7,7 7,7 7,9 8,1 8,2 8,2 8,2 7,9 7,3 6,9 6,6 6,7 6,9 7 7,1 7,2 7,1 6,9 7 6,8 6,4 6,7 6,6 6,4 6,3 6,2 6,5 6,8 6,8 6,4 6,1 5,8 6,1 7,2 7,3 6,9 6,1 5,8 6,2 7,1 7,7 7,9 7,7 7,4 7,5 8
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.928337978024088
beta1
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
137.57.433256880142390.0667431198576134
147.67.64602125144062-0.0460212514406226
157.77.699063987051660.000936012948344889
167.77.696564618795420.00343538120457598
177.97.92064255850776-0.0206425585077596
188.18.14661417062053-0.046614170620531
198.27.945495652828060.254504347171943
208.28.4488881479485-0.248888147948495
218.27.915006042889920.284993957110078
227.98.42638631490673-0.526386314906732
237.37.273946602413820.0260533975861774
246.97.47803073148591-0.578030731485913
256.66.179145396321370.420854603678625
266.76.269180291613260.430819708386739
276.96.767829002821060.132170997178936
2877.01981194650812-0.0198119465081223
297.17.3134137817753-0.213413781775293
307.27.26479021842537-0.0647902184253724
317.16.993377326231240.106622673768758
326.97.0957641453048-0.195764145304794
3376.51746019133460.482539808665398
346.87.17307514272357-0.373075142723573
356.46.40077979247309-0.000779792473089458
366.76.61565039851210.0843496014879035
376.66.74098316599545-0.140983165995448
386.46.5277804195043-0.127780419504296
396.36.182695566980190.117304433019809
406.26.100552511750490.099447488249515
416.56.266639442867280.233360557132715
426.86.83850075057714-0.0385007505771426
436.86.84306011460125-0.0430601146012544
446.46.87990404816121-0.479904048161212
456.15.930475156523660.169524843476341
465.85.798288091058990.00171190894101247
476.15.349417041552980.750582958447024
487.26.878297987016840.321702012983159
497.38.06166693068413-0.761666930684131
506.97.55654300690666-0.656543006906658
516.16.52680899013502-0.426808990135024
525.85.224577174495040.575422825504956
536.25.552789708090340.647210291909664
547.16.587647763218920.512352236781081
557.77.71005243133236-0.0100524313323644
567.98.3741390179299-0.474139017929902
577.78.07813183944-0.378131839440006
587.47.51196918249704-0.111969182497037
597.56.953730520013720.546269479986283
6088.12546755984644-0.125467559846438


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
618.201512866682247.523065139652078.87996059371241
628.512647186119417.07228999122089.95300438101802
638.830895878757896.428212969100211.2335787884156
649.114001778502215.5982071585746512.6297963984298
659.566133711793374.7156011214930314.4166663020937
6610.04441495101473.678605340748816.4102245612807
6710.10798574628932.3805329783502617.8354385142284
6810.24310528597991.0419228039646919.4442877679952
6910.3165490133721-0.35619721681496820.9892952435592
7010.3838903553653-1.7940824881299622.5618631988605
7110.2732534107119-3.2128779329852323.7593847544091
7210.8697099394555-5.1585738416830426.8979937205941
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546026yawwqc4z2wsu2nk/1s2kp1260545962.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546026yawwqc4z2wsu2nk/1s2kp1260545962.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546026yawwqc4z2wsu2nk/29cvl1260545962.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546026yawwqc4z2wsu2nk/29cvl1260545962.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546026yawwqc4z2wsu2nk/37svd1260545962.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546026yawwqc4z2wsu2nk/37svd1260545962.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
R code (references can be found in the software module):
par1 <- as.numeric(par1)
if (par2 == 'Single') K <- 1
if (par2 == 'Double') K <- 2
if (par2 == 'Triple') K <- par1
nx <- length(x)
nxmK <- nx - K
x <- ts(x, frequency = par1)
if (par2 == 'Single') fit <- HoltWinters(x, gamma=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
if (par2 == 'Triple') fit <- HoltWinters(x, seasonal=par3)
fit
myresid <- x - fit$fitted[,'xhat']
bitmap(file='test1.png')
op <- par(mfrow=c(2,1))
plot(fit,ylab='Observed (black) / Fitted (red)',main='Interpolation Fit of Exponential Smoothing')
plot(myresid,ylab='Residuals',main='Interpolation Prediction Errors')
par(op)
dev.off()
bitmap(file='test2.png')
p <- predict(fit, par1, prediction.interval=TRUE)
np <- length(p[,1])
plot(fit,p,ylab='Observed (black) / Fitted (red)',main='Extrapolation Fit of Exponential Smoothing')
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(myresid),lag.max = nx/2,main='Residual ACF')
spectrum(myresid,main='Residals Periodogram')
cpgram(myresid,main='Residal Cumulative Periodogram')
qqnorm(myresid,main='Residual Normal QQ Plot')
qqline(myresid)
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Estimated Parameters of Exponential Smoothing',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'alpha',header=TRUE)
a<-table.element(a,fit$alpha)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'beta',header=TRUE)
a<-table.element(a,fit$beta)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'gamma',header=TRUE)
a<-table.element(a,fit$gamma)
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,'Interpolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Fitted',header=TRUE)
a<-table.element(a,'Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:nxmK) {
a<-table.row.start(a)
a<-table.element(a,i+K,header=TRUE)
a<-table.element(a,x[i+K])
a<-table.element(a,fit$fitted[i,'xhat'])
a<-table.element(a,myresid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Extrapolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Forecast',header=TRUE)
a<-table.element(a,'95% Lower Bound',header=TRUE)
a<-table.element(a,'95% Upper Bound',header=TRUE)
a<-table.row.end(a)
for (i in 1:np) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,p[i,'fit'])
a<-table.element(a,p[i,'lwr'])
a<-table.element(a,p[i,'upr'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.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