Home » date » 2010 » Dec » 22 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 21 Dec 2010 23:55:40 +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/22/t12929756396m121aanlku5qny.htm/, Retrieved Wed, 22 Dec 2010 00:53:59 +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/22/t12929756396m121aanlku5qny.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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
97 100.7 101.4 101.5 101.8 101.5 102.2 101.8 98.5 98.4 97.5 97.7 98.3 99.6 99.4 96.7 96.9 96.1 97.9 99.2 97.8 94.9 93.3 91.5 89.1 92.3 91.8 92.1 94.4 92.8 92.6 92.3 92.1 89.8 87.4 87.7 86.3 89.1 90.4 87.1 86.7 84.4 88.4 88.9 88.5 87.2 86.2 83.4 87.5 85.7 87.4 86.8 87.9 85.9 87.7 87 86.8 86.2 86.1 87.5 85.7 88.9 89.8 91.4 95.2 94.1 96.8 96.1 96.6 94.2 93.9 96.5 93.4 95 95.2 94 97 96.9 96.3 96.3 97.3 95.7 96.4 95.1 94.6 95.9 96.2 94.3 98.3 95.9 92.1 94.6 94.7 96.7 97.5 96.2 97.1 95.9 94.5 99.4 101.3 101.4 100.9 101.4 103.1 102.4 101.1 102 103.9 101.7 101.2 101.9 101.1 103.1 103.3 101.4 102.8 103 102.6 102.2
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time16 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.840013960810943
beta0.212264917034862
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3101.4104.4-3
4101.5105.045041636468-3.54504163646818
5101.8104.600140289904-2.80014028990354
6101.5104.281686077061-2.78168607706051
7102.2103.482743751354-1.28274375135366
8101.8103.714213647816-1.91421364781573
998.5103.073925205897-4.5739252058974
1098.499.3838859314774-0.983885931477374
1197.598.5340975006736-1.03409750067355
1297.797.45774538535950.242254614640473
1398.397.49674219448440.803257805515642
1499.698.15021479558441.44978520441560
1599.499.605284104439-0.205284104438945
1696.799.6334688041553-2.93346880415530
1796.996.84688666506160.0531133349383737
1896.196.5785456173235-0.478545617323505
1997.995.77827631474062.12172368525943
2099.297.54058451738991.6594154826101
2197.899.210430272496-1.41043027249603
2294.998.0500752697104-3.15007526971044
2393.394.866718456253-1.56671845625304
2491.592.7340489632144-1.23404896321439
2589.190.6607887790286-1.56078877902863
2692.388.03476537420054.26523462579949
2791.891.06319773113740.736802268862618
2892.191.25907354077880.840926459221194
2994.491.69235693145612.7076430685439
3092.894.1764959689413-1.37649596894133
3192.692.9844644037283-0.384464403728316
3292.392.5572010875426-0.25720108754264
3392.192.1909803667577-0.0909803667576625
3489.891.9481650727964-2.14816507279642
3587.489.5942562719425-2.19425627194252
3687.786.81038227246310.889617727536887
3786.386.7756292140407-0.475629214040708
3889.185.50924236291123.59075763708883
3990.488.29892905002542.10107094997457
4087.190.2118906157628-3.11189061576276
4186.787.191024496527-0.491024496526919
4284.486.2841701415937-1.88417014159373
4388.483.87109610805044.52890389194957
4488.987.652622238771.24737776122997
4588.588.9000349144654-0.400034914465351
4687.288.6922695204388-1.49226952043884
4786.287.300931955339-1.10093195533895
4883.486.0420211924863-2.64202119248627
4987.583.01748706248314.48251293751686
5085.786.7769177482957-1.07691774829574
5187.485.67432869308121.72567130691880
5286.887.2336502450063-0.433650245006334
5387.986.90178932640560.998210673594443
5485.987.9506980163406-2.05069801634055
5587.786.07283011925981.62716988074017
568787.5745559306639-0.574555930663905
5786.887.1243548437356-0.324354843735634
5886.286.826491912291-0.62649191229103
5986.186.1631226754615-0.0631226754615142
6087.585.96173634284841.53826365715162
6185.787.3798177471108-1.67981774711079
6288.985.79514511204273.10485488795734
6389.888.78327697200491.01672302799513
6491.490.19863621904721.20136378095282
6595.291.98330603838433.21669396161570
6694.196.0344355500285-1.93443555002848
6796.895.41362387216831.38637612783172
6896.197.8295388448611-1.72953884486112
6996.697.3196554621864-0.719655462186424
7094.297.5297696972706-3.32976969727063
7193.994.9536353057947-1.05363530579473
7296.594.10161661646142.3983833835386
7393.496.5769867524313-3.17698675243125
749593.80249394612851.19750605387151
7595.294.9161580767310.283841923269023
769495.3129421563963-1.31294215639633
779794.13430051734682.86569948265321
7896.996.9767461533741-0.076746153374117
7996.397.3338121154443-1.03381211544435
8096.396.7025949283216-0.402594928321633
8197.396.52982410323040.770175896769558
8295.797.4795237375567-1.77952373755669
8396.495.9701412245990.429858775400987
8495.196.3933170484664-1.29331704846638
8594.695.1383955885162-0.538395588516252
8695.994.4216198030241.47838019697609
8796.295.66256714406820.537432855931783
8894.396.2089328129547-1.90893281295470
8998.394.35994395907463.94005604092544
9095.998.1267210366629-2.22672103666287
9192.196.3162826820945-4.21628268209452
9294.692.08279840426142.51720159573861
9394.793.95436579797880.745634202021193
9496.794.47074252296692.22925747703312
9597.596.6308723665750.86912763342491
9696.297.8034443848026-1.60344438480264
9797.196.61311844595640.48688155404362
9895.997.2655091342532-1.36550913425320
9994.596.1183880031701-1.61838800317011
10099.494.47027761989994.92972238010013
101101.399.20166795829382.09833204170624
102101.4101.928795014574-0.528795014573788
103100.9102.354811610615-1.45481161061495
104101.4101.743560435568-0.343560435568207
105103.1102.0045170484491.09548295155136
106102.4103.669620825238-1.26962082523809
107101.1103.121624042702-2.02162404270229
108102101.5814673859130.41853261408734
109103.9102.1657030517761.73429694822367
110101.7104.164433801026-2.46443380102647
111101.2102.196750017638-0.99675001763815
112101.9101.2842150983620.615784901638278
113101.1101.836029854472-0.736029854472065
114103.1101.1210631764401.97893682355986
115103.3103.0395617184170.260438281583177
116101.4103.560935069876-2.16093506987580
117102.8101.6630144072871.13698559271344
118103102.7381239203570.261876079642676
119102.6103.124823168879-0.524823168878996
120102.2102.757105211451-0.557105211450988


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121102.26293496780998.4513573182622106.074512617355
122102.23674087942696.7967575475938107.676724211257
123102.21054679104395.1115043664934109.309589215592
124102.18435270266093.3604726500812111.008232755238
125102.15815861427791.532220204904112.784097023649
126102.13196452589389.6231952835992114.640733768188
127102.10577043751087.6330076489895116.578533226031
128102.07957634912785.5626452683782118.596507429877
129102.05338226074483.4137058242774120.693058697211
130102.02718817236181.1880370466166122.866339298106
131102.00099408397878.8875599124513125.114428255505
132101.97479999559576.514179868529127.435420122662
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/22/t12929756396m121aanlku5qny/1avub1292975722.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12929756396m121aanlku5qny/1avub1292975722.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12929756396m121aanlku5qny/2lmtw1292975722.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12929756396m121aanlku5qny/2lmtw1292975722.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t12929756396m121aanlku5qny/3lmtw1292975722.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t12929756396m121aanlku5qny/3lmtw1292975722.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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