Home » date » 2009 » Dec » 04 »

WS 9.10

*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 08:03:34 -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/t12599390808btzk0w3sp0tv99.htm/, Retrieved Fri, 04 Dec 2009 16:04: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/04/t12599390808btzk0w3sp0tv99.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 «
95.1 97.0 112.7 102.9 97.4 111.4 87.4 96.8 114.1 110.3 103.9 101.6 94.6 95.9 104.7 102.8 98.1 113.9 80.9 95.7 113.2 105.9 108.8 102.3 99.0 100.7 115.5 100.7 109.9 114.6 85.4 100.5 114.8 116.5 112.9 102.0 106.0 105.3 118.8 106.1 109.3 117.2 92.5 104.2 112.5 122.4 113.3 100.0 110.7 112.8 109.8 117.3 109.1 115.9 96.0 99.8 116.8 115.7 99.4 94.3
 
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.149518688899873
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1394.694.919856849353-0.319856849352945
1495.996.3617041743281-0.461704174328105
15104.7105.090201458249-0.390201458249422
16102.8103.228104975216-0.428104975216129
1798.198.3098622055097-0.209862205509722
18113.9113.708693266720.191306733280030
1980.986.186058175999-5.28605817599895
2095.794.52740952043021.17259047956985
21113.2111.9073542750411.29264572495933
22105.9108.595572393490-2.69557239349042
23108.8101.7663113665487.0336886334517
24102.3100.2898019165552.01019808344506
259993.4322302979965.56776970200396
26100.795.6282129934955.07178700650498
27115.5105.29027100168610.2097289983143
28100.7104.945952689777-4.2459526897772
29109.999.57551896353410.3244810364659
30114.6117.380159869492-2.78015986949163
3185.483.84813894430581.55186105569418
32100.599.28236144160821.21763855839184
33114.8117.455317038801-2.6553170388012
34116.5109.9218033656376.57819663436301
35112.9112.7831568564690.116843143531099
36102105.749217937900-3.74921793790038
37106100.8997908785175.10020912148258
38105.3102.5977153713572.70228462864254
39118.8116.4547596177932.34524038220671
40106.1102.4592780558133.64072194418722
41109.3110.700874128831-1.40087412883109
42117.2115.6269018078801.5730981921198
4392.586.10334727243476.39665272756531
44104.2102.2679748635191.93202513648102
45112.5117.549583435051-5.04958343505081
46122.4117.4753247437494.92467525625108
47113.3114.542942131052-1.24294213105208
48100103.868557811495-3.86855781149458
49110.7106.5371124152014.16288758479921
50112.8106.0356394346076.76436056539315
51109.8120.410727400431-10.6107274004306
52117.3105.56082638985411.7391736101455
53109.1110.763744612496-1.66374461249593
54115.9118.263731328191-2.36373132819064
559692.03890674130263.96109325869742
5699.8104.054004442563-4.25400444256285
57116.8112.3764768516704.42352314833039
58115.7122.219811614452-6.51981161445212
5999.4112.412014768593-13.0120147685929
6094.398.0422085770475-3.74220857704752


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
61107.28332410770697.392467790993117.17418042442
62108.28169339963198.2785808314555118.284805967807
63106.80408190988396.6976633658894116.910500453877
64112.229636447467101.981675390702122.477597504231
65104.61367513230594.3181698332825114.909180431328
66111.461710351872100.992108041063121.931312662682
6791.729288570586781.3700653732765102.088511767897
6895.941646717166285.4236820238656106.459611410467
69111.622270349227100.752042590325122.492498108128
70111.454141710823100.484419359337122.423864062309
7197.43441971684386.6295328862718108.239306547414
7292.963626289401917.9729655925062167.954286986298
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599390808btzk0w3sp0tv99/1kb0s1259939012.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599390808btzk0w3sp0tv99/1kb0s1259939012.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599390808btzk0w3sp0tv99/2xud31259939012.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599390808btzk0w3sp0tv99/2xud31259939012.ps (open in new window)


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