Home » date » 2009 » Dec » 02 »

Workshop 9: Exponentional 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: Wed, 02 Dec 2009 10:47:44 -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/02/t1259776143r37t4zkwpvcd990.htm/, Retrieved Wed, 02 Dec 2009 18:49:07 +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/02/t1259776143r37t4zkwpvcd990.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.1 7.7 7.5 7.6 7.8 7.8 7.8 7.5 7.5 7.1 7.5 7.5 7.6 7.7 7.7 7.9 8.1 8.2 8.2 8.2 7.9 7.3 6.9 6.6 6.7 6.9 7.0 7.1 7.2 7.1 6.9 7.0 6.8 6.4 6.7 6.6 6.4 6.3 6.2 6.5 6.8 6.8 6.4 6.1 5.8 6.1 7.2 7.3 6.9 6.1 5.8 6.2 7.1 7.7 7.9 7.7 7.4 7.5 8.0 8.1
 
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
alpha1
beta0.899913987353234
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
137.67.480259655679420.119740344320576
147.77.78467255465862-0.0846725546586216
157.77.70842463477782-0.0084246347778194
167.97.92194022754802-0.0219402275480167
178.18.14557182661695-0.0455718266169516
188.28.25328008681465-0.053280086814647
198.27.877898750758270.322101249241725
208.28.128877060827370.0711229391726338
217.98.47725542963737-0.577255429637374
227.37.238006287477940.0619937125220567
236.97.51292475603305-0.61292475603305
246.66.151827895294140.448172104705860
256.76.337590384581120.362409615418879
266.96.7526933538890.147306646110998
2776.995868390528630.00413160947137303
287.17.30222370767404-0.202223707674045
297.27.25567270945402-0.0556727094540204
307.17.25623961196135-0.156239611961346
316.96.647466933630210.252533066369794
3276.655288482262680.34471151773732
336.87.30460093243933-0.504600932439332
346.46.28582328155910.114176718440899
356.76.70563966404874-0.00563966404873995
366.66.63678201396038-0.0367820139603783
376.46.58758138338824-0.18758138338824
386.36.203839842640640.0961601573593631
396.26.108391364010510.0916086359894877
406.56.266967319319870.233032680680133
416.86.81855803213871-0.0185580321387135
426.87.06518701134419-0.265187011344190
436.46.47238707388988-0.0723870738898826
446.16.002435361719570.0975646382804323
455.86.01284942528561-0.212849425285614
466.15.218842052968170.881157947031832
477.26.987082997393940.212917002606056
487.37.9258423645877-0.625842364587703
496.97.55703420929963-0.657034209299631
506.16.54700458599799-0.447004585997989
515.85.264177077742550.535822922257449
526.25.60668098476810.593319015231902
537.16.585329823991150.514670176008847
547.77.93762349963424-0.237623499634238
557.97.91563004175484-0.0156300417548421
567.78.0495831772975-0.349583177297499
577.47.80935188173757-0.409351881737571
587.56.749586080580790.750413919419208
5988.35852704878512-0.358527048785119
608.18.10831121120325-0.00831121120325129


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
618.304902834999757.619509374242798.9902962957567
628.497758053064287.017955205688989.97756090043958
638.580353884802226.1643492200135910.9963585495909
648.91068044822095.3341843146334212.4871765818084
659.295187239873774.3611308722087614.2292436075388
669.628272603472053.1974398685897116.0591053383544
679.457041414106341.7829822772108117.1311005510019
689.25106233024810.3622519891752418.1398726713210
699.37349463238458-1.0825180722575019.8295073370266
708.97444624167821-2.468655796137720.4175482794941
719.58078539597907-4.2070616434372323.3686324353954
729.6755968305694-6.6484705945609725.9996642556998
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259776143r37t4zkwpvcd990/1go641259776062.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259776143r37t4zkwpvcd990/1go641259776062.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259776143r37t4zkwpvcd990/2u2pr1259776062.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259776143r37t4zkwpvcd990/2u2pr1259776062.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259776143r37t4zkwpvcd990/321oy1259776062.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259776143r37t4zkwpvcd990/321oy1259776062.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