Home » date » 2008 » Apr » 30 » attachments

Exponential Smoothing

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 30 Apr 2008 10:21:01 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Apr/30/t1209572547r4akop6btrwqpql.htm/, Retrieved Wed, 30 Apr 2008 18:22:31 +0200
 
User-defined keywords:
berekening 1 met gebruikt: multiplicatief & triple
 
Dataseries X:
» Textbox « » Textfile « » CSV «
56421 53152 53536 52408 41454 38271 35306 26414 31917 38030 27534 18387 50556 43901 48572 43899 37532 40357 35489 29027 34485 42598 30306 26451 47460 50104 61465 53726 39477 43895 31481 29896 33842 39120 33702 25094 51442 45594 52518 48564 41745 49585 32747 33379 35645 37034 35681 20972 58552 54955 65540 51570 51145 46641 35704 33253 35193 41668 34865 21210 56126 49231 59723 48103 47472 50497 40059 34149 36860 46356 36577
 
Text written by user:
 
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' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0839511832014079
beta0.000901008505166857
gamma0.332107274688902


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135055650171.6294214468384.3705785532
144390143678.138856552222.861143448012
154857248307.8467109056264.153289094429
164389943551.2092739331347.790726066887
173753237142.4550482428389.544951757176
184035739697.3815437588659.618456241224
193548934940.8176738392548.182326160771
202902728659.9527614384367.047238561579
213448533559.6925869967925.307413003276
224259840772.11083390231825.88916609770
233030628904.29254600861401.70745399144
242645125309.24638424491141.75361575508
254746054449.3897326998-6989.38973269978
265010446809.77945058013294.22054941986
276146552043.02758986119421.97241013893
285372647627.53892028836098.46107971165
293947741041.7339863003-1564.7339863003
304389543749.2787984640145.721201535962
313148138438.2903889479-6957.29038894793
322989630971.5037701096-1075.50377010957
333384236271.5255148524-2429.52551485235
343912043930.9885469839-4810.9885469839
353370230768.64861416442933.35138583565
362509427013.4599955897-1919.45999558971
375144254522.4051628419-3080.40516284193
384559450130.2407638437-4536.24076384374
395251856751.5887668554-4233.58876685536
404856450076.2193714957-1512.21937149567
414174540525.36205481611219.63794518391
424958544000.18689369885584.81310630123
433274736834.6941442789-4087.6941442789
443337931285.93095631462093.06904368541
453564536578.0412183693-933.041218369319
463703443854.0936960822-6820.09369608221
473568132565.70119906523115.29880093484
482097227183.8757485128-6211.87574851281
495855254378.99409539384173.00590460616
505495550014.6683357364940.33166426398
516554057806.1348095967733.86519040394
525157052615.2593318077-1045.25933180771
535114543395.1634936547749.83650634602
544664149061.9837464375-2420.98374643749
553570437643.9982540233-1939.99825402327
563325333932.7830177759-679.783017775873
573519338294.4481858341-3101.44818583415
584166843838.7008424369-2170.70084243691
593486535489.3063727399-624.306372739928
602121026494.3984978382-5284.39849783824
615612658498.6109940148-2372.61099401478
624923153611.4973649141-4380.49736491407
635972361643.2913694242-1920.29136942422
644810352871.902105855-4768.90210585498
654747245944.63866989311527.36133010690
665049747977.06676212692519.93323787311
674005937100.53653912262958.4634608774
683414934141.42281039237.57718960772036
693686037865.8761038096-1005.87610380958
704635643975.25005222982380.74994777018
713657736262.3319912097314.668008790264


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7225590.636177466722807.590503727228373.6818512062
7360475.137683927957351.680880127863598.594487728
7454889.059197793751776.485591344858001.6328042426
7564545.979868492961242.449018134367849.5107188514
7654477.337021496451276.585963560157678.0880794326
7749539.703291817946362.046774505752717.35980913
7851872.190857154848600.576043778255143.8056705314
7940249.468711130837129.776004113443369.1614181481
8035922.343303852932823.055864218939021.6307434868
8139507.128551621536279.496745250442734.7603579926
8247109.831663688343640.726858965750578.9364684108
8338140.740800240636399.699059412939881.7825410684
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/30/t1209572547r4akop6btrwqpql/1jnej1209572459.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/30/t1209572547r4akop6btrwqpql/1jnej1209572459.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/30/t1209572547r4akop6btrwqpql/22dfn1209572459.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/30/t1209572547r4akop6btrwqpql/22dfn1209572459.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/30/t1209572547r4akop6btrwqpql/31y1h1209572459.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/30/t1209572547r4akop6btrwqpql/31y1h1209572459.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; 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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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