Home » date » 2010 » Dec » 10 »

Workshop 8 (Triple Smoothing model)

*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: Fri, 10 Dec 2010 15:51:42 +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/10/t1291996240g3bu39mppisxvs0.htm/, Retrieved Fri, 10 Dec 2010 16:50:40 +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/10/t1291996240g3bu39mppisxvs0.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 «
37 30 47 35 30 43 82 40 47 19 52 136 80 42 54 66 81 63 137 72 107 58 36 52 79 77 54 84 48 96 83 66 61 53 30 74 69 59 42 65 70 100 63 105 82 81 75 102 121 98 76 77 63 37 35 23 40 29 37 51 20 28 13 22 25 13 16 13 16 17 9 17 25 14 8 7 10 7 10 3
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.350759329200033
beta0
gamma0.714202236422672


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
138063.354166666666716.6458333333333
144227.567848000642214.4321519993578
155440.796726621516613.2032733784834
166653.30289793499812.6971020650019
178171.79819160476919.20180839523086
186361.19247841157421.80752158842579
19137103.36815013811233.6318498618883
207270.87316856875721.12683143124282
2110777.476748539034829.5232514609652
225858.2489710839535-0.248971083953485
233687.744975486889-51.7449754868891
2452150.636609262302-98.6366092623024
257964.632390490192514.3676095098075
267727.020503572152149.9794964278479
275452.14812720988141.85187279011862
288460.437982726941123.5620172730589
294881.1235170544008-33.1235170544008
309652.243150614895943.7568493851041
3183123.889535798133-40.8895357981334
326650.183258972315815.8167410276842
336175.1065733346721-14.1065733346721
345326.770171561345726.2298284386543
353041.6757239761287-11.6757239761287
367496.8788802384768-22.8788802384768
376989.8462205932832-20.8462205932832
385956.39559943511442.6044005648856
394242.5897098574903-0.589709857490305
406560.08991568709224.91008431290784
417047.948643911602222.0513560883978
4210074.06996988945925.9300301105410
4363100.213822431864-37.2138224318639
4410554.090921041499250.9090789585008
458277.44808444197034.55191555802971
468154.359873127662526.6401268723375
477551.832948580939923.1670514190601
48102114.062751486308-12.0627514863078
49121111.7664721076529.23352789234812
509899.7404016861067-1.74040168610671
517682.9294578735977-6.92945787359767
5277100.756132765662-23.756132765662
536386.5081394689932-23.5081394689932
543798.447546364477-61.447546364477
553564.6637801729412-29.6637801729412
562362.0507588180824-39.0507588180824
574032.35835667857957.64164332142052
582920.59595988971798.40404011028209
593710.062130416276026.937869583724
605157.2789059931065-6.2789059931065
612066.886217830153-46.886217830153
622830.0871310857474-2.08713108574736
631310.74845970548502.25154029451503
642223.9931089624076-1.99310896240757
652517.49369109455817.50630890544188
661322.7196141774821-9.7196141774821
671621.8176899622591-5.81768996225912
681323.2162671673847-10.2162671673847
691625.2885917259022-9.28859172590225
70177.941272159293639.05872784070637
7196.231015947071022.76898405292898
721729.5680713779749-12.5680713779749
732518.1402303180596.85976968194101
741420.9659000638613-6.96590006386126
7581.927749746500056.07225025349995
76714.5443509061419-7.54435090614195
771010.5025600306134-0.502560030613406
7874.931824174008262.06817582599174
79109.973857153196110.0261428468038893
80311.3826407570439-8.38264075704385


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8114.5282799120459-35.328702063670764.3852618877625
828.94647336236186-43.888570452420261.7815171771439
831.14229796745304-54.511678153691756.7962740885977
8416.3964803808856-41.940371276329874.733332038101
8518.38548650175-42.516167535385679.2871405388856
8612.3942151340628-50.968507879093575.7569381472191
871.8450679459928-63.886643357037967.5767792490235
886.01790061131881-62.000340133410774.0361413560483
897.887563147406-62.342802629734878.1179289245468
903.68512720612633-68.689781984656176.0600363969087
917.05485970586599-67.402850999990481.5125704117224
924.5554118324795-71.92840270850781.039226373466
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996240g3bu39mppisxvs0/11b0y1291996298.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996240g3bu39mppisxvs0/11b0y1291996298.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996240g3bu39mppisxvs0/2ckz11291996298.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996240g3bu39mppisxvs0/2ckz11291996298.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996240g3bu39mppisxvs0/3ckz11291996298.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291996240g3bu39mppisxvs0/3ckz11291996298.ps (open in new window)


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