Home » date » 2009 » Jun » 06 »

Exponential Smoothing - king size sigarets - Vincent Bruyninckx

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 06 Jun 2009 05:41:56 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/06/t1244288549w3rv1ixd8digtc0.htm/, Retrieved Sat, 06 Jun 2009 13:42:33 +0200
 
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/2009/Jun/06/t1244288549w3rv1ixd8digtc0.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2.98 2.98 2.98 3.03 3.07 3.08 3.08 3.08 3.08 3.08 3.08 3.08 3.08 3.08 3.12 3.15 3.15 3.15 3.15 3.16 3.19 3.2 3.2 3.2 3.21 3.21 3.21 3.21 3.21 3.28 3.3 3.3 3.3 3.3 3.3 3.3 3.3 3.45 3.49 3.5 3.54 3.64 3.67 3.67 3.68 3.68 3.68 3.68 3.7 3.83 3.87 3.87 3.87 3.87 3.87 3.87 3.87 3.87 3.87 3.88 3.88 3.88 3.88 3.88 3.88 3.89 3.89 3.91 3.95 3.99 3.99 3.99
 
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.865625929532432
beta0.0279541213592297
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133.083.032180571624220.0478194283757842
143.083.076586510445360.00341348955464138
153.123.12098274303256-0.000982743032556854
163.153.149885960428650.000114039571347480
173.153.149322980032380.000677019967616932
183.153.149266003058200.000733996941795212
193.153.18347764010211-0.0334776401021055
203.163.154535492631410.00546450736859105
213.193.157707694080780.0322923059192242
223.23.183940270465060.0160597295349381
233.23.199056880570970.000943119429031913
243.23.20325491989269-0.00325491989269056
253.213.21086127093729-0.000861270937285497
263.213.207158382468230.00284161753176626
273.213.25229595455108-0.0422959545510846
283.213.2457125917697-0.0357125917696992
293.213.2126444686849-0.00264446868490165
303.283.208089225452190.0719107745478067
313.33.3003046227353-0.000304622735299631
323.33.30623521015310-0.00623521015310402
333.33.30334739022062-0.00334739022061781
343.33.296012397392190.00398760260781206
353.33.297962784411050.00203721558895253
363.33.30199796556584-0.00199796556583953
373.33.31074846677059-0.0107484667705950
383.453.298104154081850.151895845918155
393.493.471061788450880.0189382115491159
403.53.52483229925198-0.0248322992519761
413.543.509965790234650.0300342097653479
423.643.549147106780760.0908528932192354
433.673.655299014616140.0147009853838607
443.673.67942078021977-0.00942078021977322
453.683.679807092536190.000192907463814951
463.683.68149108074878-0.00149108074877935
473.683.68343826048178-0.00343826048177487
483.683.68744456719865-0.00744456719865161
493.73.696299992353670.00370000764632605
503.833.724649339525570.105350660474434
513.873.845817754961380.0241822450386211
523.873.90557337660747-0.0355733766074660
533.873.89401496738218-0.0240149673821812
543.873.89886491323324-0.0288649132332428
553.873.89217940142879-0.0221794014287879
563.873.88073831118437-0.0107383111843657
573.873.8809594803103-0.0109594803102966
583.873.87175396268486-0.00175396268486416
593.873.87229346628109-0.00229346628108607
603.883.876046163358710.00395383664128701
613.883.89638452904704-0.0163845290470395
623.883.92135090838234-0.041350908382344
633.883.90061684364766-0.0206168436476633
643.883.90846348793655-0.0284634879365453
653.883.89967136198188-0.0196713619818771
663.893.90279039115096-0.0127903911509573
673.893.90646336068969-0.0164633606896918
683.913.897156922779550.0128430772204462
693.953.913962907792530.0360370922074695
703.993.943817827516630.0461821724833702
713.993.983962292413380.00603770758662137
723.993.99427826004811-0.00427826004810994


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
734.003297886488773.936482918524194.07011285445336
744.038671183996323.949024718929854.1283176490628
754.056629323584993.94808547945484.16517316771517
764.082214415072283.956606465505144.20782236463943
774.100601524185893.959356957846494.24184609052528
784.123792658779423.967619545821874.27996577173698
794.14010580244063.969846293027674.31036531185352
804.151139300659523.967457138297604.33482146302144
814.161732009797543.965010094809724.35845392478536
824.162153330364733.953136808950444.37116985177901
834.156134185513833.93538651466384.37688185636385
844.15929595911847-0.5216799969935678.8402719152305
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288549w3rv1ixd8digtc0/1kgid1244288514.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288549w3rv1ixd8digtc0/1kgid1244288514.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288549w3rv1ixd8digtc0/23ij61244288514.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288549w3rv1ixd8digtc0/23ij61244288514.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288549w3rv1ixd8digtc0/3cj7y1244288514.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244288549w3rv1ixd8digtc0/3cj7y1244288514.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