Home » date » 2010 » Dec » 21 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 21 Dec 2010 19:52:06 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961028p54azlog0qn7ejo.htm/, Retrieved Tue, 21 Dec 2010 20:50:31 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961028p54azlog0qn7ejo.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
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 time3 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.567263099764252
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
23969041086-1396
34312940294.10071272912834.89928727089
43786341902.2344699459-4039.23446994586
53595339610.9258038498-3657.92580384976
62913337535.9194736503-8402.9194736503
72469332769.2533259580-8076.25332595803
82220528187.8928297937-5982.89282979373
92172524794.0184976076-3069.01849760762
102719223053.07755142094138.92244857911
112179025400.9355292857-3610.93552928573
121325323352.5850478942-10099.5850478942
133770217623.463127293120078.5368727069
143036429013.27619243561350.72380756437
153260929779.49196644002829.50803356003
163021231384.5674643651-1172.56746436509
172996530719.4132098466-754.41320984664
182835230291.4624339259-1939.46243392594
192581429191.2769617808-3377.27696178079
202241427275.4723636786-4861.47236367862
212050624517.7384812400-4011.73848124004
222880622242.02727492836563.97272507172
232222825965.5267897205-3737.52678972047
241397123845.3657575317-9874.3657575317
253684518244.002429708318600.9975702917
263533828795.66197013936542.33802986072
273502232506.88892066362515.11107933638
283477733933.6186277794843.38137222061
292688734412.0377592687-7525.03775926869
302397030143.3615141029-6173.36151410289
312278026641.4413256475-3861.44132564755
321735124450.9881497029-7099.98814970293
332138220423.426863613958.573136387007
342456120967.19003231063593.80996768937
351740923005.8258145458-5596.82581454577
361151419830.9530541459-8316.95305414595
373151415113.052484057416400.9475159426
382707124416.70481102182654.29518897821
392946225922.38852761093539.61147238909
402610527930.2795033995-1825.27950339946
412239726894.8657943649-4497.86579436492
422384324343.3925015299-500.392501529877
432170524059.5383000132-2354.53830001325
441808922723.8956054341-4634.89560543408
452076420094.6903572118669.309642788168
462531620474.36501988204841.63498011805
471770423220.8458866307-5516.84588663075
481554820091.3427880589-4543.34278805893
492802917514.072074813110514.9279251869
502938323478.80268345235904.1973165477
513643826828.03595485699609.96404514308
523203432279.4139477278-245.413947727800
532267932140.1996710143-9461.19967101435
542431926773.2102181462-2454.21021814623
551800425381.0273223275-7377.0273223275
561753721196.3119364184-3659.31193641842
572036619120.51930436141245.48069563862
582278219827.03454446592954.96545553412
591916921503.2774084684-2334.27740846845
601380720179.1279700310-6372.12797003097
612974316564.454905656713178.5450943433
622559124040.15724625691550.84275374313
632909624919.89311399214176.10688600787
642648227288.8444510958-806.844451095792
652240526831.1513667396-4426.15136673961
662704424320.35902241712723.64097758288
671797025865.3800460057-7895.38004600572
681873021386.6222872917-2656.62228729169
691968419879.6184936998-195.618493699811
701978519768.651340592416.3486594075584
711847919777.9253318050-1298.92533180496
721069819041.0929217230-8343.09292172297


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7314308.36416932521802.4654353415226814.2629033089
7414308.3641693252-69.544331461442228686.2726701119
7514308.3641693252-1724.4460200748830341.1743587253
7614308.3641693252-3223.8277153670631840.5560540175
7714308.3641693252-4604.7133696161433221.4417082665
7814308.3641693252-5891.4192875919934508.1476262424
7914308.3641693252-7100.9329097169735717.6612483674
8014308.3641693252-8245.6765136881736862.4048523386
8114308.3641693252-9335.0598814200737951.7882200705
8214308.3641693252-10376.413539937238993.1418785876
8314308.3641693252-11375.580237016239992.3085756666
8414308.3641693252-12337.306210313940954.0345489643
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961028p54azlog0qn7ejo/1aqm71292961122.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961028p54azlog0qn7ejo/1aqm71292961122.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961028p54azlog0qn7ejo/2aqm71292961122.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961028p54azlog0qn7ejo/2aqm71292961122.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961028p54azlog0qn7ejo/3aqm71292961122.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292961028p54azlog0qn7ejo/3aqm71292961122.ps (open in new window)


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