Home » date » 2010 » Dec » 12 »

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: Sun, 12 Dec 2010 11:16: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/12/t1292152457zozx1t8ecrqzh0w.htm/, Retrieved Sun, 12 Dec 2010 12:14:18 +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/12/t1292152457zozx1t8ecrqzh0w.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 «
43880 43110 44496 44164 40399 36763 37903 35532 35533 32110 33374 35462 33508 36080 34560 38737 38144 37594 36424 36843 37246 38661 40454 44928 48441 48140 45998 47369 49554 47510 44873 45344 42413 36912 43452 42142 44382 43636 44167 44423 42868 43908 42013 38846 35087 33026 34646 37135 37985 43121 43722 43630 42234 39351 39327 35704 30466 28155 29257 29998 32529 34787 33855 34556 31348 30805 28353 24514 21106 21346 23335 24379 26290 30084 29429 30632 27349 27264 27474 24482 21453 18788 19282 19713 21917 23812 23785 24696 24562 23580 24939 23899 21454 19761 19815 20780 23462 25005 24725 26198 27543 26471 26558 25317 22896 22248 23406 25073 27691 30599 31948 32946 34012 32936 32974 30951 29812 29010 31068 32447 34844 35676 35387 36488 35652 33488 32914 29781 27951
 
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.859273893725624
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133350835364.6626602564-1856.66266025641
143608036276.0354231599-196.035423159919
153456034389.3418181102170.658181889841
163873738296.4051215425440.594878457545
173814437441.7929812939702.207018706089
183759436733.5189901093860.48100989069
193642436951.8290409387-527.829040938726
203684334780.11717536022062.8828246398
213724637188.369715371857.6302846281615
223866134382.76943075784278.23056924218
234045439570.7791198969883.220880103108
244492842404.79561421322523.2043857868
254844142312.39288092796128.6071190721
264814050318.9931046143-2178.99310461434
274599846779.9990947625-781.999094762476
284736949906.4560109482-2537.45601094823
294955446529.69814509823024.30185490179
304751047839.0129079156-329.012907915567
314487346839.8504206739-1966.85042067385
324534443796.20584429761547.79415570242
334241345479.6647560848-3066.66475608481
343691240583.3879508839-3671.38795088395
354345238462.73148628464989.26851371542
364214245055.7560116669-2913.7560116669
374438240798.88943583583583.11056416423
384363645449.1146913578-1813.11469135783
394416742421.10397779011745.89602220988
404442347472.6765575195-3049.67655751946
414286844438.4654766729-1570.46547667287
424390841327.71769404112580.2823059589
434201342597.950137342-584.950137342043
443884641236.3386443366-2390.33864433663
453508738886.4880158068-3799.4880158068
463302633275.414974234-249.414974234031
473464635313.9510155476-667.951015547573
483713535933.71261911151201.28738088851
493798536127.07413825221857.9258617478
504312138535.5034483444585.49655165605
514372241506.49805190652215.50194809349
524363046286.728487585-2656.72848758502
534223443798.3310405884-1564.33104058842
543935141276.9729923135-1925.97299231351
553932738229.66706214711097.33293785288
563570438059.5322026113-2355.53220261131
573046635541.2857365836-5075.28573658355
582815529333.5409760028-1178.54097600283
592925730514.8043525852-1257.80435258523
602999830890.7710237347-892.771023734749
613252929377.16900048723151.83099951279
623478733281.25761919681505.74238080323
633385533272.3797522023582.62024779775
643455635963.8675531898-1407.86755318978
653134834702.3125432327-3354.3125432327
663080530591.9776557521213.02234424794
672835329808.1126487223-1455.11264872232
682451426958.8196647792-2444.8196647792
692110623981.1104886117-2875.11048861168
702134620212.29259753611133.70740246391
712333523369.2562151878-34.2562151877719
722437924847.955577549-468.955577549048
732629024267.70819712762022.29180287235
743008426969.56563033073114.4343696693
752942928213.08740902081215.91259097921
763063231168.6331897809-536.633189780856
772734930381.7914990917-3032.79149909172
782726427049.7483996167214.251600383279
792747426032.1895179921441.81048200796
802448225532.8693376932-1050.86933769324
812145323692.3921345374-2239.39213453744
821878821033.9757614542-2245.97576145418
831928221122.5028951048-1840.50289510477
841971320987.9680911197-1274.96809111973
852191720065.71874338381851.28125661619
862381222774.3242495591037.67575044097
872378521966.16998558441818.83001441562
882469625193.1580245817-497.158024581724
892456224088.961673285473.038326715036
902358024226.3303512646-646.330351264558
912493922642.0454468112296.95455318899
922389922526.74311703711372.25688296295
932145422601.1388310749-1147.13883107493
941976120880.3407188114-1119.34071881143
951981521994.0165500426-2179.01655004265
962078021648.1913106273-868.191310627306
972346221515.4195288921946.58047110803
982500524191.4176272452813.582372754849
992472523300.63457203681424.36542796319
1002619825862.7495109902335.250489009817
1012754325610.35201917721932.64798082282
1022647126844.4007724239-373.40077242392
1032655825908.8341541536649.165845846434
1042531724247.50090317241069.49909682764
1052289623707.2000064611-811.200006461102
1062224822278.9772761778-30.9772761777567
1072340624178.7313469072-772.731346907207
1082507325225.7576016279-152.757601627884
1092769126103.85120162171587.14879837835
1103059928311.55663622262287.44336377743
1113194828773.17697471833174.82302528166
1123294632686.147524477259.85247552301
1133401232593.75801723131418.2419827687
1143293633061.269863651-125.269863650959
1153297432482.817476111491.182523889034
1163095130744.885142676206.11485732405
1172981229198.0372468256613.96275317443
1182901029104.2173770665-94.2173770665431
1193106830845.2467178788222.753282121241
1203244732834.9134170942-387.913417094212
1213484433755.79401685481088.20598314525
1223567635633.320643297642.6793567023851
1233538734290.95135748941096.04864251056
1243648836007.4728938153480.527106184723
1253565236267.7189806085-615.718980608523
1263348834770.2888582061-1282.28885820611
1273291433284.3911983022-370.391198302248
1282978130766.0145951278-985.01459512784
1292795128253.0551030731-302.055103073071


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
13027272.465570984423431.318867587431113.6122743814
13129139.059490915924074.639572579534203.4794092523
13230851.383363250824806.361426031236896.4053004705
13332313.316370938125425.919813915139200.7129279611
13433108.643113922725471.223887121340746.0623407242
13531877.8371291623557.734151543640197.9401067764
13632565.932731587923615.063797771241516.8016654047
13732259.003977496222718.983234196441799.024720796
13831196.84131756821101.994270939941291.688364196
13930941.108804734820320.380110005841561.8374994638
14028654.506131266917532.733830088239776.2784324456
14127084.054195804215482.857695809538685.2506957989
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152457zozx1t8ecrqzh0w/1ex9a1292152557.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152457zozx1t8ecrqzh0w/1ex9a1292152557.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152457zozx1t8ecrqzh0w/2o68u1292152557.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152457zozx1t8ecrqzh0w/2o68u1292152557.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152457zozx1t8ecrqzh0w/3o68u1292152557.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152457zozx1t8ecrqzh0w/3o68u1292152557.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