Home » date » 2009 » Dec » 03 »

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: Thu, 03 Dec 2009 10:28:15 -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/03/t12598613961qnyew3brlmwc18.htm/, Retrieved Thu, 03 Dec 2009 18:30:00 +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/03/t12598613961qnyew3brlmwc18.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:
Uitleg in Word document
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
96.96 93.11 95.62 98.30 96.38 100.82 99.06 94.03 102.07 99.31 98.64 101.82 99.14 97.63 100.06 101.32 101.49 105.43 105.09 99.48 108.53 104.34 106.10 107.35 103.00 104.50 105.17 104.84 106.18 108.86 107.77 102.74 112.63 106.26 108.86 111.38 106.85 107.86 107.94 111.38 111.29 113.72 111.88 109.87 113.72 111.71 114.81 112.05 111.54 110.87 110.87 115.48 111.63 116.24 113.56 106.01 110.45 107.77 108.61 108.19
 
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.176261864801442
beta1
gamma0.600923944155917


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1399.1496.97010780860232.16989219139769
1497.6396.20305911867731.42694088132269
15100.0699.4313789044460.628621095554024
16101.32101.501848185809-0.181848185808690
17101.49102.267284361111-0.777284361111484
18105.43106.577629786737-1.14762978673657
19105.09105.527295103797-0.437295103797226
2099.48100.520382405752-1.04038240575231
21108.53109.072585741727-0.542585741727265
22104.34106.155697584904-1.81569758490407
23106.1104.9001623906931.19983760930700
24107.35108.418033329171-1.0680333291713
25103106.238976848037-3.23897684803737
26104.5102.789440142731.71055985726996
27105.17104.6058624707630.564137529236874
28104.84105.107030858014-0.267030858013840
29106.18104.3563477700341.82365222996579
30108.86108.2860052110300.573994788969728
31107.77107.4185817164260.351418283574333
32102.74101.8405465867260.899453413274145
33112.63111.2261873320721.40381266792828
34106.26108.310144341984-2.05014434198399
35108.86108.864245321722-0.00424532172155523
36111.38111.2372556961410.142744303859160
37106.85108.419593267117-1.56959326711744
38107.86108.334309597288-0.474309597288027
39107.94109.479637970686-1.53963797068599
40111.38109.0653734536842.31462654631638
41111.29110.1415180754641.14848192453621
42113.72113.6621201313140.0578798686858164
43111.88112.640248565069-0.760248565068508
44109.87106.7983330893543.0716669106464
45113.72117.568547610295-3.8485476102947
46111.71111.2071562954110.502843704588955
47114.81113.1618864921911.64811350780889
48112.05116.154619004939-4.10461900493868
49111.54111.0307747282330.509225271766581
50110.87111.681541542628-0.81154154262758
51110.87112.005327353228-1.13532735322833
52115.48113.4396404604572.04035953954320
53111.63113.646580715151-2.01658071515121
54116.24115.3060571994030.93394280059708
55113.56113.3563290301390.203670969861363
56106.01109.066993650808-3.05699365080753
57110.45113.672010559872-3.22201055987207
58107.77108.156438072855-0.38643807285456
59108.61108.787487038676-0.177487038676162
60108.19106.659773981561.53022601844008


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61103.951517191193101.767746706038106.135287676349
62102.799120961628100.333140101633105.265101821623
63102.14507735327599.1337009786908105.156453727859
64104.307857934344100.438799593681108.176916275008
65101.25197951209196.4615776124803106.042381411702
66103.58724081572197.5004115900556109.674070041386
67100.44591095407093.2043623606451107.687459547494
6894.27008029067786.0728884430293102.467272138325
6998.253408616442388.1760156747464108.330801558138
7095.154642160947283.7527780355253106.556506286369
7195.94906364897982.6914742122405109.206653085718
7294.958394657164379.9845144089064109.932274905422
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598613961qnyew3brlmwc18/16way1259861292.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598613961qnyew3brlmwc18/16way1259861292.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598613961qnyew3brlmwc18/2pidj1259861292.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598613961qnyew3brlmwc18/2pidj1259861292.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598613961qnyew3brlmwc18/3dwd91259861292.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598613961qnyew3brlmwc18/3dwd91259861292.ps (open in new window)


 
Parameters (Session):
par1 = 12 ;
 
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