Home » date » 2010 » Dec » 08 »

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: Wed, 08 Dec 2010 17:32:26 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/08/t129182955720cssssmu8yei4q.htm/, Retrieved Wed, 08 Dec 2010 18:32:41 +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/2010/Dec/08/t129182955720cssssmu8yei4q.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
13328 12873 14000 13477 14237 13674 13529 14058 12975 14326 14008 16193 14483 14011 15057 14884 15414 14440 14900 15074 14442 15307 14938 17193 15528 14765 15838 15723 16150 15486 15986 15983 15692 16490 15686 18897 16316 15636 17163 16534 16518 16375 16290 16352 15943 16362 16393 19051 16747 16320 17910 16961 17480 17049 16879 17473 16998 17307 17418 20169 17871 17226 19062 17804 19100 18522 18060 18869 18127 18871 18890 21263 19547 18450 20254 19240 20216 19420 19415 20018 18652 19978 19509 21971
 
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.441210707478312
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131448313934.6017628205548.398237179497
141401113700.0651619681310.934838031946
151505714874.7571667775182.242833222492
161488414775.1272144315108.872785568487
171541415368.500611452445.4993885476215
181444014429.121320471710.8786795283049
191490014650.1753353045249.824664695465
201507415288.8215439687-214.821543968745
211444214114.5442035144327.455796485567
221530715602.3170987581-295.317098758100
231493815141.315924293-203.315924292985
241719317250.6149864358-57.6149864357903
251552815827.5545920912-299.554592091165
261476515086.2001187185-321.200118718514
271583815910.0756977177-72.0756977176534
281572315657.239289389865.7607106101514
291615016196.1788016315-46.1788016315004
301548615197.0044300021288.995569997949
311598615674.2870528431311.712947156873
321598316080.5997081844-97.5997081843961
331569215261.0606682514430.939331748592
341649016446.492781765943.5072182340591
351568616186.3937951023-500.39379510232
361889718246.0350436742650.964956325843
371631617000.4144461032-684.414446103194
381563616077.1603957515-441.160395751544
391716316987.3162750126175.683724987408
401653416920.8154859541-386.815485954132
411651817197.5229334711-679.522933471078
421637516106.2021993497268.797800650329
431629016587.267577198-297.267577197985
441635216496.1719754498-144.171975449812
451594315951.4267087220-8.42670872203234
461636216726.5129040676-364.512904067611
471639315982.4650081338410.534991866181
481905119087.3847334156-36.3847334155907
491674716792.3023814175-45.3023814174521
501632016286.959175982833.0408240172437
511791017751.0236007290158.976399271047
521696117362.8328245451-401.832824545076
531748017469.352673964010.6473260359562
541704917212.4539204236-163.453920423577
551687917186.4939385993-307.493938599273
561747317176.4345396913296.565460308651
571699816902.000350364795.9996496352796
581730717524.1834199866-217.183419986617
591741817278.2273353959139.772664604123
602016920013.9498656037155.050134396304
611787117798.347540850972.6524591490561
621722617388.8246184118-162.824618411825
631906218836.8425637327225.157436267273
641780418164.4773802878-360.477380287757
651910018519.733186048580.266813952006
661852218416.8707374281105.129262571867
671806018428.9245119388-368.924511938818
681886918729.3032104638139.696789536210
691812718273.5828564743-146.582856474255
701887118613.7325810499257.267418950087
711889018776.5725247399113.427475260116
722126321509.2081618553-246.20816185528
731954719070.5234416750476.476558325019
741845018707.5899661548-257.589966154763
752025420330.5966431988-76.59664319882
761924019197.847864049342.152135950706
772021620256.4259062639-40.4259062638776
781942019614.2054072447-194.205407244735
791941519229.2933470368185.706652963210
802001820058.5933914304-40.5933914303969
811865219363.3570782876-711.357078287645
821997819679.9895785806298.010421419436
831950919780.4295508439-271.429550843946
842197122142.3016039647-171.301603964672


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8520140.494942691819558.662634311220722.3272510725
8619157.146393898318521.198919627719793.0938681689
8720994.941653034520309.135889726321680.7474163427
8819962.343679310019230.066477737820694.6208808822
8920956.180022013120180.209497509721732.1505465165
9020245.865527139719428.53413177221063.1969225073
9120158.929763402319302.232054283621015.6274725211
9220779.840002354319885.507111443521674.1728932651
9319727.698362135318797.251332627120658.1453916435
9420922.212973264919957.002100099821887.4238464300
9520572.970597423319574.205167188621571.7360276579
9623110.550699300722079.321946992324141.7794516091
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/08/t129182955720cssssmu8yei4q/1hn971291829543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t129182955720cssssmu8yei4q/1hn971291829543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t129182955720cssssmu8yei4q/29eqa1291829543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t129182955720cssssmu8yei4q/29eqa1291829543.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t129182955720cssssmu8yei4q/39eqa1291829543.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t129182955720cssssmu8yei4q/39eqa1291829543.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