Home » date » 2011 » May » 20 »

datareeks - exponential Smoothing gemiddelde gokuitgaven - Frederik Verbraken

*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 14:51:38 +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/t13059028983eiwupje4vfa84r.htm/, Retrieved Fri, 20 May 2011 16:48:20 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
5.81 5.76 5.99 6.12 6.03 6.25 5.80 5.67 5.89 5.91 5.86 6.07 6.27 6.68 6.77 6.71 6.62 6.50 5.89 6.05 6.43 6.47 6.62 6.77 6.70 6.95 6.73 7.07 7.28 7.32 6.76 6.93 6.99 7.16 7.28 7.08 7.34 7.87 6.28 6.30 6.36 6.28 5.89 6.04 5.96 6.10 6.26 6.02 6.25 6.41 6.22 6.57 6.18 6.26 6.10 6.02 6.06 6.35 6.21 6.48 6.74 6.53 6.80 6.75 6.56 6.66 6.18 6.40 6.43 6.54 6.44 6.64 6.82 6.97 7.00 6.91 6.74 6.98 6.37 6.56 6.63 6.87 6.68 6.75 6.84 7.15 7.09 6.97 7.15
 
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'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.790049205367589
beta0.00443492636579578
gamma0.910460748484263


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
136.276.005134714719070.264865285280932
146.686.645047572770730.0349524272292676
156.776.766836252561940.00316374743805969
166.716.705575762316130.00442423768386568
176.626.605924432614310.0140755673856905
186.56.478490964555690.0215090354443106
195.896.32768873003534-0.437688730035343
206.055.830384491645580.219615508354418
216.436.204522939793470.225477060206529
226.476.385652571456080.084347428543924
236.626.38736971614250.232630283857501
246.776.81092562846281-0.0409256284628086
256.77.0870432851245-0.387043285124504
266.957.19609101986052-0.246091019860518
276.737.09083234591805-0.36083234591805
287.076.739436620890720.330563379109281
297.286.891942951380710.388057048619291
307.327.045903022941040.274096977058964
316.766.96777018469932-0.207770184699319
326.936.768267730510680.161732269489317
336.997.12075248225123-0.130752482251235
347.166.987714007976360.172285992023641
357.287.078754333403910.201245666596092
367.087.43942399108796-0.359423991087963
377.347.40499384141914-0.0649938414191356
387.877.832875243836430.0371247561635712
396.287.93081818628042-1.65081818628042
406.36.68681723664301-0.386817236643013
416.366.288970843958730.0710291560412735
426.286.190810939038680.089189060961318
435.895.92885085405116-0.0388508540511632
446.045.927726346556130.112273653443869
455.966.16205467894051-0.202054678940506
466.16.025526694197460.0744733058025417
476.266.049574053084520.210425946915479
486.026.2937208608802-0.273720860880203
496.256.33910124086385-0.0891012408638492
506.416.69402583507748-0.284025835077483
516.226.209522124144860.0104778758551411
526.576.509798607907810.0602013920921882
536.186.54989686954732-0.369896869547321
546.266.107254186606030.152745813393966
556.15.8721009318750.227899068125004
566.026.10981784742629-0.0898178474262883
576.066.12154748840332-0.0615474884033178
586.356.148136579463590.20186342053641
596.216.29529171874476-0.0852917187447568
606.486.209708176224990.270291823775011
616.746.737166030787340.00283396921266199
626.537.15305644915515-0.623056449155147
636.86.446979051041650.353020948958346
646.757.0491669649905-0.2991669649905
656.566.71413617678361-0.154136176783609
666.666.535526259824740.124473740175263
676.186.26824163141441-0.0882416314144132
686.46.193300802791410.206699197208589
696.436.44732049495923-0.0173204949592334
706.546.56364382298656-0.0236438229865579
716.446.4734637417974-0.0334637417973935
726.646.494866937386370.14513306261363
736.826.87579663362076-0.0557966336207567
746.977.11880632914136-0.148806329141363
7576.966747985930130.0332520140698707
766.917.19331361652164-0.283313616521643
776.746.89363504515358-0.15363504515358
786.986.76613178210460.213868217895395
796.376.50970866641909-0.139708666419086
806.566.449297024433970.110702975566025
816.636.583832317030290.0461676829697142
826.876.750973955527860.119026044472145
836.686.76622330712744-0.0862233071274359
846.756.78091928977597-0.0309192897759702
856.846.98648794517266-0.146487945172659
867.157.139657601339860.0103423986601392
877.097.14616507889787-0.0561650788978687
886.977.23992776665109-0.269927766651091
897.156.972354839200580.177645160799422


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
907.177237725718196.642288936202057.71218651523433
916.667764598043955.999778048624657.33575114746325
926.767959639068425.966705057209567.56921422092729
936.801944376578325.889415281905217.71447347125144
946.94816784029625.923629262534067.97270641805833
956.826867852621075.730539822304247.9231958829379
966.92049938582775.729961638788068.11103713286734
977.131342257195295.83373766358588.42894685080478
987.440904667067916.023495838220468.85831349591536
997.42397719761135.945739750527168.90221464469544
1007.522260195232225.964855812341789.07966457812267
1017.55324235889449-9.2871591520991524.3936438698881
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/20/t13059028983eiwupje4vfa84r/1is661305903096.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/20/t13059028983eiwupje4vfa84r/1is661305903096.ps (open in new window)


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


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


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