Home » date » 2008 » May » 30 »

exponential smoothing - hondenvoeding - Peter De Klerck

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 30 May 2008 05:13:16 -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/May/30/t1212146122v4bbevm7ibvtvpy.htm/, Retrieved Fri, 30 May 2008 11:15:22 +0000
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2,02 1,99 1,99 2,01 2,01 2,01 2 2,01 2,02 2,01 2 2,01 2,01 2,01 2 2 1,98 2,01 1,99 1,99 2 2 1,99 1,96 1,98 1,98 1,99 1,99 1,99 1,99 1,98 1,98 1,98 1,98 1,98 1,98 1,97 1,99 2 1,99 1,98 1,98 1,96 1,95 1,94 1,93 1,92 1,91 1,92 1,93 1,94 1,93 1,94 1,93 1,93 1,92 1,92 1,91 1,92 1,92 1,93 1,91 1,95 2,01 1,98 2,01 2 1,99 1,98 1,98 1,99 1,98 1,99
 
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.605336936283191
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
132.012.01751358695652-0.00751358695652193
142.012.01421533524776-0.00421533524776363
1522.00333030379014-0.00333030379014243
1622.00256434789693-0.00256434789692506
171.981.98184538673077-0.00184538673076973
182.012.01322830598091-0.00322830598090773
191.991.99460742646237-0.00460742646237389
201.991.99431838104349-0.00431838104349036
2122.00337097215959-0.00337097215958737
2222.00216373153354-0.00216373153353988
231.991.99085394491609-0.000853944916087368
241.961.96075368718350-0.000753687183495222
251.981.99108211724516-0.0110821172451585
261.981.98692540046873-0.00692540046873091
271.991.974749155659670.0152508443403274
281.991.985533349547870.00446665045213268
291.991.969354258797870.0206457412021290
301.992.01380610137633-0.0238061013763311
311.981.98218443432322-0.00218443432321935
321.981.98347619109306-0.00347619109305985
331.981.99341249818623-0.0134124981862327
341.981.98660320424373-0.00660320424372718
351.981.973122965216440.00687703478356383
361.981.947742123073600.0322578769263955
371.971.99397742236394-0.0239774223639444
381.991.983655203672460.00634479632753804
3921.988264043854010.0117359561459911
401.991.99266442309164-0.00266442309163506
411.981.978553919653790.00144608034621019
421.981.99383999797218-0.0138399979721793
431.961.97678445478226-0.0167844547822642
441.951.96872847121339-0.0187284712133924
451.941.96551051638777-0.0255105163877676
461.931.95406522198114-0.0240652219811441
471.921.93533473106951-0.015334731069508
481.911.906525167555540.00347483244445912
491.921.913143031375330.00685696862467466
501.931.93345306818452-0.00345306818452329
511.941.934258590731160.00574140926884104
521.931.929346951539160.000653048460840244
531.941.918866900047290.0211330999527051
541.931.94003740799748-0.0100374079974763
551.931.924121644627140.00587835537286097
561.921.92901706564451-0.00901706564451343
571.921.92900116058617-0.00900116058617262
581.911.92811999335899-0.0181199933589866
591.921.916433971217930.00356602878207157
601.921.906489175729540.0135108242704611
611.931.920517000320630.00948299967937016
621.911.93834768000891-0.0283476800089104
631.951.927712295144830.0222877048551680
642.011.930808551764110.079191448235886
651.981.975953414439520.00404658556048298
662.011.974478975950520.0355210240494754
6721.992422778190480.00757722180951625
681.991.99246791331771-0.00246791331770857
691.981.99642272920318-0.0164227292031811
701.981.98745014588732-0.00745014588731974
711.991.99078164846339-0.000781648463390017
721.981.98212988680677-0.0021298868067694
731.991.985100177679850.00489982232015462


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
741.985226118878791.952554728705962.01789750905162
752.011734547904981.973543484221692.04992561158826
762.023797039250041.980788959140642.06680511935944
771.991347491544451.94401005853282.03868492455610
781.999845303672701.948542573008842.05114803433655
791.985258531436991.930275736100592.04024132677338
801.976752450523741.918320906025592.03518399502189
811.976693735105001.915005948616302.03838152159370
821.981203583591301.916423026235632.04598414094697
831.991676744277371.923944490359862.05940899819489
841.982966043431611.912405460737152.05352662612608
851.991.916720170308482.06327982969152
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/30/t1212146122v4bbevm7ibvtvpy/1b5gl1212145989.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/30/t1212146122v4bbevm7ibvtvpy/1b5gl1212145989.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/30/t1212146122v4bbevm7ibvtvpy/2cyd81212145989.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/30/t1212146122v4bbevm7ibvtvpy/2cyd81212145989.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/30/t1212146122v4bbevm7ibvtvpy/37fxf1212145989.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/30/t1212146122v4bbevm7ibvtvpy/37fxf1212145989.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = additive ;
 
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