Home » date » 2009 » Dec » 11 »

shwws9vr1

*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, 11 Dec 2009 09:29:38 -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/11/t12605490327v8f0b5gnvb95s0.htm/, Retrieved Fri, 11 Dec 2009 17:30:35 +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/11/t12605490327v8f0b5gnvb95s0.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 «
102.1 102.86 102.99 103.73 105.02 104.43 104.63 104.93 105.87 105.66 106.76 106 107.22 107.33 107.11 108.86 107.72 107.88 108.38 107.72 108.41 109.9 111.45 112.18 113.34 113.46 114.06 115.54 116.39 115.94 116.97 115.94 115.91 116.43 116.26 116.35 117.9 117.7 117.53 117.86 117.65 116.51 115.93 115.31 115
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.781527354716212
beta0.167068730875885
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13107.22105.2672614968371.95273850316312
14107.33107.1967886149640.133211385035580
15107.11107.440213638756-0.33021363875568
16108.86109.192405401537-0.332405401537116
17107.72107.915115055254-0.195115055254206
18107.88107.939844697002-0.0598446970022053
19108.38108.726662894449-0.346662894449253
20107.72108.769652750896-1.04965275089566
21108.41108.82763777212-0.417637772119988
22109.9108.1168564990681.78314350093233
23111.45110.7717610507780.678238949221722
24112.18110.7879373960921.39206260390803
25113.34114.031755868548-0.691755868548086
26113.46113.539795156877-0.0797951568771111
27114.06113.5317606081040.528239391896165
28115.54116.209424535710-0.669424535709823
29116.39114.7218517132041.66814828679625
30115.94116.5706971202-0.630697120199969
31116.97117.156822878021-0.186822878021488
32115.94117.45387530098-1.51387530098005
33115.91117.59093443875-1.68093443874993
34116.43116.439547916341-0.0095479163409209
35116.26117.329358455594-1.06935845559369
36116.35115.7114169657340.638583034266318
37117.9117.4618017123730.438198287627401
38117.7117.6340260345620.065973965438431
39117.53117.541630755777-0.0116307557772899
40117.86119.185354590308-1.32535459030792
41117.65117.1970422387270.452957761272913
42116.51116.959900913531-0.449900913531437
43115.93117.182351202069-1.25235120206877
44115.31115.617201985121-0.307201985120514
45115116.066295343314-1.06629534331367


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
46115.251016111138113.455650371297117.046381850979
47115.403023555089112.969626583469117.836420526709
48114.630344496376111.569387770653117.691301222099
49115.369038253103111.631510919358119.106565586847
50114.620191651546110.223876054895119.016507248197
51113.955922364756108.878998151014119.032846578499
52114.768465675007108.922918655949120.614012694064
53113.878539692984107.319242628010120.437836757959
54112.721572721518105.447905409429119.995240033607
55112.767700492496104.684804747219120.850596237773
56112.219088527184103.344746399564121.093430654804
57112.58614874971999.5228850780697125.649412421368
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605490327v8f0b5gnvb95s0/1b4r81260548975.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605490327v8f0b5gnvb95s0/1b4r81260548975.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t12605490327v8f0b5gnvb95s0/2vurg1260548975.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t12605490327v8f0b5gnvb95s0/2vurg1260548975.ps (open in new window)


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