Home » date » 2010 » Aug » 15 »

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, 15 Aug 2010 13:34:13 +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/Aug/15/t1281879218q17g9ugb8huqey9.htm/, Retrieved Sun, 15 Aug 2010 15:33:43 +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/Aug/15/t1281879218q17g9ugb8huqey9.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:
Sebastien Delforge
 
Dataseries X:
» Textbox « » Textfile « » CSV «
75 74 73 71 91 90 75 65 66 66 67 69 75 79 75 77 100 100 94 83 83 83 84 88 89 98 94 84 111 98 98 83 79 78 80 94 98 104 94 90 115 104 114 99 96 98 104 111 117 125 117 118 151 145 155 133 124 125 131 133 136 141 130 137 177 183 191 166 156 153 164 164 168 173 164 165 205 207 215 190 169 175 188 188 196 201 194 197 237 236 244 222 195 199 207 204 212 222 214 217 258 256 251 223 198 206 214 212 227 238 228 235 275 278 278 251 225 232 238 239
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.582467316896955
beta0.00891834531619204
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
137571.5791174702093.42088252979096
147977.04174296496071.95825703503931
157573.87511025845851.12488974154145
167776.20551248570650.794487514293508
1710099.17248847702310.827511522976863
1810099.16911290350150.830887096498472
199486.82506687463147.17493312536855
208379.64024674372013.3597532562799
218383.547765386508-0.547765386508033
228383.8698614938643-0.869861493864306
238484.9372723263794-0.937272326379414
248887.03323293492510.966767065074876
258996.6679258409937-7.66792584099373
269895.49109266685682.50890733314324
279491.04089711938952.95910288061047
288494.4670000951766-10.4670000951766
29111114.002231882253-3.00223188225321
3098111.515075359236-13.5150753592364
319892.81167592303735.18832407696266
328382.47769951088910.52230048911089
337982.995508253576-3.99550825357606
347881.0633203144457-3.06332031444572
358080.6627344700765-0.662734470076529
369483.46638643580810.5336135641920
379894.89703856191553.10296143808446
38104104.739779441506-0.739779441506158
399498.069994250363-4.06999425036301
409091.3143922810225-1.31439228102251
41115121.363623452776-6.36362345277631
42104111.628450526258-7.62845052625785
43114103.66537714940110.3346228505994
449992.43459996256166.56540003743835
459694.14018026103631.85981973896368
469896.00492107418561.99507892581435
47104100.0005357700013.99946422999894
48111111.851768129400-0.851768129399588
49117113.7864731350193.21352686498066
50125123.1029469230991.89705307690106
51117114.9135410721802.08645892781986
52118111.9968201211696.00317987883086
53151152.048150724256-1.04815072425623
54145142.4625688117542.53743118824551
55155148.9436300740486.05636992595183
56133127.0075570262115.9924429737887
57124124.972449397232-0.972449397231827
58125125.350525044817-0.350525044816536
59131129.6554800300221.34451996997751
60133139.703546686813-6.7035466868129
61136140.687307443733-4.68730744373258
62141145.939995819250-4.93999581924956
63130132.380154852621-2.38015485262147
64137127.9940010895789.00599891042238
65177171.0379583763275.96204162367269
66183165.71458428869217.2854157113084
67191183.4136725712527.58632742874761
68166156.7428932544859.25710674551544
69156151.7425668950544.25743310494568
70153155.612386256077-2.61238625607706
71164160.4071964454083.59280355459228
72164169.611598706644-5.61159870664358
73168173.346368825837-5.346368825837
74173179.921105711391-6.92110571139114
75164163.7744304568260.225569543173833
76165165.823052935499-0.823052935498822
77205209.226785901903-4.22678590190284
78207201.3887141605935.61128583940683
79215208.4300033503386.5699966496615
80190178.21572443912211.7842755608785
81169171.021462214153-2.02146221415273
82175168.1097141857536.89028581424708
83188182.0103310400535.98966895994653
84188189.033257888467-1.03325788846652
85196196.448183339317-0.448183339317040
86201206.546299973469-5.54629997346905
87194192.4831848740361.51681512596366
88197195.0104817497471.98951825025298
89237246.507635701937-9.50763570193737
90236239.313466768335-3.31346676833502
91244241.9814393520662.01856064793424
92222206.7996019473515.2003980526502
93195193.0481495206511.95185047934939
94199196.2954227925572.70457720744298
95207208.467525120273-1.46752512027308
96204208.164704095828-4.16470409582845
97212214.661651522177-2.66165152217744
98222221.8974011948900.10259880510975
99214213.1382301074850.861769892514872
100217215.5516771571621.44832284283794
101258266.180957549843-8.18095754984313
102256262.297655250605-6.29765525060452
103251265.966797634245-14.9667976342448
104223224.309114938151-1.30911493815077
105198195.0728156105042.92718438949615
106206199.0807991116616.91920088833854
107214212.0127446602101.98725533978958
108212212.431008420139-0.431008420138539
109227221.9790804050855.02091959491511
110238235.3299199062292.67008009377139
111228227.7027359634540.297264036545982
112235230.0595367862224.94046321377769
113275281.870930309566-6.87093030956606
114278279.503066021618-1.50306602161754
115278282.328962909445-4.32896290944456
116251249.3574581061181.64254189388222
117225220.2573628977084.74263710229155
118232227.359534053414.6404659465901
119238237.6252458163830.374754183617227
120239235.8240671545343.17593284546595


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121251.1088672358240.52074376064261.69699071096
122261.464424671384249.070684296064273.858165046704
123250.203866503083236.587899360919263.819833645247
124254.614317446025239.510934443462269.717700448589
125302.133271215603283.957250309501320.309292121705
126306.290578728036286.870341332535325.710816123537
127308.955498146876288.403364221524329.507632072229
128277.805810956971257.919400928858297.692220985084
129245.87418933481226.758238921605264.990139748015
130250.464546900181230.061061653823270.868032146540
131256.615329917521234.853633299169278.377026535872
132255.597555892736234.521485435768276.673626349703
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281879218q17g9ugb8huqey9/1s2gy1281879251.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281879218q17g9ugb8huqey9/1s2gy1281879251.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/15/t1281879218q17g9ugb8huqey9/2lbg01281879251.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281879218q17g9ugb8huqey9/2lbg01281879251.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/15/t1281879218q17g9ugb8huqey9/3lbg01281879251.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/15/t1281879218q17g9ugb8huqey9/3lbg01281879251.ps (open in new window)


 
Parameters (Session):
 
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