Home » date » 2008 » Jun » 01 »

exponential smoothing - opgave 10 - Vanovermeire Bart

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 01 Jun 2008 08:08:44 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Jun/01/t12123293926j1i9y49he92w3h.htm/, Retrieved Sun, 01 Jun 2008 14:09:52 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
41086 39690 43129 37863 35953 29133 24693 22205 21725 27192 21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 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
 
Text written by user:
 
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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.185475284794843
beta0.000362009975189055
gamma0.521962133305563


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133770239722.9017575777-2020.90175757770
143036431535.1647279220-1171.16472792205
153260933590.6706490098-981.670649009757
163021230845.0542818759-633.05428187587
172996530291.5608338424-326.560833842421
182835228469.5184451801-117.518445180067
192581425831.2286456269-17.2286456268739
202241422218.8079229484195.192077051648
212050620072.5399434037433.460056596261
222880627930.4449264666875.555073533356
232222821566.2431248708661.756875129231
241397113746.8693916781224.130608321868
253684537213.4050139222-368.405013922165
263533829947.19894761515390.80105238488
273502233308.61750170571713.38249829426
283477731165.82031567013611.17968432987
292688731520.5411419808-4633.54114198077
302397028958.9890191581-4988.98901915809
312278025492.0388690565-2712.03886905648
321735121581.2380713670-4230.23807136697
332138218854.02966617022527.9703338298
342456126884.760927283-2323.76092728299
351740920297.5845264531-2888.58452645312
361151412446.0767867257-932.07678672567
373151432744.2952985218-1230.29529852177
382707128263.5475890451-1192.54758904512
392946228693.3350317845768.664968215468
402610527404.5074091275-1299.50740912755
412239723992.1600755122-1595.16007551224
422384322093.26021751341749.73978248663
432170521025.8101504192679.189849580791
441808917487.4969484943601.503051505708
452076418432.12201091492331.87798908514
462531623929.2056032311386.794396769
471770418076.7317399466-372.731739946608
481554811701.23901412513846.7609858749
492802933682.2332964645-5653.23329646454
502938328310.7491611431072.25083885702
513643830049.57033363886388.42966636116
523203428761.94411455843272.05588544160
532267925730.3147471643-3051.31474716425
542431924963.3452032993-644.345203299283
551800422866.9428489642-4862.9428489642
561753718177.4902171702-640.490217170161
572036619623.4814012916742.518598708433
582278224395.3863212825-1613.38632128246
591916917424.42240114831744.57759885167
601380713167.5829631344639.417036865627
612974329499.3786647026243.621335297357
622559128109.0855152350-2518.08551523496
632909631165.2654727371-2069.26547273713
642648227303.0021100247-821.002110024696
652240521530.9386521874874.061347812596
662704422431.67960507984612.32039492025
671797019629.5503743844-1659.55037438441
681873017383.67985006391346.32014993611
691968419765.1142051539-81.1142051538809
701978523314.0381640939-3529.03816409394
711847917568.5563000246910.443699975363
721069812888.4569955773-2190.45699557732


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7327245.510322207224298.673526978730192.3471174356
7424823.019525218521764.547317407327881.4917330298
7528275.335183873925018.240534187331532.4298335605
7625480.826151418522176.949704405228784.7025984318
7720816.648159815817541.813627592624091.4826920390
7822940.0238985419452.440250716926427.6075463630
7917177.669132286313845.449555901820509.8887086708
8016556.082254438813135.471623733919976.6928851438
8117936.311376861014302.878373112821569.7443806092
8219798.531623841715897.439720694623699.6235269888
8316793.375588092313050.972784565520535.778391619
8411047.71668241439412.978078371112682.4552864575
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123293926j1i9y49he92w3h/1t2pv1212329318.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123293926j1i9y49he92w3h/1t2pv1212329318.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123293926j1i9y49he92w3h/2nkmg1212329318.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123293926j1i9y49he92w3h/2nkmg1212329318.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123293926j1i9y49he92w3h/3ges51212329318.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123293926j1i9y49he92w3h/3ges51212329318.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; 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