Home » date » 2010 » Jun » 02 »

Exponential Smoothing

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 02 Jun 2010 09:05:52 +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/Jun/02/t1275469605l3azjhaq10zf4wa.htm/, Retrieved Wed, 02 Jun 2010 11:06:47 +0200
 
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/Jun/02/t1275469605l3azjhaq10zf4wa.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112 118 129 99 116 168 118 129 205 147 150 267 126 129 124 97 102 127 222 214 118 141 154 226 89 77 82 97 127 121 117 117 106 112 134 169 75 108 115 85 101 108 109 124 105 95 135 164 88 85 112 87 91 87 87 142 95 108 139 159 61 82 124 93 108 75 87 103 90 108 123 129 57 65 67 71 76 67 110 118 99 85 107 141 58 65 70 86 93 74 87 73 101 100 96 157 63 115 70 66 67 83 79 77 102 116 100 135 71 60 89 74 73 91 86 74 87 87 109 137 43 69 73 77 69 76 78 70 83 65 110 132 54 55 66 65 60 65 96 55 71 63 74 106 34 47 56 53 53 55 67 52 46 51 58 91 33 40 46 45 41 55 57 54 46 52 48 77 30 35 42 48 44 45 46
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server184.73.214.54 @ 184.73.214.54


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.152823208325162
beta0.147474162937433
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
31291245
499130.876803415252-31.8768034152516
5116131.399552768518-15.3995527685179
6168134.09334139869733.9066586013035
7118145.086433902012-27.0864339020116
8129146.147906503835-17.1479065038352
9205148.34174623925656.6582537607441
10147163.091814142575-16.0918141425755
11150166.361314408516-16.3613144085161
12267169.22088606921997.7791139307813
13126191.727458497205-65.7274584972051
14129187.765101009866-58.765101009866
15124183.542336352517-59.5423363525171
1697177.858858195858-80.8588581958583
17102167.095366307872-65.0953663078718
18127157.273816651726-30.273816651726
19222152.09151255526469.9084874447363
20214163.7949503570950.2050496429099
21118173.618740616409-55.6187406164089
22141166.016693770282-25.0166937702818
23154162.527536800942-8.52753680094168
24226161.36611655711464.6338834428858
2589172.842143795057-83.8421437950573
2677159.737997994439-82.7379979944389
2782144.937885758919-62.9378857589193
2897131.745229190883-34.745229190883
29127122.0779951260744.92200487392613
30121118.5837645968772.41623540312274
31117114.7610501821572.23894981784284
32117110.9617026904356.03829730956465
33106107.879071644938-1.87907164493795
34112103.5441333446158.45586665538512
35134100.97918735421533.0208126457851
36169102.91254095281166.087459047189
3775111.38868998095-36.3886899809497
38108103.3839959570734.61600404292662
39115101.74980390476613.2501960952339
4085101.733742742788-16.7337427427879
4110196.75830354523474.24169645476528
4210895.083995388522112.9160046114779
4310995.026416961800713.9735830381993
4412495.445390337849828.5546096621502
4510598.73623177679346.2637682232066
469598.761684828785-3.76168482878495
4713597.170237103705137.8297628962949
48164102.78751518399461.2124848160055
4988113.357790676834-25.3577906768345
5085110.1266183568-25.1266183568003
51112106.3644840062445.63551599375556
5287107.430528021343-20.4305280213427
5391104.052623052806-13.052623052806
5487101.508060030129-14.5080600301295
558798.414097422823-11.4140974228231
5614295.535719175425946.4642808245741
5795102.54968793916-7.54968793916002
58108101.1389178009346.86108219906647
59139102.08507925631636.914920743684
60159108.45613383381650.5438661661844
6161118.049138683103-57.0491386831028
6282109.913691816814-27.9136918168143
63124105.60171329281218.3982867071882
6493108.781930832383-15.781930832383
65108106.3829329990561.61706700094427
6675106.679350442923-31.6793504429228
6787101.173329987367-14.1733299873671
6810398.02320467647374.97679532352632
699097.9118273542362-7.91182735423615
7010895.652456754464612.3475432455354
7112396.767470612212726.2325293877873
72129100.59564756782528.4043524321754
7357105.395891864019-48.3958918640192
746597.368555237026-32.368555237026
756791.0610621187327-24.0610621187327
767185.4808711725545-14.4808711725545
777681.0383934750891-5.03839347508912
786777.925392848289-10.9253928482889
7911073.666491324687336.3335086753127
8011877.448712287291840.5512877127082
819982.789431396295816.2105686037042
828584.77566899830680.224331001693187
8310784.323894335210922.6761056647891
8414187.814334067008253.1856659329918
855897.1660132852881-39.1660132852881
866591.5215095567116-26.5215095567116
877087.211651604308-17.211651604308
888683.93664885023182.06335114976824
899383.65381658189689.34618341810318
907484.6946094790651-10.6946094790651
918782.43167461747814.56832538252191
927382.6042289477417-9.60422894774166
9310180.394432987927320.6055670120727
9410083.265792415272516.7342075847275
959685.922665054837510.0773349451625
9615787.789330741835869.2106692581642
9763100.252776006629-37.2527760066291
9811595.606552499014819.3934475009852
9970100.054265940226-30.0542659402255
1006696.267873909996-30.267873909996
1016791.7666761812713-24.7666761812713
1028387.5480108006196-4.54801080061955
1037986.3167260530232-7.31672605302317
1047784.4974168291247-7.49741682912469
10510282.481521018817219.5184789811828
10611685.034178308731230.9658216912688
10710090.03414666210939.96585333789074
10813592.049437644714642.9505623552854
10971100.073554898544-29.0735548985441
1106096.435470968159-36.435470968159
1118990.8511518985503-1.85115189855031
1127490.5103991377743-16.5103991377743
1137387.5572704789984-14.5572704789984
1149184.57454109264056.42545890735946
1158684.94327334824681.05672665175322
1167484.5153546661178-10.5153546661178
1178782.08196384997834.91803615002172
1188782.11799344912594.88200655087414
11910982.258544988585526.7414550114145
12013786.342412440437350.6575875595627
1214395.2229140982885-52.2229140982885
1226987.20391481212-18.2039148121201
1237383.973537870898-10.973537870898
1247781.6008144988228-4.60081449882281
1256980.0983004177545-11.0983004177545
1267677.35269202735-1.35269202734997
1277876.06595251587041.93404748412962
1287075.325091627755-5.32509162775503
1298373.3548516929139.64514830708693
1306573.8897891405026-8.88978914050257
13111071.391804583179138.6081954168209
13213277.022745643275754.9772543567243
1335486.3943072883557-32.3943072883557
1345581.6833806847044-26.6833806847044
1356677.243840189369-11.243840189369
1366574.9104120435154-9.91041204351536
1376072.5574070040354-12.5574070040354
1386569.5168674593012-4.5168674593012
1399667.603310178257728.3966898217423
1405571.3596979974331-16.3596979974331
1417167.90756475690843.09243524309156
1426367.4978646080997-4.49786460809969
1437465.82681997395968.17318002604037
14410666.276407871901339.7235921280987
1453472.4429004248403-38.4429004248403
1464765.7973329056275-18.7973329056275
1475661.7304196288082-5.73041962880821
1485359.5312847743102-6.53128477431024
1495357.062560473317-4.06256047331697
1505554.87955468648490.120445313515056
1516753.338523797648413.6614762023516
1525254.174771867893-2.17477186789298
1534652.541859834204-6.54185983420397
1545150.09411840579620.905881594203848
1555848.80498100078729.1950189992128
1569148.98984867655242.010151323448
1573355.1364328793738-22.1364328793738
1584050.9810309846959-10.9810309846959
1594648.2829486894455-2.28294868944553
1604546.8626833384443-1.86268333844433
1614145.4646641080699-4.46466410806987
1625543.568379573988911.4316204260111
1635744.359056099274712.6409439007253
1645445.61944027153418.38055972846588
1654646.4176155189542-0.417615518954165
1665245.86181339845326.13818660154681
1674846.44622921654281.55377078345722
1687746.365057970776230.6349420292238
1693051.4185988483316-21.4185988483316
1703548.0344294741013-13.0344294741013
1714245.637792637953-3.63779263795298
1724844.5951933309383.40480666906205
1734444.7056023892176-0.705602389217582
1744544.17194305166910.828056948330897
1754643.89132476710662.10867523289338


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
17643.8539388921958-15.2163826921205102.924260476512
17743.4942985028783-16.4773925973345103.465989603091
17843.1346581135609-17.9657320511246104.235048278246
17942.7750177242435-19.6974516049384105.247487053425
18042.4153773349261-21.6845732756973106.515327945549
18142.0557369456086-23.9350586876601108.046532578877
18241.6960965562912-26.4529932513262109.845186363909
18341.3364561669738-29.2389529045126111.91186523846
18440.9768157776564-32.2905001125367114.244131667849
18540.6171753883389-35.602748355276116.837099131954
18640.2575349990215-39.1689382717573119.6840082698
18739.8978946097041-42.9809803672515122.77676958666
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469605l3azjhaq10zf4wa/1y9uk1275469548.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469605l3azjhaq10zf4wa/1y9uk1275469548.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469605l3azjhaq10zf4wa/2y9uk1275469548.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469605l3azjhaq10zf4wa/2y9uk1275469548.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469605l3azjhaq10zf4wa/3y9uk1275469548.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275469605l3azjhaq10zf4wa/3y9uk1275469548.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
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