Home » date » 2010 » Dec » 09 »

workshop 8- exponential 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: Thu, 09 Dec 2010 12:09:50 +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/Dec/09/t12918965103d3moa3y9ni1ir9.htm/, Retrieved Thu, 09 Dec 2010 13:08: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/2010/Dec/09/t12918965103d3moa3y9ni1ir9.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
9700 9081 9084 9743 8587 9731 9563 9998 9437 10038 9918 9252 9737 9035 9133 9487 8700 9627 8947 9283 8829 9947 9628 9318 9605 8640 9214 9567 8547 9185 9470 9123 9278 10170 9434 9655 9429 8739 9552 9687 9019 9672 9206 9069 9788 10312 10105 9863 9656 9295 9946 9701 9049 10190 9706 9765 9893 9994 10433 10073 10112 9266 9820 10097 9115 10411 9678 10408 10153 10368 10581 10597 10680 9738 9556
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.158806071444759
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
290819700-619
390849601.6990417757-517.699041775693
497439519.48529076058223.51470923942
585879554.980783645-967.980783645009
697319401.25955816033329.740441839675
795639453.62434232534109.375657674656
899989470.99386083234527.006139167657
994379554.68563542083-117.685635420828
10100389535.99644199417502.003558005834
1199189615.71765489236302.282345107637
1292529663.72192658602-411.721926586017
1397379598.33798489722138.662015102776
1490359620.3583547743-585.358354774309
1591339527.39989406523-394.399894065233
1694879464.766796310522.2332036894968
1787009468.29756404406-768.297564044064
1896279346.28724619765280.712753802352
1989479390.86613583344-443.866135833439
2092839320.37749855436-37.3774985543641
2188299314.44172484851-485.441724848513
2299479237.35063160995709.649368390048
2396289350.04725990723277.952740092771
2493189394.18784260867-76.1878426086678
2596059382.08875063213222.911249367866
2686409417.48841042509-777.488410425089
2792149294.01853037165-80.0185303716498
2895679281.31110192054285.688898079456
2985479326.68023347992-779.680233479925
3091859202.86227861785-17.8622786178457
3194709200.02564032349269.974359676507
3291239242.89920777453-119.899207774533
3392789223.8584856185254.1415143814793
34101709232.45648681951937.543513180486
3594349381.3440889562252.6559110437756
3696559389.70616732743265.293832672569
3794299431.83643867268-2.83643867268438
3887399431.38599499018-692.385994990182
3995529321.43089520242230.569104797580
4096879358.04666893186328.953331068142
4190199410.28645512746-391.286455127456
4296729348.14779037912323.852209620882
4392069399.57748751772-193.577487517716
4490699368.83620720488-299.83620720488
4597889321.22039706178466.779602938224
46103129395.34783203494916.65216796506
47101059540.9177617108564.082238289207
4898639630.49744594527232.502554054732
4996569667.42026315557-11.4202631555727
5092959665.60665602897-370.606656028971
5199469606.75206893373339.247931066269
5297019660.6267001121340.3732998878731
5390499667.03822525858-618.03822525858
54101909568.89000270257621.109997297426
5597069667.5260413084438.4739586915566
5697659673.6359395411891.3640604588218
5798939688.14510705388204.854892946116
5899949720.6773078189273.322692181107
59104339764.08261080088668.917389199121
60100739870.31075350068202.689246499323
61101129902.49903646133209.500963538667
6292669935.7690614448-669.7690614448
6398209829.4056680215-9.40566802150715
64100979827.9119908337269.088009166302
6591159870.64480044229-755.644800442289
66104119750.64381827639660.356181723611
6796789855.51238925018-177.512389250178
68104089827.32234408059580.677655919415
69101539919.5374813929233.462518607103
70103689956.6127468025411.38725319751
711058110021.9435403252559.056459674764
721059710110.725100402486.274899598
731068010187.9485068494492.051493150648
74973810266.0892714251-528.089271425135
75955610182.2254888580-626.225488857985


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7610082.77707913399200.1100086337510965.444149634
7710082.77707913399189.0491583453910976.5049999224
7810082.77707913399178.1235347045410987.4306235632
7910082.77707913399167.3282960224510998.2258622453
8010082.77707913399156.6588828155911008.8952754522
8110082.77707913399146.1109953006511019.4431629671
8210082.77707913399135.6805731456411029.8735851221
8310082.77707913399125.3637772068811040.1903810609
8410082.77707913399115.1569730186711050.3971852491
8510082.77707913399105.056715834611060.4974424331
8610082.77707913399095.0597370457211070.4944212220
8710082.77707913399085.1629318237411080.391226444
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/11wlh1291896542.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/11wlh1291896542.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/2cok21291896542.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/2cok21291896542.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/3mxjn1291896542.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12918965103d3moa3y9ni1ir9/3mxjn1291896542.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