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 14:36:52 +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/t1305729161wyzuatx70w43at5.htm/, Retrieved Wed, 18 May 2011 16:32:44 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
70938 34077 45409 40809 37013 44953 19848 32745 43412 34931 33008 8620 68906 39556 50669 36432 40891 48428 36222 33425 39401 37967 34801 12657 69116 41519 51321 38529 41547 52073 38401 40898 40439 41888 37898 8771 68184 50530 47221 41756 45633 48138 39486 39341 41117 41629 29722 7054 56676 34870 35117 30169 30936 35699 33228 27733 33666 35429 27438 8170 63410 38040 45389 37353 37024 50957 37994 36454 46080 43373 37395 10963 75001
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.344206838588595
beta0
gamma0.800062194590154


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
136890667427.02029914531478.97970085469
143955638146.07890929691409.9210907031
155066950153.7420735709515.257926429127
163643236405.289391801826.7106081982274
174089140942.8420487901-51.8420487901385
184842848489.6480107205-61.648010720477
193622222874.787026828813347.2129731712
203342540492.9310246098-7067.93102460975
213940148550.2095142503-9149.20951425026
223796737153.7643814158813.235618584171
233480135802.0443257-1001.0443257
241265711033.67003938081623.32996061923
256911672097.9408045413-2981.94080454131
264151941245.2867222375273.713277762494
275132152392.4517088857-1071.45170888566
283852937841.5140012541687.485998745928
294154742565.2954263186-1018.2954263186
305207349774.29658035292298.70341964708
313840132007.18307306356393.81692693647
324089836520.59847380874377.40152619125
334043947425.4432482943-6986.44324829426
344188842000.4861018366-112.486101836563
353789839378.2183963945-1480.21839639451
36877115821.8535258243-7050.85352582433
376818471484.1391221893-3300.13912218931
385053042230.12033706978299.87966293028
394722155434.1718168137-8213.17181681374
404175639347.87640617582408.12359382416
414563343768.93165011951864.06834988049
424813853710.4095446217-5572.40954462174
433948635382.61010087674103.38989912329
443934138049.68146795661291.31853204345
454111741929.9465243306-812.946524330575
464162942236.5448056764-607.544805676371
472972238726.2591351341-9004.25913513411
4870549657.29324208409-2603.29324208409
495667668818.3667677855-12142.3667677855
503487042607.036279409-7737.03627940897
513511741627.0811200571-6510.0811200571
523016931699.7326989933-1530.7326989933
533093634479.5543137396-3543.55431373957
543569938657.9551183166-2958.95511831662
553322826306.37769033256921.62230966755
562773328468.0794929526-735.079492952631
573366630546.78855819653119.21144180351
583542932314.63171352093114.36828647914
592743825679.90523846611758.09476153389
6081703673.843958063544496.15604193646
616341060273.68006189413136.31993810585
623804041632.7461880415-3592.74618804153
634538942723.0371050812665.96289491898
643735338566.6869910395-1213.68699103955
653702440399.5600900091-3375.56009000906
665095744942.51042278036014.48957721968
673799440863.7491081566-2869.74910815663
683645435637.9114724363816.088527563712
694608040272.79449196725807.20550803276
704337342963.3225029234409.677497076569
713739534686.01972171962708.98027828045
721096314443.8529061886-3480.85290618864
737500167584.47554122087416.52445877917


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7446886.242438385637594.831090192856177.6537865784
7552496.971327990942670.547813424762323.3948425571
7645387.42202453635053.648593019655721.1954560524
7746503.773034555235686.419033681957321.1270354284
7857135.341509994745855.118913498568415.5641064909
7946325.01101334934600.178559416158049.8434672818
8044020.828671626431867.641010807156174.0163324457
8150993.524317577738426.573829675463560.4748054799
8248853.222765265635885.704929855461820.7406006757
8341641.293601066828285.216592529754997.370609604
8417219.02456662133485.3772978049330952.6718354378
8577275.365487705363174.254129001691376.476846409
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t1305729161wyzuatx70w43at5/14gxl1305729409.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305729161wyzuatx70w43at5/14gxl1305729409.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305729161wyzuatx70w43at5/22pl11305729409.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305729161wyzuatx70w43at5/22pl11305729409.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305729161wyzuatx70w43at5/3dpqg1305729409.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305729161wyzuatx70w43at5/3dpqg1305729409.ps (open in new window)


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