Home » date » 2009 » Dec » 04 »

WS 9 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 03:24:57 -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/t1259922348gc6apgi5uewb3bu.htm/, Retrieved Fri, 04 Dec 2009 11:25:53 +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/t1259922348gc6apgi5uewb3bu.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:
SHW WS 9 Exponential Smoothing
 
Dataseries X:
» Textbox « » Textfile « » CSV «
14.2 13.5 11.9 14.6 15.6 14.1 14.9 14.2 14.6 17.2 15.4 14.3 17.5 14.5 14.4 16.6 16.7 16.6 16.9 15.7 16.4 18.4 16.9 16.5 18.3 15.1 15.7 18.1 16.8 18.9 19 18.1 17.8 21.5 17.1 18.7 19 16.4 16.9 18.6 19.3 19.4 17.6 18.6 18.1 20.4 18.1 19.6 19.9 19.2 17.8 19.2 22 21.1 19.5 22.2 20.9 22.2 23.5 21.5 24.3 22.8 20.3 23.7 23.3 19.6 18 17.3 16.8 18.2 16.5 16 18.4
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.317087774037496
beta1
gamma0.738379041593874


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1317.516.4131767360861.08682326391400
1414.514.17716765055870.322832349441292
1514.414.5732869780867-0.173286978086702
1616.617.1319032562038-0.531903256203826
1716.717.3034566455206-0.603456645520573
1816.617.0118877403367-0.411887740336734
1916.916.89213267254770.00786732745228846
2015.715.9393910683414-0.239391068341405
2116.416.10773955752550.292260442474461
2218.418.9064054728083-0.506405472808321
2316.916.55019835966900.349801640331023
2416.515.33810300697771.16189699302232
2518.320.0935234065092-1.79352340650924
2615.115.6275565387011-0.527556538701084
2715.714.72926527132380.970734728676204
2818.117.11842151698620.981578483013802
2916.817.7762601846023-0.976260184602303
3018.917.38212078696921.51787921303081
311918.64310695534360.356893044656434
3218.118.1646179990937-0.0646179990937306
3317.819.4299709565994-1.62997095659941
3421.521.6566019190386-0.1566019190386
3517.119.7409316726321-2.64093167263206
3618.717.13477005926161.56522994073841
371919.997718610579-0.997718610578982
3816.415.84337525349740.5566247465026
3916.915.99376438961810.906235610381929
4018.618.36007926035010.239920739649932
4119.317.43724569787551.86275430212455
4219.419.8534457152028-0.4534457152028
4317.619.8426632968719-2.24266329687188
4418.617.51528445873791.08471554126212
4518.117.90600163418340.193998365816643
4620.421.5809089377904-1.18090893779042
4718.117.92891912762840.171080872371633
4819.619.06399568228590.536004317714077
4919.920.7616097208104-0.861609720810378
5019.217.63426143142991.56573856857007
5117.819.0380416453745-1.23804164537448
5219.220.6175198079932-1.41751980799319
532219.44412852581052.55587147418955
5421.120.60963151754940.490368482450613
5519.519.8658549968483-0.36585499684827
5622.220.38003440053801.81996559946203
5720.921.2286391355478-0.328639135547832
5822.225.1539248642576-2.95392486425764
5923.521.26924129520222.23075870479783
6021.524.3108188211452-2.81081882114518
6124.324.09101077142390.208989228576133
6222.822.23955056811610.56044943188391
6320.321.4533952185358-1.15339521853578
6423.722.97973689673950.720263103260521
6523.325.1663445591757-1.86634455917566
6619.622.7398461236589-3.13984612365891
671818.3892614822285-0.389261482228502
6817.317.7901178246006-0.490117824600606
6916.814.53478671872202.26521328127796
7018.215.47122052203592.72877947796406
7116.515.87035218245090.629647817549079
721615.39282872042860.607171279571432
7318.417.45025339917520.949746600824781


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7417.002654275103514.847326199248019.1579823509590
7515.984195272769313.346629158550918.6217613869878
7618.919972742985915.020391363901722.8195541220702
7719.989395623153614.580289739605425.3985015067018
7818.790426079938212.273871621838625.3069805380379
7918.771108980354010.773792730427926.7684252302802
8020.449214093014310.071831471403030.8265967146256
8121.01694780898568.5490792629856633.4848163549855
8223.51890468689447.5290359298394239.5087734439493
8322.24967257464685.1257347368564139.3736104124371
8421.77812443227913.0534130236363540.5028358409219
8524.78105184009230.90673692561476248.6553667545698
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922348gc6apgi5uewb3bu/1tbxa1259922296.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922348gc6apgi5uewb3bu/1tbxa1259922296.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922348gc6apgi5uewb3bu/33aj21259922296.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922348gc6apgi5uewb3bu/33aj21259922296.ps (open in new window)


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