Home » date » 2011 » May » 16 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 16 May 2011 10:01:00 +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/16/t1305540297fpf607qurdlb64v.htm/, Retrieved Mon, 16 May 2011 12:05:02 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W101
 
Dataseries X:
» Textbox « » Textfile « » CSV «
41086 39690 43129 37863 35953 29133 24693 22205 21725 27192 21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'George Udny Yule' @ 216.218.223.82


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.594274923316691
beta0.0241142539120853
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
343129382944835
43786339840.6072043033-1977.60720430333
53595337310.3126917717-1357.31269177168
62913335129.192688473-5996.19268847296
72469330105.3742131567-5412.37421315672
82220525350.9424083429-3145.94240834287
92172521898.3112741974-173.311274197404
102719220209.7566427556982.24335724496
112179022873.6277044576-1083.6277044576
121325320728.6249365729-7475.62493657291
133770214677.889087532623024.1109124674
143036427082.32835977653281.67164022354
153260927801.35903103114807.64096896886
163021229496.1308896812715.869110318847
172996528769.52410050691195.47589949314
182835228345.06736225866.93263774138904
192581427214.3885164144-1400.38851641443
202241425227.305737017-2813.30573701704
212050622360.2456169724-1854.24561697241
222880620036.5586160958769.44138390503
232222824151.9328411378-1923.93284113783
241397121884.9320059536-7913.93200595359
253684515944.814302354220900.1856976458
263533827427.71422328287910.2857767172
273502231304.40068661233717.59931338768
283477732742.75376701232034.24623298775
292688733209.8840829498-6322.88408294984
302397028619.9713536828-4649.97135368283
312278024957.5923105983-2177.59231059827
321735122733.280154997-5382.28015499698
332138218527.37163005662854.62836994335
342456119257.35952870485303.64047129522
351740921518.7377067368-4109.73770673676
361151418127.0867084793-6613.08670847928
373151413152.989358944318361.0106410557
382707123283.49419349783787.50580650217
392946224807.60739834564654.39260165436
402610526913.5894433031-808.589443303106
412239725761.4707643112-3364.47076431117
422384323042.2413731134800.758626886563
432170522809.7786275816-1104.77862758158
441808921429.0708501344-3340.07085013435
452076418672.12008526412091.87991473585
462531619173.2191222236142.78087777705
471770422169.6961175774-4465.69611757741
481554818797.8256178991-3249.8256178991
492802916101.944851880311927.0551481197
502938322596.22436007036786.7756399297
513643826133.022521542310304.9774784577
523203431908.275253418125.72474658204
532267931636.0550466646-8957.05504666461
542431925837.8075297262-1518.80752972615
551800424438.1587196983-6434.15871969827
561753720025.2352698412-2488.23526984119
572036617921.61752899852444.38247100153
582278218784.36003203293997.63996796707
591916920627.4526801149-1458.4526801149
601380719207.2259372753-5400.22593727535
612974315367.114275981714375.8857240183
622559123485.46343424062105.5365657594
632909624342.02517157024753.97482842984
642648226840.6141734953-358.61417349528
652240526295.7806192313-3890.78061923132
662704423596.11230365033447.88769634968
671797025307.0404807588-7337.04048075883
681873020503.6128602848-1773.61286028477
691968418980.9740096464703.025990353566
701978518940.2142334743844.785766525703
711847918995.8049367975-516.804936797522
721069818234.8303580312-7536.8303580312


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7313194.0241901087447.14858639853825940.8997938189
7412632.1673052562-2289.8490200061627554.1836305185
7512070.3104204036-4832.881560973828973.502401781
7611508.453535551-7245.3076196786330262.2146907806
7710946.5966506984-9564.1391260335731457.3324274304
7810384.7397658458-11813.11618992332582.5957216147
799822.88288099327-14008.480366313233654.2461282998
809261.02599614069-16161.881265739434683.9332580208
818699.16911128811-18281.982889016535680.3211115927
828137.31222643554-20375.415791845136650.0402447161
837575.45534158296-22447.373255271337598.2839384372
847013.59845673038-24502.001378362338529.1982918231
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t1305540297fpf607qurdlb64v/176cs1305540055.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305540297fpf607qurdlb64v/176cs1305540055.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305540297fpf607qurdlb64v/2eyw91305540055.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305540297fpf607qurdlb64v/2eyw91305540055.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305540297fpf607qurdlb64v/3cscw1305540055.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305540297fpf607qurdlb64v/3cscw1305540055.ps (open in new window)


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