Home » date » 2009 » Dec » 04 »

Exponential smoothing

*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, 04 Dec 2009 12:29:39 -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/04/t1259955026c64xu2glnn6agsz.htm/, Retrieved Fri, 04 Dec 2009 20:30: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/04/t1259955026c64xu2glnn6agsz.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 «
7.3 7.6 7.5 7.6 7.9 7.9 8.1 8.2 8 7.5 6.8 6.5 6.6 7.6 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
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
136.66.60287968271151-0.00287968271150874
147.67.63453373333942-0.0345337333394165
1588.02308015304527-0.0230801530452709
168.18.091732643438560.0082673565614435
177.77.653748556834430.0462514431655654
187.57.426524536876950.0734754631230476
197.68.13654148519345-0.536541485193451
207.87.719908321933410.0800916780665908
217.87.585052313022180.214947686977819
227.87.268876941790020.531123058209976
237.57.057257787661120.442742212338883
247.57.189833180492890.310166819507109
257.17.65028232418406-0.550282324184056
267.58.213173299187-0.713173299186991
277.57.91746455154151-0.417464551541512
287.67.585764991458640.0142350085413643
297.77.181076124742520.518923875257484
307.77.426524536876950.273475463123048
317.98.3536149252818-0.453614925281800
328.18.024790476815560.0752095231844354
338.27.876926276537930.323073723462064
348.27.641815369497550.558184630502446
358.27.419327308334370.78067269166563
367.97.861161568676360.0388384313236427
377.38.05845907272605-0.75845907272605
386.98.44462912552602-1.54462912552602
396.67.28377094251895-0.683770942518955
406.76.675023217894780.0249767821052238
416.96.330265746977060.569734253022936
4276.654582193506040.345417806493963
437.17.59385788497258-0.493857884972579
447.27.21177139712982-0.0117713971298175
457.17.001304385990670.098695614009328
466.96.616234693301840.283765306698156
4776.24260136614630.757398633853702
486.86.710312903218990.089687096781014
496.46.93597301423556-0.535973014235562
506.77.40307790700039-0.703077907000387
516.67.07253973951144-0.472539739511437
526.46.67502321789478-0.275023217894776
536.36.046662287721910.253337712278086
546.26.075625435977850.124374564022149
556.56.72556412461918-0.225564124619183
566.86.602007087365510.197992912634492
576.86.6121391013030.187860898697001
586.46.33653087252120.0634691274788057
596.15.790014465304730.309985534695268
605.85.84717640412596-0.0471764041259561
616.15.915531142880580.184468857119423
627.27.055894167491840.144105832508158
637.37.60061774703023-0.300617747030233
646.97.38337793066667-0.483377930666666
656.16.51933471981383-0.419334719813833
665.85.88263985013512-0.0826398501351218
676.26.29141724444248-0.0914172444424848
687.16.297124932483350.802875067516647
697.76.904013064818750.795986935181247
707.97.175642334863140.724357665136859
717.77.147775167829430.552224832170569
727.47.381641291402450.0183587085975470
737.57.54823813704856-0.0482381370485570


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
748.676084951865057.787363428944819.5648064747853
759.159593747648997.8669802862906510.4522072090073
769.265166494935677.6837754251710310.8465575647003
778.755232718740957.0160573032490410.4944081342329
788.444748059010146.545771894384910.3437242236354
799.161940041124066.9174126358778411.4064674463703
809.307267140382166.8591994109801411.7553348697842
819.051492427490176.5093290899818611.5936557649985
828.43570098728025.9043850857461610.9670168888142
837.632677667051255.1750784679929810.0902768661095
847.317076443877834.798152194241819.83600069351385
857.46361946825984-216.657454182507231.584693119026
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259955026c64xu2glnn6agsz/1790a1259954975.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259955026c64xu2glnn6agsz/1790a1259954975.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259955026c64xu2glnn6agsz/2b9n61259954975.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259955026c64xu2glnn6agsz/2b9n61259954975.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259955026c64xu2glnn6agsz/34wl01259954975.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259955026c64xu2glnn6agsz/34wl01259954975.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