Home » date » 2010 » Dec » 09 »

exponential smoothing

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 09 Dec 2010 18:18:02 +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/09/t1291918567o6uxvxe3arrgoqk.htm/, Retrieved Thu, 09 Dec 2010 19:16:08 +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/09/t1291918567o6uxvxe3arrgoqk.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
10 10 10 10 10 9,94 10,06 10,06 10,06 10,06 10,06 10,06 10,06 10,06 10,06 10,06 10,06 10,06 10,06 10,06 9,94 9,94 9,94 9,94 9,94 9,94 10,06 10,06 9,94 10,06 10,06 10,06 10,18 10,28 10,28 10,18 10,28 10,28 10,28 10,18 10,28 10,28 10,18 10,18 10,18 10,28 10,28 10,18 10,18 10,18 10,18 10,18 10,18 10,28 10,28 10,28 10,18 10,18 10,18 10,28 10,18 10,18 10,28 10,18 10,18 10,18 10,28 10,28 10,28 10,28 10,28 10,28 10,18 10,18 10,18 10,18 10,18 10,18 10,18 10,18 10,18 10,28 10,28 10,28 10,28 10,28 10,28 10,28 10,28 10,18 10,28 10,28 10,28 10,28 10,18 10,28 10,28 10,28 10,18 10,18 10,28 10,28 10,28 10,28 10,28 10,28 10,28 10,18 10,28 10,28 10,28 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,34 10,34 10,34 10,42 10,42 10,42 10,42 10,34 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,42 10,34 10,34 10,34 10,3 etc...
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.6515049537628
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
210100
310100
410100
510100
69.9410-0.0600000000000005
710.069.960909702774230.0990902972257697
810.0610.02546752228660.034532477713352
910.0610.04796560258260.0120343974174002
1010.0610.05580607211560.00419392788441364
1110.0610.0585384369080.00146156309199341
1210.0610.05949065250270.000509347497322565
1310.0610.05982249492040.000177505079630436
1410.0610.05993814035916.18596409331928e-05
1510.0610.05997844222162.15577784263843e-05
1610.0610.0599924872217.51277898913827e-06
1710.0610.05999738183372.61816626156985e-06
1810.0610.0599990875829.12417972287471e-07
1910.0610.05999968202693.1797314292703e-07
2010.0610.05999988918791.10812065301502e-07
219.9410.0599999613825-0.119999961382545
229.949.98181939209047-0.0418193920904724
239.949.95457385098018-0.0145738509801809
249.949.94507891487119-0.00507891487119139
259.949.94176997667287-0.00176997667287004
269.949.94061682810245-0.00061682810245145
2710.069.940214961538080.119785038461917
2810.0610.01825550748270.0417444925173101
299.9410.04545225115-0.105452251150032
3010.069.976749587140350.0832504128596536
3110.0610.03098764352120.0290123564787912
3210.0610.04988933748750.0101106625125258
3310.1810.05647648420020.123523515799791
3410.2810.136952666650.14304733335003
3510.2810.23014871295010.0498512870499273
3610.1810.2626270734146-0.0826270734145513
3710.2810.208795125770.0712048742299505
3810.2810.25518545406290.0248145459370814
3910.2810.27135225366630.00864774633369869
4010.1810.2769863032416-0.0969863032415894
4110.2810.21379924623260.066200753767447
4210.2810.25692936525490.0230706347451246
4310.1810.2719599980778-0.0919599980777761
4410.1810.2120476037821-0.0320476037820878
4510.1810.1911684311618-0.0111684311618294
4610.2810.18389214293410.0961078570658618
4710.2810.24650688790810.0334931120919251
4810.1810.2683278163529-0.088327816352896
4910.1810.2107818064439-0.0307818064439331
5010.1810.1907273070599-0.010727307059943
5110.1810.1837384133699-0.00373841336985592
5210.1810.1813028185402-0.00130281854018222
5310.1810.1804540258074-0.000454025807400171
5410.2810.18015822574470.0998417742552569
5510.2810.24520563626450.0347943637354895
5610.2810.26787433660120.012125663398793
5710.1810.2757742663732-0.09577426637318
5810.1810.2133768573881-0.0333768573880544
5910.1810.1916316694587-0.0116316694587031
6010.2810.18405357918580.0959464208141725
6110.1810.2465631476421-0.0665631476420714
6210.1810.2031969272152-0.023196927215217
6310.2810.18808401422240.0919159857775718
6410.1810.2479677342865-0.0679677342865066
6510.1810.2036864187028-0.0236864187028143
6610.1810.188254599581-0.00825459958103103
6710.2810.18287668706270.0971233129373381
6810.2810.24615300656720.0338469934328085
6910.2810.26820449045860.011795509541356
7010.2810.2758893233570.00411067664300546
7110.2810.27856744955320.00143255044677026
7210.2810.27950076326580.000499236734183839
7310.1810.2798260184712-0.0998260184712372
7410.1810.2147888729228-0.0347888729228085
7510.1810.1921237498778-0.0121237498777749
7610.1810.1842250667742-0.00422506677422341
7710.1810.1814724148408-0.00147241484083871
7810.1810.180513129278-0.000513129278038704
7910.1810.1801788230115-0.00017882301147587
8010.1810.1800623189337-6.23189336526053e-05
8110.1810.1800217178397-2.17178396653139e-05
8210.2810.18000756855950.0999924314404605
8310.2810.24515313298180.0348468670182136
8410.2810.26785603946730.0121439605327343
8510.2810.27576788991260.00423211008735791
8610.2810.27852513059940.00147486940057462
8710.2810.27948601532010.000513984679946233
8810.2810.27982087888520.000179121114802783
8910.2810.27993757717886.2422821185848e-05
9010.1810.279978245956-0.099978245956045
9110.2810.21484192344720.0651580765528337
9210.2810.2572927330990.0227072669010067
9310.2810.27208662997140.0079133700285876
9410.2810.2772422297460.00275777025400537
9510.1810.2790389307278-0.0990389307278186
9610.2810.21451457674330.0654854232567263
9710.2810.25717865439430.0228213456057151
9810.2810.27204687410790.00795312589205821
9910.1810.2772283750245-0.0972283750245158
10010.1810.2138836070497-0.0338836070497361
10110.2810.19180826920550.0881917307945184
10210.2810.2492656186990.0307343813009737
10310.2810.26928922036740.0107107796325554
10410.2810.27626734635670.00373265364328468
10510.2810.2786991886960.00130081130400406
10610.2810.27954667370450.00045332629553485
10710.2810.27984201803170.000157981968323284
10810.1810.2799449440666-0.0999449440666442
10910.2810.21483031790370.0651696820963199
11010.2810.25728868862460.0227113113754207
11110.2810.27208522049210.00791477950788533
11210.4210.27724173854940.142758261450558
11310.4210.3702494530750.0497505469249546
11410.4210.40266218084910.0173378191509386
11510.4210.41395785591330.00604214408665804
11610.4210.41789434271710.00210565728285239
11710.4210.41926618886790.000733811132146656
11810.4210.41974427045560.000255729544427652
11910.4210.41991087952068.91204794086775e-05
12010.4210.41996894195443.10580455913367e-05
12110.4210.4199891764251.08235750335695e-05
12210.3410.4199962280377-0.079996228037718
12310.3410.3678782891888-0.0278782891888056
12410.3410.3497154456799-0.00971544567986626
12510.4210.34338578469140.0766142153085809
12610.4210.39330032549360.026699674506391
12710.4210.41069529569840.00930470430162345
12810.4210.41675735664420.00324264335581859
12910.3410.4188699548538-0.0788699548537828
13010.4210.36748578856350.052514211436506
13110.4210.40169905745730.018300942542675
13210.4210.41362221218240.00637778781759302
13310.4210.41777737253960.00222262746038382
13410.4210.41922542534040.000774574659574867
13510.4210.41973006456820.000269935431802537
13610.4210.41990592883929.40711607864131e-05
13710.4210.41996721666653.27833335269645e-05
13810.4210.41998857517071.14248293332508e-05
13910.4210.41999601850363.98149642677481e-06
14010.4210.41999861246821.38753178191564e-06
14110.4210.4199995164524.83547951901642e-07
14210.4210.41999983148591.68514066700709e-07
14310.4210.41999994127375.87263180307218e-08
14410.4210.41999997953422.04658316960149e-08
14510.4210.41999999286787.13224146409175e-09
14610.4210.41999999751442.48555132031925e-09
14710.3410.4199999991338-0.079999999133797
14810.3410.3678796033971-0.0278796033971087
14910.3410.3497159036749-0.0097159036749499
15010.3410.3433859443004-0.00338594430043848


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
15110.341179984815510.24464656486710.437713404764
15210.341179984815510.225966682656110.456393286975
15310.341179984815510.209918761211510.4724412084196
15410.341179984815510.195629606425210.4867303632058
15510.341179984815510.182623003016910.4997369666142
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291918567o6uxvxe3arrgoqk/16z631291918677.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291918567o6uxvxe3arrgoqk/16z631291918677.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291918567o6uxvxe3arrgoqk/26z631291918677.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291918567o6uxvxe3arrgoqk/26z631291918677.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t1291918567o6uxvxe3arrgoqk/3g8nn1291918677.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t1291918567o6uxvxe3arrgoqk/3g8nn1291918677.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 <- 5
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