Home » date » 2011 » May » 18 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 18 May 2011 15:03:30 +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/18/t1305730771ihmo1b7mtaylwgz.htm/, Retrieved Wed, 18 May 2011 16:59:34 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1,3014 1,3201 1,2938 1,2694 1,2165 1,2037 1,2292 1,2256 1,2015 1,1786 1,1856 1,2103 1,1938 1,202 1,2271 1,277 1,265 1,2684 1,2811 1,2727 1,2611 1,2881 1,3213 1,2999 1,3074 1,3242 1,3516 1,3511 1,3419 1,3716 1,3622 1,3896 1,4227 1,4684 1,457 1,4718 1,4748 1,5527 1,5751 1,5557 1,5553 1,577 1,4975 1,437 1,3322 1,2732 1,3449 1,3239 1,2785 1,305 1,319 1,365 1,4016 1,4088 1,4268 1,4562 1,4816 1,4914 1,4614 1,4272 1,3686 1,3569 1,3406 1,2565 1,2209 1,277 1,2894 1,3067 1,3898 1,3661 1,322 1,336
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0526243027716168
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
31.29381.3388-0.0450000000000002
41.26941.31013190637528-0.0407319063752773
51.21651.28358841820172-0.0670884182017197
61.20371.2271579369698-0.0234579369698034
71.22921.213123479392310.0160765206076929
81.22561.23946949508028-0.0138694950802805
91.20151.23513962257189-0.0336396225718862
101.17861.20926936088854-0.0306693608885404
111.18561.184755407155330.000844592844670089
121.21031.191799853264910.0185001467350934
131.19381.21747341058801-0.0236734105880134
141.2021.199727613861590.00227238613840686
151.22711.208047196597750.0190528034022455
161.2771.234149837092640.0428501629073574
171.2651.28630479703929-0.0213047970392923
181.26841.27318364694941-0.00478364694940869
191.28111.276331910863990.00476808913600935
201.27271.28928282823033-0.016582828230326
211.26111.28001016845672-0.0189101684567234
221.28811.267415034026390.0206849659736053
231.32131.295503565938610.0257964340613897
241.29991.33006108529508-0.0301610852950849
251.30741.30707387921060.000326120789404083
261.32421.314591041089760.0096089589102426
271.35161.331896705852770.0197032941472297
281.35111.36033357796957-0.00923357796957225
291.34191.35934766736684-0.017447667366836
301.37161.349229496036670.0223705039633346
311.36221.38010672821039-0.0179067282103853
321.38961.369764399123390.0198356008766067
331.42271.398208233789580.0244917662104196
341.46841.432597095910050.0358029040899506
351.4571.48018119877498-0.0231811987749819
361.47181.467561304352040.00423869564796164
371.47481.48258436275517-0.00778436275517325
381.55271.485174716092660.0675252839073388
391.57511.566628187077740.00847181292225963
401.55571.58947401032599-0.0337740103259856
411.55531.56829667658078-0.0129966765807796
421.5771.567212735537370.00978726446263245
431.49751.58942778350576-0.091927783505755
441.4371.50509014799342-0.0680901479934246
451.33221.44100695142965-0.108806951429654
461.27321.33048106147396-0.0572810614739636
471.34491.268466685551880.0764333144481215
481.32391.34418893543323-0.0202889354332343
491.27851.32212124435208-0.0436212443520823
501.3051.274425706782020.0305742932179764
511.3191.302534657645350.0164653423546457
521.3651.317401134806660.0475988651933363
531.40161.365905991900180.0356940080998169
541.40881.404384364189560.00441563581043969
551.42681.411816733945380.0149832660546219
561.45621.430605217874740.0255947821252556
571.48161.461352125438680.0202478745613228
581.49141.487817655720070.00358234427992588
591.46141.49780617409009-0.0364061740900932
601.42721.46589032456202-0.0386903245620198
611.36861.42965427320794-0.061054273207936
621.35691.36784133464914-0.0109413346491405
631.34061.35556555454184-0.0149655545418386
641.25651.33847800266848-0.0819780026684838
651.22091.25006396743545-0.0291639674354449
661.2771.21292923398310.0640707660168993
671.28941.272400913372780.0169990866272169
681.30671.28569547845430.0210045215457049
691.38981.304100826755690.0856991732443109
701.36611.39171068599577-0.0256106859957748
711.3221.36666294150174-0.0446629415017445
721.3361.320212585345490.0157874146545143


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
731.335043387034251.261140169180151.40894660488835
741.334086774068491.226786582303551.44138696583343
751.333130161102741.198277697606271.4679826245992
761.332173548136981.172462862319581.49188423395439
771.331216935171231.148158118960011.51427575138244
781.330260322205481.124774268478021.53574637593293
791.329303709239721.101971974332311.55663544414713
801.328347096273971.079537171368421.57715702117952
811.327390483308211.057326136044061.59745483057237
821.326433870342461.035237910941581.61762982974334
831.32547725737671.013199121196281.63775539355713
841.324520644410950.9911550123517511.65788627647015
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t1305730771ihmo1b7mtaylwgz/1i66m1305731009.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305730771ihmo1b7mtaylwgz/1i66m1305731009.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305730771ihmo1b7mtaylwgz/2avyn1305731009.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305730771ihmo1b7mtaylwgz/2avyn1305731009.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305730771ihmo1b7mtaylwgz/35cbu1305731009.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305730771ihmo1b7mtaylwgz/35cbu1305731009.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=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