Home » date » 2009 » Dec » 06 »

WS9

*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: Sun, 06 Dec 2009 12:48:01 -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/06/t1260128930yfzj4dsd79pyl0v.htm/, Retrieved Sun, 06 Dec 2009 20:48:54 +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/06/t1260128930yfzj4dsd79pyl0v.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 «
286602 283042 276687 277915 277128 277103 275037 270150 267140 264993 287259 291186 292300 288186 281477 282656 280190 280408 276836 275216 274352 271311 289802 290726 292300 278506 269826 265861 269034 264176 255198 253353 246057 235372 258556 260993 254663 250643 243422 247105 248541 245039 237080 237085 225554 226839 247934 248333 246969 245098 246263 255765 264319 268347 273046 273963 267430 271993 292710 295881 293299
 
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.799417188372112
beta0.422190477532405
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13292300290291.7701209682008.22987903241
14288186288526.781022269-340.781022268697
15281477281924.588728638-447.588728637842
16282656282923.979980075-267.979980075033
17280190280523.26700116-333.26700115978
18280408280923.379699651-515.379699651443
19276836279339.314168009-2503.31416800898
20275216271491.8519835843724.14801641589
21274352271778.6633597372573.33664026338
22271311272872.405552972-1561.40555297176
23289802295292.393645528-5490.39364552771
24290726293926.459101318-3200.45910131827
25292300290901.7763561281398.22364387190
26278506285882.607107438-7376.60710743768
27269826269283.338910379542.661089621193
28265861266850.516668761-989.516668760625
29269034259595.8167213139438.18327868666
30264176266632.636152248-2456.63615224784
31255198261426.245701112-6228.24570111238
32253353249155.9783061844197.0216938165
33246057247095.315829582-1038.31582958231
34235372240854.375870797-5482.3758707974
35258556250838.0469465667717.953053434
36260993258734.9384527112258.06154728914
37254663261328.739824001-6665.73982400139
38250643246790.7382275993852.26177240099
39243422242951.597210893470.402789106796
40247105241734.9497608185370.05023918199
41248541245398.1027037473142.89729625257
42245039246782.333627287-1743.33362728695
43237080243361.216796867-6281.21679686697
44237085235012.8164476242072.18355237567
45225554231524.989152044-5970.98915204394
46226839220116.7707725646722.22922743642
47247934245367.7585905982566.2414094024
48248333250006.91676132-1673.91676132006
49246969248374.219351017-1405.21935101683
50245098242719.6525052352378.34749476527
51246263239081.6870695457181.31293045534
52255765248411.7414935727353.25850642825
53264319258029.4368936886289.56310631183
54268347266603.5748882031743.42511179729
55273046271635.5055467211410.49445327930
56273963280621.827498534-6658.82749853382
57267430273977.766705942-6547.76670594158
58271993270562.7054992431430.29450075666
59292710299400.744027915-6690.74402791483
60295881297713.759841143-1832.75984114257
61293299297618.678154695-4319.67815469479


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
62290423.164376725281803.519274877299042.809478573
63284761.477897907271844.816634783297678.139161031
64285875.110741399267749.636242918304000.585239881
65284081.978579323260294.307565511307869.649593135
66279242.248772801249601.137227562308883.360318040
67275021.427668052239145.64533088310897.210005225
68273155.086456089230408.492547598315901.680364579
69266160.410812533217099.655115901315221.166509166
70266083.509562310209210.366969692322956.652154927
71287344.969085467217113.220222853357576.717948081
72289853.487633864209692.427613869370014.547653860
73289266.142055396200007.518008578378524.766102213
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128930yfzj4dsd79pyl0v/1uovk1260128879.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128930yfzj4dsd79pyl0v/1uovk1260128879.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128930yfzj4dsd79pyl0v/2qzx61260128879.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/06/t1260128930yfzj4dsd79pyl0v/2qzx61260128879.ps (open in new window)


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