Home » date » 2010 » Jul » 11 »

Exponential Smoothing

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 11 Jul 2010 16:01:25 +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/Jul/11/t1278864170rpzuyid9690txa8.htm/, Retrieved Sun, 11 Jul 2010 18:02:54 +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/2010/Jul/11/t1278864170rpzuyid9690txa8.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:
Febiri Lordina
 
Dataseries X:
» Textbox « » Textfile « » CSV «
213 212 211 209 229 228 213 203 204 204 205 207 205 208 201 201 220 218 203 185 179 182 182 185 183 192 177 172 188 182 162 150 141 135 139 148 142 156 143 134 146 142 117 106 104 99 105 106 96 104 96 85 91 98 73 70 62 60 70 82 72 73 68 53 61 73 46 50 52 45 58 73 58 49 44 35 46 61 29 33 37 31 44 57 42 34 27 22 30 47 12 13 18 11 26 41 21 24 30 34 48 64 35 44 55 53 73 94 73 78 87 87 91 104 73 84 103 111 131 155
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.575651073368057
beta0.0869583411263661
gamma0.402742687472037


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13205209.192478598406-4.19247859840641
14208209.632082374054-1.63208237405388
15201202.032536769601-1.03253676960068
16201201.916846630005-0.916846630004585
17220220.811708811239-0.81170881123856
18218218.685886150255-0.685886150254959
19203198.7128043246874.28719567531294
20185190.858097501976-5.85809750197632
21179187.294217200712-8.29421720071221
22182181.1126393905930.88736060940741
23182181.1001593142460.899840685754185
24185182.0733153852592.92668461474102
25183180.2303837200942.76961627990596
26192184.1757681481987.82423185180241
27177182.689366602584-5.68936660258356
28172179.543655784908-7.54365578490805
29188191.372081448318-3.37208144831806
30182187.116246159165-5.11624615916494
31162167.284067282252-5.28406728225201
32150152.944275949712-2.94427594971205
33141149.328674507793-8.32867450779273
34135143.138082233170-8.1380822331703
35139135.9975135411483.00248645885151
36148136.34894926703611.6510507329643
37142138.8327556839373.16724431606301
38156141.65553644826914.3444635517309
39143142.3694242989340.630575701065709
40134141.842565480813-7.84256548081308
41146149.737292151698-3.73729215169757
42142144.542665587422-2.54266558742177
43117129.013747026312-12.0137470263116
44106112.682713645966-6.6827136459658
45104105.194591570029-1.19459157002912
4699102.169049253627-3.16904925362729
4710598.74467368911926.25532631088082
48106101.3664858832944.63351411670573
499698.7245163533632-2.72451635336317
5010497.43678118419356.56321881580647
519692.8892761714473.11072382855301
528591.4800289150223-6.48002891502232
539194.2741655201472-3.27416552014725
549888.58123072810749.41876927189264
557382.3381903051804-9.33819030518038
567070.1580679263133-0.158067926313279
576267.2101684585941-5.21016845859411
586061.102021148952-1.10202114895200
597058.944847066973711.0551529330263
608263.425236803629618.5747631963704
617269.43338694084862.56661305915139
627372.54491293119420.455087068805838
636866.45811673953941.54188326046064
645363.8455425495228-10.8455425495228
656161.7379184546695-0.737918454669504
667359.669320488325213.3306795116748
674656.7766086813169-10.7766086813169
685046.72327952102313.27672047897689
695245.90897015305456.09102984694554
704548.2520618502894-3.25206185028943
715847.261413023906910.7385869760931
727353.415358351795519.5846416482045
735859.525784897736-1.52578489773599
744960.572620874895-11.572620874895
754449.4320353622459-5.43203536224589
763541.9761871672008-6.97618716720078
774641.55403339166034.4459666083397
786144.442297426152916.5577025738471
792942.7666858290369-13.7666858290369
803333.7033191132543-0.703319113254338
813731.41063394446635.58936605553374
823132.475571950384-1.47557195038399
834433.516252886935910.4837471130641
845740.163547386507316.8364526134927
854243.5059419744658-1.50594197446578
863442.6721193844814-8.67211938448144
872735.1708476984624-8.17084769846244
882227.0296209699263-5.02962096992629
893027.35119595170692.64880404829310
904729.616491869505517.3835081304945
911227.7540167311256-15.7540167311256
921318.6342160669002-5.63421606690021
931813.77162706384914.22837293615093
941113.5886758044485-2.58867580444850
952611.970521855092514.0294781449075
964119.640674155944821.3593258440552
972125.9952352375190-4.99523523751904
982421.93054447887222.06945552112780
993021.43642811734178.56357188265828
1003424.64243802788539.3575619721147
1014838.78653675043519.21346324956492
1026452.08356299107811.916437008922
1033534.74715092569280.252849074307171
1044442.83445279487531.16554720512467
1055551.42613907297953.57386092702050
1065348.25970993854734.74029006145269
1077372.15261726656780.847382733432212
1089479.374921626744814.6250783732552
1097365.24231945913327.75768054086677
1107874.86832412574623.13167587425376
1118778.9483506744888.05164932551202
1128781.63280939374195.36719060625806
11391110.822142408706-19.8221424087059
114104118.864830003997-14.8648300039972
1157362.958471404143110.0415285958569
1168485.1059561337918-1.10595613379181
117103100.8858628473172.11413715268318
11811192.69672795288418.3032720471161
119131144.705635126675-13.7056351266745
120155153.5499400158221.4500599841777


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121113.160167846310100.882829002242125.437506690379
122119.191249417548103.011611990825135.370886844272
123122.860746197940103.174515090349142.546977305532
124118.07043928339296.0733979277513140.067480639033
125145.862307720869116.524862847368175.199752594370
126175.438910078245137.800668843947213.077151312543
127104.95780390651878.905076171792131.010531641243
128125.75566806475492.3688327937673159.142503335740
129150.286273132161108.078689547376192.493856716946
130139.29854958995497.5094619666208181.087637213287
131184.209649024615126.568799455319241.850498593910
132209.099935895541141.799453764276276.400418026806
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/11/t1278864170rpzuyid9690txa8/1r9541278864082.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/11/t1278864170rpzuyid9690txa8/1r9541278864082.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/11/t1278864170rpzuyid9690txa8/2104p1278864082.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/11/t1278864170rpzuyid9690txa8/2104p1278864082.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/11/t1278864170rpzuyid9690txa8/3104p1278864082.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/11/t1278864170rpzuyid9690txa8/3104p1278864082.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
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=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