Home » date » 2009 » Dec » 07 »

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: Mon, 07 Dec 2009 15:52:45 -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/07/t1260226433sr14819w76bkq38.htm/, Retrieved Mon, 07 Dec 2009 23:53:57 +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/07/t1260226433sr14819w76bkq38.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:
Exponential Smoothing
 
Dataseries X:
» Textbox « » Textfile « » CSV «
220206 220115 218444 214912 210705 209673 237041 242081 241878 242621 238545 240337 244752 244576 241572 240541 236089 236997 264579 270349 269645 267037 258113 262813 267413 267366 264777 258863 254844 254868 277267 285351 286602 283042 276687 277915 277128 277103 275037 270150 267140 264993 287259 291186 292300 288186 281477 282656 280190 280408 276836 275216 274352 271311 289802 290726 292300 278506 269826 265861 269034 264176 255198 253353 246057 235372 258556 260993 254663 250643 243422 247105 248541 245039 237080 237085 225554 226839 247934 248333 246969 245098 246263 255765 264319 268347 273046 273963 267430 271993 292710 295881 293299 288576
 
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.94869489322508
beta0.175963834108314
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13244752231608.73707040713143.2629295928
14244576245903.325396201-1327.32539620149
15241572243364.053924208-1792.05392420804
16240541242194.826493501-1653.82649350128
17236089237747.699578116-1658.69957811607
18236997238452.877674112-1455.87767411213
19264579264064.067305385514.932694614516
20270349270969.512147259-620.512147259142
21269645270902.763389931-1257.76338993129
22267037271021.465996317-3984.46599631675
23258113262498.400155499-4385.400155499
24262813259257.6072442433555.39275575674
25267413267640.15118384-227.151183839946
26267366265802.2000896921563.79991030786
27264777263606.7379374511170.26206254878
28258863263586.260963481-4723.26096348133
29254844253916.724584628927.275415371842
30254868255630.863548618-762.863548617752
31277267282406.233486272-5139.23348627193
32285351281661.7886772283689.2113227715
33286602283862.588459682739.41154032008
34283042286552.969876638-3510.96987663762
35276687277165.589420007-478.589420007367
36277915277811.580782719103.419217281102
37277128282081.067667089-4953.06766708888
38277103274147.2755011312955.72449886915
39275037271729.1640781053307.83592189493
40270150272344.444975788-2194.44497578795
41267140264574.1423564612565.85764353914
42264993267479.568305000-2486.56830500049
43287259292846.336443541-5587.33644354122
44291186291608.149839614-422.14983961446
45292300288468.7518503373831.24814966315
46288186290689.352216807-2503.35221680679
47281477281330.075128912146.924871087947
48282656281752.933756179903.066243821231
49280190285843.824962593-5653.82496259286
50280408276783.2445517633624.75544823677
51276836274247.3278249892588.67217501142
52275216273063.1967176062152.80328239402
53274352269461.3376330154890.66236698517
54271311274586.638501698-3275.63850169827
55289802299879.632619517-10077.6326195168
56290726294123.130899924-3397.13089992350
57292300287324.5174908924975.48250910785
58278506289449.341261054-10943.3412610535
59269826270233.965110454-407.965110453952
60265861267864.81854471-2003.81854471005
61269034265899.3900213113134.60997868871
62264176264427.39238183-251.392381830257
63255198256578.07084208-1380.07084207979
64253353249372.6863474783980.31365252161
65246057245949.790026124107.20997387619
66235372243298.843766005-7926.8437660053
67258556256173.1315063512382.86849364921
68260993259995.073624063997.926375937037
69254663256667.881829140-2004.88182913963
70250643249270.7677572471372.23224275277
71243422242496.607111015925.392888984788
72247105241117.8279373005987.1720627005
73248541247958.652836620582.347163380327
74245039244818.258880736220.741119264363
75237080238556.846896415-1476.84689641459
76237085232533.7106649924551.28933500778
77225554230671.340467827-5117.34046782652
78226839222743.7332836714095.26671632929
79247934248819.419647614-885.419647614093
80248333250936.961365441-2603.96136544063
81246969245160.2662431381808.73375686168
82245098243276.9278373361821.07216266438
83246263238711.1546908357551.84530916536
84255765246658.4315318029106.56846819786
85264319259583.2400837984735.75991620217
86268347264185.238283594161.76171641017
87273046265592.3650822517453.63491774903
88273963273840.104030974122.895969025616
89267430271387.864162814-3957.86416281387
90271993270032.1892869581960.81071304181
91292710303696.52220238-10986.52220238
92295881300566.414224755-4685.41422475548
93293299296066.680917328-2767.68091732817
94288576291927.205471524-3351.20547152415


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
95283461.88276079275236.469642982291687.295878599
96284760.263821161272429.52429436297091.003347962
97287916.972938466271595.978121189304237.967755742
98285852.314594405265795.920499146305908.708689664
99280557.074910050256977.311817304304136.838002797
100277528.933204777250236.452854669304821.413554886
101271010.202892415240329.884257648301690.521527182
102270727.860029076235942.025856382305513.69420177
103298107.574925040255284.997019572340930.152830509
104303992.394017023255614.335110779352370.452923267
105302952.803588062249934.329966301355971.277209823
106300745.422996905243823.839403356357667.006590455
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/07/t1260226433sr14819w76bkq38/1d4361260226363.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/07/t1260226433sr14819w76bkq38/1d4361260226363.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/07/t1260226433sr14819w76bkq38/2z10f1260226363.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/07/t1260226433sr14819w76bkq38/2z10f1260226363.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/07/t1260226433sr14819w76bkq38/3cdwr1260226363.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/07/t1260226433sr14819w76bkq38/3cdwr1260226363.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