Home » date » 2009 » Dec » 11 »

Experimental 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: Fri, 11 Dec 2009 09:09:28 -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/t1260547842x4g7q2wengswca0.htm/, Retrieved Fri, 11 Dec 2009 17:10:46 +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/t1260547842x4g7q2wengswca0.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 «
8.3 8.2 8 7.9 7.6 7.6 8.3 8.4 8.4 8.4 8.4 8.6 8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8 8.2 8.1 8.1 8 7.9 7.9 8 8 7.9 8 7.7 7.2 7.5 7.3 7 7 7 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9
 
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
alpha1
beta0.00352340646797870
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
138.98.9503140766282-0.0503140766281973
148.88.757959327267920.0420406727320852
158.38.244316094831130.0556839051688698
167.57.472424420550620.0275755794493833
177.27.21280290290433-0.0128029029043333
187.47.43515757080091-0.0351575708009104
198.88.525842027480930.274157972519067
209.38.872318873525670.427681126474331
219.39.279597586173770.0204024138262309
228.79.32643992965158-0.626439929651577
238.28.75478518261489-0.554785182614888
248.38.43891041178834-0.138910411788343
258.58.59475462049406-0.094754620494058
268.68.362991115487830.237008884512170
278.58.055914760946220.444085239053775
288.27.651996457042960.548003542957042
298.17.886155383552020.213844616447984
307.98.36500928681314-0.465009286813141
318.69.1018164327324-0.501816432732401
328.78.669593132450350.0304068675496527
338.78.679383246873880.0206167531261219
348.58.72320812946758-0.223208129467581
358.48.55246176408234-0.152461764082336
368.58.64419427175929-0.144194271759291
378.78.80129428351827-0.101294283518273
388.78.559210007762760.140789992237234
398.68.148936960138460.451063039861536
408.57.741438411716860.758561588283137
418.38.174357348412970.125642651587032
4288.57110904648884-0.571109046488839
438.29.21638133958279-1.01638133958279
448.18.26501134402285-0.165011344022849
458.18.079206822257260.0207931777427444
4688.12001412938259-0.120014129382588
477.98.047902750705-0.147902750704992
487.98.12814290430106-0.228142904301055
4988.17832367553149-0.178323675531486
5087.86874719452720.131252805472799
517.97.491607399373990.40839260062601
5287.109818330124760.890181669875243
537.77.692309190794510.00769080920548859
547.27.95013065469094-0.750130654690939
557.58.29281845025857-0.792818450258565
567.37.55771594955604-0.257715949556043
5777.27936065334012-0.279360653340116
5877.01493489161981-0.0149348916198146
5977.0396898750571-0.0396898750571033
607.27.20002038019794-2.03801979425933e-05
617.37.45181192963172-0.151811929631722
627.17.17843657501434-0.0784365750143401
636.86.646814668082130.153185331917874
646.46.117761617845420.282238382154585
656.16.15119200601735-0.0511920060173523
666.56.295340942525540.204659057474462
677.77.484795640886050.215204359113954
687.97.759112708465980.140887291534019
697.57.87825668532496-0.378256685324959
706.97.51644954893393-0.616449548933926
716.66.93842614275394-0.338426142753939
726.96.787288075495040.112711924504959


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
737.140199201947426.43866414456977.84173425932513
747.020478209794666.035637317038558.00531910255077
756.571746830253055.411765447468767.73172821303735
765.911587180570254.652438895329767.17073546581075
775.680493558113274.279737580391457.08124953583509
785.861182252188764.25193040145197.47043410292563
796.747395750517954.762881256877018.73191024415889
806.797045338112964.674540198952988.91955047727293
816.775987057862484.542683640071119.00929047565385
826.789097961123384.439720617376829.13847530486994
836.826270320877834.35744818949799.29509245225776
847.02004704166552-71.240119692433985.2802137757649
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260547842x4g7q2wengswca0/1egkz1260547766.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260547842x4g7q2wengswca0/1egkz1260547766.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260547842x4g7q2wengswca0/27n4e1260547766.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260547842x4g7q2wengswca0/27n4e1260547766.ps (open in new window)


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