Home » date » 2008 » Aug » 12 »

Exponential smoothing

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 12 Aug 2008 07:12:52 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Aug/12/t12185468305rth8rsdn8ch1kk.htm/, Retrieved Tue, 12 Aug 2008 13:13:54 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
118 132 129 121 135 148 148 136 119 104 118 115 126 141 135 125 149 170 170 158 133 114 140 145 150 178 163 172 178 199 199 184 162 146 166 171 180 193 181 183 218 230 242 209 191 172 194 196 196 236 235 229 243 264 272 237 211 180 201 204 188 235 227 234 264 302 293 259 229 203 229 242 233 267 269 270 315 364 347 312 274 237 278 284 277 317 313 318 374 413 405 355 306 271 306 315 301 356 348 355 422 465 467 404 347 305 336 340 318 362 348 363 435 491 505 404 359 310 337 360 342 406 396 420 472 548 559 463 407 362 405 417 391 419 461 472 535 622 606 508 461 390 432
 
Text written by user:
 
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
alpha0.280899310506867
beta0.014993451758652
gamma0.883505174307315


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13126116.2813758040179.7186241959834
14141133.5520474226187.44795257738187
15135130.5403266507734.45967334922665
16125123.0867084068711.91329159312913
17149148.2485786619670.751421338033111
18170169.3717439911360.62825600886444
19170169.4380755179780.561924482021908
20158157.2098158342830.790184165716823
21133132.0357444231480.964255576852054
22114112.6926202466651.30737975333479
23140137.9655130201142.03448697988628
24145143.2874759249201.71252407508027
25150157.327613275899-7.32761327589944
26178170.9533144827167.04668551728417
27163163.840823888383-0.840823888382772
28172150.66703189593721.3329681040634
29178186.183939345429-8.18393934542874
30199209.112336697547-10.1123366975472
31199205.608117997012-6.60811799701239
32184188.644928165252-4.64492816525157
33162156.9939629361755.00603706382546
34146134.99166894310111.0083310568994
35166168.489901774244-2.48990177424432
36171172.894857765863-1.89485776586304
37180181.233088070878-1.23308807087810
38193210.229388144907-17.2293881449072
39181188.694053944275-7.69405394427463
40183186.893392341417-3.89339234141659
41218197.09742107178220.9025789282179
42230229.7196568284240.28034317157622
43242231.15252228098310.8474777190172
44209217.558308348151-8.55830834815114
45191186.5672209675494.43277903245126
46172164.5969780056597.40302199434089
47194191.4553928631392.54460713686089
48196198.212886575579-2.21288657557881
49196208.015022257809-12.0150222578093
50236225.80555483670110.194445163299
51235215.80915272770719.1908472722926
52229224.3080750226514.69192497734937
53243258.173038248152-15.1730382481524
54264269.606808068124-5.60680806812354
55272276.989796426739-4.98979642673891
56237242.093421287755-5.09342128775486
57211217.038312353546-6.03831235354647
58180190.937337132638-10.9373371326384
59201211.341411677736-10.3414116777360
60204211.370213527733-7.37021352773255
61188213.326199359853-25.3261993598532
62235242.666972805517-7.66697280551733
63227232.514056296515-5.51405629651512
64234224.5051151385159.49488486148536
65264246.39055034269817.6094496573021
66302273.31612210562728.6838778943728
67293290.9448060028522.05519399714774
68259255.2879780762693.71202192373082
69229229.892913843582-0.892913843582363
70203199.434408716913.56559128309021
71229226.5594402957582.44055970424199
72242232.4377346100379.56226538996273
73233225.8592071658847.1407928341163
74267284.847268353404-17.8472683534038
75269271.816279104082-2.81627910408235
76270274.497764248186-4.497764248186
77315301.38522072830613.6147792716945
78364338.15791596963325.8420840303668
79347336.75705788531510.2429421146852
80312298.66887292348513.3311270765146
81274267.9704135400256.02958645997461
82237237.336073764774-0.336073764773971
83278266.86660151594711.1333984840530
84284281.2843175330782.71568246692181
85277269.2633705263387.73662947366165
86317319.087689493591-2.0876894935908
87313320.224938768331-7.22493876833119
88318320.927108670734-2.92710867073379
89374366.8277737396447.17222626035584
90413416.153800041502-3.15380004150177
91405393.70482555379011.2951744462105
92355351.8727074979623.12729250203773
93306308.216218194239-2.21621819423927
94271266.5328839425274.46711605747328
95306309.233289147014-3.23328914701398
96315314.7363171558280.263682844172308
97301303.931795754729-2.93179575472885
98356348.2812865203587.71871347964168
99348348.496910117826-0.496910117826019
100355354.2156112687750.78438873122542
101422413.3656798968998.63432010310055
102465460.9193743925774.08062560742263
103467447.93760506267419.0623949373261
104404396.7984992395587.20150076044183
105347344.7876638176162.21233618238364
106305303.7467148117141.25328518828644
107336345.027015350703-9.02701535070304
108340351.992313564864-11.9923135648640
109318334.161008973001-16.1610089730015
110362386.192197615529-24.1921976155287
111348371.450293921487-23.4502939214871
112363371.517324667406-8.51732466740555
113435435.144372189276-0.144372189276396
114491478.24153087272412.7584691272763
115505476.44992174376828.5500782562323
116404417.42838144451-13.4283814445097
117359354.6478641140734.35213588592723
118310312.197102861513-2.1971028615132
119337346.353464954916-9.35346495491575
120360351.0881495724428.91185042755842
121342335.4308276351796.56917236482116
122406391.09249208826914.9075079117309
123396386.7209331697899.27906683021143
124420407.17531319350812.8246868064923
125472491.329832090014-19.3298320900138
126548543.1005814864484.8994185135524
127559549.2230471931359.77695280686498
128463448.84668113559814.1533188644022
129407399.4372737479627.56272625203832
130362347.96599794037414.0340020596257
131405386.15829711720318.8417028827972
132417413.4707595069243.52924049307609
133391391.831406431631-0.831406431631422
134419459.328420854134-40.3284208541342
135461434.43413363760526.5658663623951
136472464.2384287856547.76157121434602
137535533.126901553661.87309844634001
138622615.4160980560336.58390194396657
139606626.05270305136-20.0527030513606
140508508.720515758472-0.72051575847189
141461444.98923902332416.0107609766756
142390394.565358759392-4.56535875939153
143432433.629003574392-1.62900357439185


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
144446.165888018917426.272188876449466.059587161386
145418.776549113291398.061024816972439.49207340961
146463.532987574271441.537567359875485.528407788667
147494.864017931474471.602976717914518.125059145034
148505.864488625518481.576901417936530.1520758331
149573.207351846183546.787097108086599.62760658428
150663.756003594139634.448819995664693.063187192614
151654.658689744205624.810890191196684.506489297214
152547.365267589531519.539966541438575.190568637624
153490.097466150254462.992972841699517.201959458808
154417.412520574714391.467173654527443.3578674949
155462.363954417815441.514377669981483.213531165649
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/12/t12185468305rth8rsdn8ch1kk/1tivu1218546766.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/12/t12185468305rth8rsdn8ch1kk/1tivu1218546766.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/12/t12185468305rth8rsdn8ch1kk/2g3py1218546766.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/12/t12185468305rth8rsdn8ch1kk/2g3py1218546766.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/12/t12185468305rth8rsdn8ch1kk/3gsae1218546766.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/12/t12185468305rth8rsdn8ch1kk/3gsae1218546766.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