Home » date » 2010 » Jun » 05 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 05 Jun 2010 08:52:21 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jun/05/t1275728007unef2paqqzb9lyu.htm/, Retrieved Sat, 05 Jun 2010 10:53:31 +0200
 
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/2010/Jun/05/t1275728007unef2paqqzb9lyu.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2 2.4 1.5 1.2 1.5 0.6 2.7 3.7 4.9 6.6 7.4 7.2 5.3 4.7 6.1 6.6 7 7.5 6.6 7.8 4.7 5.4 4.3 4.5 5.8 4.6 5.2 3.6 4.8 6.7 6.3 4.8 8.7 6.8 7.4 9 7.9 9.1 8.7 9.8 6.4 6.1 4.7 4.8 4.2 2.8 6.1 5.8 4.9 4.6 4.1 3.6 5.9 4.5 4.8 5.7 5 7 4.6 2.6 5 4.1 3.2 0 2.3 3.8 4.5 5.9 5 4.2 4.5 6
 
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.694939004311082
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
22.420.4
31.52.27797560172443-0.777975601724433
41.21.73733001168374-0.53733001168374
51.51.363918428377780.136081571622221
60.61.45848682026601-0.858486820266013
72.70.8618908441761631.83810915582384
83.72.139264590739461.56073540926054
94.93.223880502044031.67611949795597
106.64.388681317059942.21131868294006
117.45.92541292079681.4745870792032
127.26.950160997388260.249839002611741
135.37.12378386510134-1.82378386510134
144.75.8563653218092-1.15636532180920
156.15.052761956451251.04723804354875
166.65.78052851971170.819471480288296
1776.350011214284580.64998878571542
187.56.801713773843020.698286226156977
196.67.2869801085727-0.686980108572696
207.86.809570835939670.990429164060333
214.77.49785869305241-2.79785869305241
225.45.55351755869946-0.153517558699463
234.35.44683221931259-1.14683221931259
244.54.64985377871163-0.149853778711630
255.84.545714542941521.25428545705848
264.65.41736642959161-0.81736642959161
275.24.849346616853910.350653383146089
283.65.09302932979577-1.49302932979577
294.84.055465013940250.744534986059746
306.74.572871415827382.12712858417262
316.36.051096036153940.248903963846057
324.86.2240691089582-1.42406910895820
338.75.234427940308623.46557205969138
346.87.64278913683885-0.842789136838854
357.47.057102093239860.342897906760136
3697.29539522314411.70460477685589
377.98.47999156951626-0.579991569516256
389.18.07693280568781.02306719431219
398.78.78790210304646-0.0879021030464564
409.88.72681550307851.0731844969215
416.49.47261326881122-3.07261326881122
426.17.33733446315053-1.23733446315053
434.76.47746248332891-1.77746248332891
444.85.24223447496401-0.442234474964015
454.24.93490848926049-0.734908489260488
462.84.42419191547404-1.62419191547404
476.13.29547760292442.8045223970756
485.85.244449605116250.555550394883752
494.95.63052324338139-0.73052324338139
504.65.12285414799983-0.522854147999825
514.14.75950240698891-0.659502406988908
523.64.30118846093527-0.701188460935274
535.93.813905250058492.08609474994151
544.55.26361385848142-0.763613858481420
554.84.73294880399020.0670511960098015
565.74.779545295383120.920454704616883
5755.41920517132302-0.419205171323025
5875.127883146961741.87211685303826
594.66.42889016876615-1.82889016876615
602.65.15792305588947-2.55792305588947
6153.380322554325281.61967744567472
624.14.50589958572759-0.405899585727588
633.24.22382413177178-1.02382413177178
6403.51232880904864-3.51232880904864
652.31.071474523675251.22852547632475
663.81.925224794963171.87477520503683
674.53.228079209258571.27192079074143
685.94.111986577138981.78801342286102
6955.35454684491687-0.354546844916869
704.25.1081584135287-0.908158413528704
714.54.477043709874330.0229562901256655
7264.492996931276941.50700306872306


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
735.540272143349092.75633132937198.32421295732628
745.540272143349092.150099460858748.93044482583943
755.540272143349091.636912669962159.44363161673603
765.540272143349091.183764420429809.89677986626837
775.540272143349090.7735013389961910.3070429477020
785.540272143349090.39585300581694210.6846912808812
795.540272143349090.044092322420484111.0364519642777
805.54027214334909-0.28647111385373711.3670154005519
815.54027214334909-0.59926215061282411.679806437311
825.54027214334909-0.89687207657562911.9774163632738
835.54027214334909-1.1813177035164612.2618619902146
845.54027214334909-1.4542052803661212.5347495670643
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275728007unef2paqqzb9lyu/1d2o11275727939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275728007unef2paqqzb9lyu/1d2o11275727939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/05/t1275728007unef2paqqzb9lyu/2d2o11275727939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275728007unef2paqqzb9lyu/2d2o11275727939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/05/t1275728007unef2paqqzb9lyu/35t641275727939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275728007unef2paqqzb9lyu/35t641275727939.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
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=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
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