Home » date » 2011 » May » 20 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 20 May 2011 01:59:07 +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/May/20/t1305856500av3rvfhfxhdgoei.htm/, Retrieved Fri, 20 May 2011 03:55:00 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
90 51 47 59 54 79 59 80 46 62 55 77 72 72 71 50 66 78 59 52 71 98 70 84 90 98 98 78 59 0 58 55 62 80 91 86 61 49 61 56 73 85 82 32 39 30 51 48 57 59 32 56 54 74 62 78 72 48 59 61 80 69 58 63 27 23 34 45 51 51 73 37 35 66 54 30 66 61 37 55 64 53 63 70 72 52 53 50 60 73 66 78
 
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.439852181310189
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
25190-39
34772.8457649289026-25.8457649289026
45961.4774488472944-2.47744884729442
55460.3877375677276-6.38773756772756
67957.578077264925521.4219227350745
75967.0005567078064-8.00055670780638
88063.481494388181916.5185056118181
94670.7471951135247-24.7471951135247
106259.8620873615322.137912638468
115560.8024528990128-5.80245289901277
127758.250231334432418.7497686655676
137266.49735798104375.50264201895628
147268.91770707605073.08229292394925
157170.27346034208680.726539657913207
165070.5930303954283-20.5930303954283
176661.53514105621214.46485894378788
187863.499019001879514.5009809981205
195969.8773071250404-10.8773071250404
205265.0928998593105-13.0928998593105
217159.333959296516911.6660407034831
229864.465292747197433.5347072528026
237079.2156068819412-9.21560688194124
248475.16210209282228.8378979071778
259079.049470765491110.9505292345089
269883.866084935790814.1339150642092
279890.08291830723627.91708169276382
287893.5652639594093-15.5652639594093
295986.7188486541942-27.7188486541942
30074.5266526102399-74.5266526102399
315841.745941893879216.2540581061208
325548.8953248069996.10467519300101
336251.580479506830710.4195204931693
348056.163528323957423.8364716760426
359166.648052385403324.3519476145967
368677.35930966283518.6406903371649
376181.159936155663-20.159936155663
384972.2925442625205-23.2925442625205
396162.0472678603867-1.04726786038671
405661.5866248075796-5.58662480757956
417359.129335699804113.8706643001959
428565.230377648466619.7696223515334
438273.92608916346728.07391083653276
443277.4774164566201-45.4774164566201
453957.4740756278239-18.4740756278239
463049.3482131652361-19.3482131652361
475140.837859400052510.1621405999475
484845.30769910972022.69230089027975
495746.491913529053210.5080864709468
505951.11391828469527.88608171530479
513254.5826285291624-22.5826285291624
525644.649610110892611.3503898891074
535449.64210386233764.35789613766238
547451.558933984411722.4410660155883
556261.42968582229410.570314177705853
567861.680539757390216.3194602426098
577268.8586899429073.14131005709298
584870.240402023691-22.240402023691
595960.457912680355-1.45791268035497
606159.8166466077411.18335339225894
618060.33714717858719.662852821413
626968.98589588286670.0141041171333001
635868.9920996095532-10.9920996095532
646364.1572006191124-1.15720061911237
652763.6482034025823-36.6482034025823
662347.528411194857-24.528411194857
673436.7395360267259-2.73953602672587
684535.53454512959279.46545487040735
695139.697946101434511.3020538985655
705144.66917916200396.33082083799615
717347.453804517080525.5461954829195
723758.6903543244191-21.6903543244191
733549.1498046614325-14.1498046614325
746642.925982215988323.0740177840117
755453.0751392698760.924860730124045
763053.4819412794292-23.4819412794292
776643.153358186274522.8466418137255
786153.20250342365427.79749657634578
793756.6322493015186-19.6322493015186
805547.99696162222027.00303837777977
816451.077263328485612.9227366715144
825356.7613572419484-3.7613572419484
836355.10691605439057.89308394560948
847058.578706245131311.4212937548687
857263.60238721659478.39761278340527
865267.2960955171739-15.2960955171739
875360.5680745384159-7.56807453841594
885057.2392404443756-7.23924044437558
896054.0550447438885.94495525611196
907356.669946281080416.3300537189196
916663.85275603025972.14724396974027
927864.797225974155113.2027740258449


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
9370.604494928768535.3862506134328105.822739244104
9470.604494928768532.129954177741109.079035679796
9570.604494928768529.128527919544112.080461937993
9670.604494928768526.3301073813604114.878882476177
9770.604494928768523.6983445213232117.510645336214
9870.604494928768521.2065951819808120.002394675556
9970.604494928768518.8346383253212122.374351532216
10070.604494928768516.5666969898323124.642292867705
10170.604494928768514.3901803866779126.818809470859
10270.604494928768512.2948498193623128.914140038175
10370.604494928768510.2722459558295130.936743901708
10470.60449492876858.31528382860682132.89370602893
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/20/t1305856500av3rvfhfxhdgoei/1nocv1305856743.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305856500av3rvfhfxhdgoei/1nocv1305856743.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t1305856500av3rvfhfxhdgoei/2t4h21305856743.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305856500av3rvfhfxhdgoei/2t4h21305856743.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/20/t1305856500av3rvfhfxhdgoei/3ydhb1305856743.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t1305856500av3rvfhfxhdgoei/3ydhb1305856743.ps (open in new window)


 
Parameters (Session):
par1 = 60 ; par2 = 1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; par3 = multiplicative ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
 
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