Home » date » 2009 » May » 28 »

Maxime Jonckheere-Exponential Smoothing 2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 27 May 2009 16:07:59 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/May/28/t1243462120n5nev5knzrzdva7.htm/, Retrieved Thu, 28 May 2009 00:08:40 +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/2009/May/28/t1243462120n5nev5knzrzdva7.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 «
66,2 66,2 66,2 66,08 66,31 66,39 66,37 66,23 66,27 66,27 66,27 66,28 66,28 66,28 66,26 66,13 65,86 65,9 65,94 65,94 65,91 65,95 65,91 66,08 66,47 66,47 66,56 66,78 67,08 67,28 67,27 67,27 67,26 67,37 67,5 67,63 67,64 67,64 67,71 67,87 67,93 68,33 68,39 68,39 68,58 68,44 68,49 68,52 68,54 68,54 68,54 68,62 68,75 68,71 68,72 68,72 68,72 68,92 68,9 69,12 69,09 69,09 69,1 69,16 68,83 68,52 68,53 68,53 68,51 68,38 68,44 68,41 68,42 68,42 68,45 68,63 68,84 68,72 68,37 68,37 68,47 68,69 68,46 68,17 68,17
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0985808158232413
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
366.266.20
466.0866.2-0.120000000000005
566.3166.06817030210120.241829697898794
666.3966.32201007101040.0679899289896326
766.3766.4087125736779-0.0387125736779268
866.2366.3848962565821-0.154896256582134
966.2766.22962645724030.0403735427596814
1066.2766.2736065140232-0.00360651402323242
1166.2766.2732509809285-0.00325098092854148
1266.2866.27293049657640.00706950342362234
1366.2866.2836274139913-0.00362741399133881
1466.2866.2832698205607-0.00326982056074598
1566.2666.2829474789823-0.0229474789822746
1666.1366.2606852977831-0.130685297783131
1765.8666.1178022345115-0.257802234511544
1865.965.82238787991240.0776121200876503
1965.9465.87003894602840.0699610539716247
2065.9465.91693576380470.0230642361952675
2165.9165.9192094550252-0.0092094550252142
2265.9565.88830157943550.0616984205644684
2365.9165.9343838600698-0.0243838600697899
2466.0865.89198007925120.188019920748815
2566.4766.08051523642960.38948476357038
2666.4766.5089109621731-0.0389109621731194
2766.5666.50507508777760.0549249122223756
2866.7866.60048963043350.179510369566472
2967.0866.83818590911410.241814090885882
3067.2867.16202413947120.117975860528801
3167.2767.3736542960496-0.103654296049584
3267.2767.3534359709814-0.0834359709814265
3367.2667.3452107848931-0.0852107848930643
3467.3767.32681063620140.0431893637986178
3567.567.44106827891950.0589317210804552
3667.6367.57687781606150.0531221839384841
3767.6467.7121146442925-0.0721146442924834
3867.6467.7150055238253-0.0750055238253253
3967.7167.70761141809540.00238858190461144
4067.8767.77784688644820.0921531135518165
4167.9367.9469314155628-0.0169314155627802
4268.3368.00526230280360.324737697196426
4368.3968.4372752099218-0.0472752099217502
4468.3968.4926147811594-0.102614781159446
4568.5868.48249893231720.0975010676827708
4668.4468.682110667113-0.242110667113025
4768.4968.5182432000295-0.0282432000295216
4868.5268.5654589623291-0.0454589623291497
4968.5468.5909775807363-0.0509775807362587
5068.5468.6059521692386-0.0659521692385852
5168.5468.5994505505897-0.0594505505897303
5268.6268.59358986681150.0264101331885342
5368.7568.67619339928720.073806600712814
5468.7168.8134693141986-0.103469314198605
5568.7268.7632692247922-0.0432692247922262
5668.7268.7690037093122-0.0490037093121742
5768.7268.7641728836698-0.0441728836698161
5868.9268.75981828476040.160181715239631
5968.968.9756091289287-0.0756091289286616
6069.1268.94815551931520.171844480684811
6169.0969.1850960884158-0.0950960884158292
6269.0969.1457214384382-0.0557214384381837
6369.169.1402283735781-0.0402283735781168
6469.1669.14626262769150.0137373723084693
6568.8369.207616869061-0.377616869060972
6668.5268.8403910900403-0.320391090040332
6768.5368.49880667500160.0311933249983554
6868.5368.51188173842820.0181182615717717
6968.5168.5136678514353-0.00366785143526727
7068.3868.4933062716485-0.113306271648469
7168.4468.35213644695150.0878635530485354
7268.4168.4207981076921-0.0107981076921249
7368.4268.38973362142650.0302663785735149
7468.4268.40271730571830.0172826942817181
7568.4568.40442104782020.0455789521798096
7668.6368.43891425811040.191085741889552
7768.8468.63775164643810.202248353561899
7868.7268.8676894541312-0.147689454131154
7968.3768.7331301072544-0.363130107254406
8068.3768.34733244503130.0226675549687059
8168.4768.34956703109280.120432968907167
8268.6968.46143941141970.228560588580294
8368.4668.703971100707-0.243971100707
8468.1768.449920230562-0.279920230561999
8568.1768.13232546586780.037674534132222


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8668.136039452178367.865874176509568.4062047278471
8768.102078904356667.700732968957668.5034248397555
8868.068118356534967.552670496418568.5835662166512
8968.034157808713167.41107536510368.6572402523233
9068.000197260891467.272094994436168.7282995273468
9167.966236713069767.133885417887568.798588008252
9267.93227616524866.995431630918168.8691206995779
9367.898315617426366.856126304201368.9405049306513
9467.864355069604666.715586174949369.0131239642599
9567.830394521782966.573560979450569.0872280641152
9667.796433973961266.429883956779669.1629839911427
9767.762473426139566.284443044937769.2405038073412
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243462120n5nev5knzrzdva7/1096o1243462074.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243462120n5nev5knzrzdva7/1096o1243462074.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243462120n5nev5knzrzdva7/270ps1243462074.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243462120n5nev5knzrzdva7/270ps1243462074.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243462120n5nev5knzrzdva7/3vsbh1243462074.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/28/t1243462120n5nev5knzrzdva7/3vsbh1243462074.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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