Home » date » 2009 » Dec » 04 »

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 09:17:53 -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/t1259943512us42vfa8d2o431f.htm/, Retrieved Fri, 04 Dec 2009 17:18:36 +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/t1259943512us42vfa8d2o431f.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
462 455 461 461 463 462 456 455 456 472 472 471 465 459 465 468 467 463 460 462 461 476 476 471 453 443 442 444 438 427 424 416 406 431 434 418 412 404 409 412 406 398 397 385 390 413 413 401 397 397 409 419 424 428 430 424 433 456 459 446 441
 
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.425497132234063
beta0.750351434132633
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13465463.1629417113691.83705828863145
14459458.4386036768330.56139632316706
15465465.2984471025-0.298447102499665
16468468.830611719609-0.83061171960918
17467467.909466193403-0.909466193403148
18463463.825386794596-0.825386794596454
19460460.419032995802-0.419032995802013
20462459.0160086407272.98399135927286
21461461.993485896885-0.99348589688526
22476478.029037775497-2.02903777549699
23476476.781658147538-0.781658147537769
24471475.06452024124-4.06452024123956
25453466.714795056054-13.7147950560544
26443448.038636565858-5.0386365658581
27442443.333552989163-1.33355298916308
28444437.0882690046346.91173099536582
29438433.0688553387234.9311446612769
30427427.274180244202-0.274180244201943
31424420.2497792920693.75022070793068
32416419.523401440320-3.52340144031962
33406412.541952806296-6.54195280629597
34431416.88494865603514.1150513439655
35434421.29444619790812.7055538020916
36418426.133221355773-8.13322135577312
37412412.579570703811-0.579570703811328
38404409.810577625581-5.81057762558117
39409411.315704326062-2.31570432606202
40412413.593992012247-1.59399201224704
41406406.958288904532-0.958288904532367
42398396.2511966170571.74880338294253
43397393.1629604107343.837039589266
44385389.289314676407-4.28931467640746
45390380.9448140751839.05518592481712
46413408.1552273559124.84477264408798
47413410.4999783016782.50002169832152
48401399.1926275876881.80737241231230
49397396.9948577425180.00514225748213448
50397394.3388409939352.66115900606525
51409406.7849282002582.21507179974157
52419418.4532720287060.546727971294331
53424420.7799744261393.22002557386071
54428422.1585124699195.84148753008111
55430432.323650740407-2.32365074040723
56424428.580034262214-4.58003426221427
57433436.350283797238-3.35028379723821
58456462.684911396768-6.68491139676786
59459459.205190194173-0.205190194172587
60446444.5336599831811.46634001681929
61441440.1646656779830.835334322016934


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
62438.977121235833429.358138622567448.596103849099
63449.959818637493437.879824477006462.039812797979
64458.672292641558442.625022915679474.719562367438
65460.438380994200439.448550022769481.42821196563
66458.801946609596432.220326222380485.383566996812
67456.844595561333424.113858256671489.575332865995
68448.321099290396409.504376041661487.13782253913
69456.661703837808409.906279973285503.417127702331
70482.273770641975424.887167385101539.660373898848
71486.148892116373419.772623285923552.525160946822
72472.372587312214399.216318720857545.52885590357
73466.855442403412386.159178550149547.551706256674
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943512us42vfa8d2o431f/1ul5n1259943472.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943512us42vfa8d2o431f/1ul5n1259943472.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943512us42vfa8d2o431f/237nt1259943472.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943512us42vfa8d2o431f/237nt1259943472.ps (open in new window)


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