Home » date » 2009 » Dec » 01 »

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: Tue, 01 Dec 2009 13:26: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/01/t1259699260tgythzvmbd9np8b.htm/, Retrieved Tue, 01 Dec 2009 21:27:45 +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/01/t1259699260tgythzvmbd9np8b.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 «
105.7 105.7 111.1 82.4 60 107.3 99.3 113.5 108.9 100.2 103.9 138.7 120.2 100.2 143.2 70.9 85.2 133 136.6 117.9 106.3 122.3 125.5 148.4 126.3 99.6 140.4 80.3 92.6 138.5 110.9 119.6 105 109 129.4 148.6 101.4 134.8 143.7 81.6 90.3 141.5 140.7 140.2 100.2 125.7 119.6 134.7 109 116.3 146.9 97.4 89.4 132.1 139.8 129 112.5 121.9 121.7 123.1
 
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.196498523917098
beta0.0899638888814172
gamma0.583891170761644


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13120.2110.8362668921289.36373310787225
14100.293.77374253906076.42625746093925
15143.2137.7339689612215.46603103877948
1670.969.26776507211881.63223492788116
1785.283.5638594022481.63614059775202
18133131.4712131396451.52878686035532
19136.6112.80243155107323.7975684489271
20117.9136.202701952687-18.3027019526874
21106.3127.870142486416-21.5701424864163
22122.3114.2921397379558.00786026204501
23125.5121.1508893039464.34911069605408
24148.4161.952468839141-13.5524688391415
25126.3141.820088080406-15.5200880804060
2699.6114.330930031326-14.7309300313257
27140.4158.468316777822-18.0683167778224
2880.376.1036674503364.19633254966406
2992.691.50999977838921.09000022161084
30138.5142.155019193663-3.65501919366267
31110.9130.82261788252-19.9226178825200
32119.6124.011853083112-4.41185308311196
33105115.229242095174-10.2292420951737
34109116.476607663784-7.47660766378387
35129.4116.96648270700712.4335172929932
36148.6148.0503298701250.549670129875324
37101.4128.964019288729-27.5640192887285
38134.899.622020512987235.1779794870128
39143.7152.162179437852-8.46217943785194
4081.680.02128219337261.57871780662735
4190.393.4181970405116-3.11819704051156
42141.5140.7833501772990.716649822701498
43140.7121.84997868118918.8500213188111
44140.2130.475290055279.72470994472985
45100.2121.107034884099-20.9070348840991
46125.7122.1470224539003.55297754609956
47119.6135.697013378742-16.0970133787416
48134.7156.956073049891-22.2560730498909
49109118.415772442545-9.41577244254475
50116.3121.236254667216-4.93625466721626
51146.9143.8494625411213.05053745887881
5297.479.190030718868418.2099692811316
5389.493.7095433342137-4.30954333421366
54132.1143.192577388638-11.0925773886379
55139.8129.76864771940510.031352280595
56129131.705789881828-2.70578988182803
57112.5105.6361870525396.86381294746096
58121.9123.320922692383-1.4209226923831
59121.7126.117611532921-4.41761153292131
60123.1146.348068519575-23.2480685195753


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61113.45964062888096.3315883874954130.587692870264
62120.273009022562102.174500466326138.371517578797
63148.220115600902128.207138399329168.233092802475
6488.782610826024470.0979528260481107.467268826001
6588.797923102709169.0910776021049108.504768603313
66134.411176744043109.622097010197159.200256477890
67132.811807301196106.660707089634158.962907512757
68126.58818135054599.6337017801938153.542660920897
69105.76753336029780.1108516189914131.424215101604
70117.28399388200288.3337441384241146.234243625581
71118.46075372722787.6312341444537149.290273310000
72129.548212502931-45.6960479819908304.792472987854
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259699260tgythzvmbd9np8b/1laj61259699211.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259699260tgythzvmbd9np8b/1laj61259699211.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259699260tgythzvmbd9np8b/2zy3f1259699211.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259699260tgythzvmbd9np8b/2zy3f1259699211.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259699260tgythzvmbd9np8b/38d4s1259699211.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259699260tgythzvmbd9np8b/38d4s1259699211.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