Home » date » 2011 » Jan » 16 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Jan 2011 14:33:13 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/16/t12951882871jkol4kv3wyjtl7.htm/, Retrieved Sun, 16 Jan 2011 15:31:28 +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/2011/Jan/16/t12951882871jkol4kv3wyjtl7.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
10574 10653 10805 10872 10625 10407 10463 10556 10646 10702 11353 11346 11451 11964 12574 13031 13812 14544 14931 14886 16005 17064 15168 16050 15839 15137 14954 15648 15305 15579 16348 15928 16171 15937 15713 15594 15683 16438 17032 17696 17745 19394 20148 20108 18584 18441 18391 19178 18073 18483 19644 19195 19650 20830 23595 22937 21814 21928 21777 21383 21467 22052 22680 24320 24977 25204 27390 26434 27525 30695 32436 30160 30236
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0233158672621605
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3108051073273
41087210885.7020583101-13.7020583101385
51062510952.3825829374-327.38258293736
61040710697.7493740896-290.74937408965
71046310472.9703002768-9.9703002768183
81055610528.73783407927.2621659209999
91064610622.373475120923.626524879106
101070210712.9243480388-10.9243480388413
111135310768.66963739584.330362609959
121134611433.2938065619-87.2938065619055
131145111424.258475755326.7415242447005
141196411529.881977585434.118022415023
151257412053.0038157717520.996184228283
161303112675.1512936473355.848706352725
171381213140.44821485671.551785149992
181454413937.1060271322606.893972867769
191493114683.2562864458247.743713554179
201488615076.0326459861-190.032645986086
211600515026.6018700368978.398129963203
221706416168.4140709646895.585929035435
231516817248.2954336078-2080.29543360781
241605015303.7915414117746.208458588264
251583916203.1900387821-364.190038782081
261513715983.6986321796-846.698632179638
271495415261.9571192607-307.957119260684
281564815071.7768319456576.223168054436
291530515779.2119748453-474.211974845302
301557915425.1553113857153.844688614317
311634815702.7423337244645.257666275596
321592816486.7870758212-558.787075821176
331617116053.7584705335117.241529466481
341593716299.4920584722-362.492058472171
351571316057.0402417532-344.040241753248
361559415825.0186451437-231.018645143688
371568315700.6322450784-17.6322450784319
381643815789.2211339927648.778866007349
391703216559.347975915472.652024085026
401769617164.3682677697531.631732230271
411774517840.7637226708-95.763722670763
421939417887.53090842441506.46909157556
432014819571.6555417982576.344458201835
442010820339.0935126829-231.093512682881
451858420293.705367016-1709.70536701602
461844118729.8421036213-288.842103621271
471839118580.1074994735-189.107499473514
481917818525.6982941175652.301705882488
491807319327.9072741067-1254.90727410675
501848318193.6480226774289.351977322644
511964418610.39451497271033.60548502735
521919519795.493923263-600.493923262991
531965019332.4928866565317.507113343541
542083019794.8958403661035.10415963403
552359520999.03019155452595.96980844549
562293723824.5574790248-887.557479024796
572181423145.8633066563-1331.86330665632
582192821991.809758587-63.8097585869764
592177722104.3219787257-327.321978725733
602138321945.6901829178-562.690182917773
612146721538.5705733031-71.5705733031427
622205221620.9018433161431.098156683871
632268022215.9532707143464.046729285667
642432022854.77292265781465.2270773422
652497724528.935962702448.064037297969
662520425196.38296432067.61703567938093
672739025423.56056211341966.43943788655
682643427655.4098030263-1221.40980302629
692752526670.9315741862854.06842581377
703069527781.84492023532913.1550797647
713243631019.76765738921416.23234261081
723016032793.7883427019-2633.78834270188
733023630456.3792833068-220.379283306815


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7430527.240949189928751.394715553632303.0871828262
7530818.481898379828277.609345982733359.3544507769
7631109.722847569727961.606067732234257.8396274072
7731400.963796759627723.889354365335078.0382391539
7831692.204745949527534.059278646835850.3502132522
7931983.445695139427376.715847406236590.1755428727
8032274.686644329327242.82180546237306.5514831967
8132565.927593519227126.560521825238005.2946652133
8232857.168542709127023.941317966738690.3957674516
8333148.40949189926932.094690133439364.7242936647
8433439.65044108926848.881705073940030.419177104
8533730.891390278926772.661937328640689.1208432291
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t12951882871jkol4kv3wyjtl7/1u9yo1295188389.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12951882871jkol4kv3wyjtl7/1u9yo1295188389.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t12951882871jkol4kv3wyjtl7/2m2531295188389.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12951882871jkol4kv3wyjtl7/2m2531295188389.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t12951882871jkol4kv3wyjtl7/3mio41295188389.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t12951882871jkol4kv3wyjtl7/3mio41295188389.ps (open in new window)


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