Home » date » 2010 » May » 31 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 31 May 2010 18:05:52 +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/May/31/t1275329183gjbby2pilkdp70l.htm/, Retrieved Mon, 31 May 2010 20:06:23 +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/May/31/t1275329183gjbby2pilkdp70l.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
132.8 132.5 131.4 131.4 130.7 131.5 131.2 130.1 130.5 129 128.2 128.4 127.3 127.7 127 123.9 125.4 124.6 124.5 124.8 124.1 124.2 122.8 122.3 121.1 121.7 122.2 122.2 122.7 121.7 121 119.8 120.2 116.6 116 118 117.1 116.2 113.3 114.3 113.6 113 112.9 112.7 112.5 113 111.9 110.9 109.8 108.3 109.2 109.2 108.7 109.8 110.8 110 109.6 109.5 110.8 111.6 113.1 114.3 114.1 113.8 112.6 112.7 111.5 110.7 110.4 109.7 110 111.3 109 108.2 107.2 108.7 110.3 110.3 109.5 109.5 109.4 109.6 111.3 110 109.5 110.693 109.195 108.095 108.199 106.87 105.278 108.711 111.192 109.641 109.42 109.935 111.126 110.733 110.34 111.766 111.294 111.54 112.008 111.007 114.963 112.045 110.703 108.894 107.51 111.35 112.964 115.203 115.182 115.191 112.346 110.774 113.07 111.138 109.092 107.971 107.051
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.815582747009687
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13127.3130.810637626263-3.51063762626266
14127.7128.847422147280-1.14742214727978
15127127.699104440422-0.699104440421593
16123.9124.495593587123-0.595593587122551
17125.4125.934837733236-0.534837733235804
18124.6125.177799972226-0.577799972225591
19124.5126.031556283656-1.53155628365568
20124.8124.1116120692990.688387930701452
21124.1125.456382722162-1.35638272216170
22124.2123.3459737089580.85402629104209
23122.8123.775836150758-0.975836150757843
24122.3123.688294355625-1.38829435562475
25121.1121.375269950793-0.275269950793131
26121.7122.486582235014-0.786582235014251
27122.2121.7152368549980.484763145001978
28122.2119.4963571663352.70364283366544
29122.7123.637606043225-0.937606043225358
30121.7122.544154419449-0.8441544194486
31121123.004787520158-2.00478752015819
32119.8121.108280087767-1.30828008776702
33120.2120.447511766465-0.247511766465024
34116.6119.649116331588-3.04911633158767
35116116.558184786386-0.558184786385723
36118116.7352078291851.26479217081528
37117.1116.7912559248920.308744075108322
38116.2118.284585165773-2.08458516577342
39113.3116.689069012447-3.38906901244653
40114.3111.7199583482562.58004165174394
41113.6115.088891118331-1.48889111833141
42113113.563054990359-0.563054990358609
43112.9114.038907167466-1.13890716746577
44112.7112.977044799074-0.277044799074119
45112.5113.352958167211-0.85295816721127
46113111.5441068757811.45589312421889
47111.9112.586754070804-0.686754070803559
48110.9112.995106626148-2.09510662614763
49109.8110.134567467816-0.334567467816143
50108.3110.661851709232-2.36185170923171
51109.2108.5996324191640.600367580836476
52109.2107.9850444022291.21495559777104
53108.7109.490255134441-0.790255134440912
54109.8108.7049546168091.09504538319072
55110.8110.4269277747630.373072225236996
56110110.757152003328-0.757152003328429
57109.6110.635289857648-1.03528985764846
58109.5109.1035239979930.396476002006708
59110.8108.8869877564191.91301224358060
60111.6111.1559403545340.444059645466282
61113.1110.6909751944812.40902480551919
62114.3113.0820197680251.21798023197465
63114.1114.485733990629-0.385733990628566
64113.8113.1802391790120.619760820988191
65112.6113.830223865268-1.23022386526817
66112.7113.033774384073-0.333774384072896
67111.5113.457282484737-1.95728248473745
68110.7111.678476769940-0.978476769939817
69110.4111.324812544079-0.92481254407933
70109.7110.14719240207-0.447192402070058
71110109.5222502136650.477749786334726
72111.3110.3497273113020.950272688698092
73109110.659994252659-1.65999425265876
74108.2109.512767916658-1.31276791665766
75107.2108.556695040696-1.35669504069567
76108.7106.6447317396802.05526826031985
77110.3108.1243224327462.17567756725407
78110.3110.2709881486980.0290118513019877
79109.5110.690975539655-1.19097553965483
80109.5109.717665209314-0.217665209314490
81109.4109.994402375143-0.594402375142565
82109.6109.1743404609170.425659539083128
83111.3109.4318565539711.86814344602901
84110111.480456107635-1.48045610763479
85109.5109.3268843211460.173115678853534
86110.693109.7387453457100.95425465428987
87109.195110.623516046148-1.42851604614764
88108.095109.282201671490-1.18720167148965
89108.199108.1394953840930.0595046159068033
90106.87108.164364756814-1.29436475681351
91105.278107.280042295072-2.00204229507204
92108.711105.8247351297692.88626487023123
93111.192108.5635072831772.62849271682262
94109.641110.560100017482-0.919100017482208
95109.42109.986872336927-0.566872336926934
96109.935109.4319754982640.50302450173568
97111.126109.2010434422931.92495655770674
98110.733111.185731167210-0.452731167209521
99110.34110.483564479264-0.14356447926437
100111.766110.2347369673811.53126303261907
101111.294111.539077739818-0.245077739817759
102111.54111.0658581275410.474141872459242
103112.008111.4933912129980.514608787002174
104111.007112.992109429676-1.98510942967562
105114.963111.7103351174253.25266488257519
106112.045113.561754594492-1.51675459449223
107110.703112.566047013531-1.86304701353136
108108.894111.151319907488-2.25731990748849
109107.51108.931327379251-1.42132737925061
110111.35107.7483570198913.60164298010902
111112.964110.4098836077282.55411639227209
112115.203112.6701051605822.53289483941819
113115.182114.4637716678730.718228332127353
114115.191114.9088443731570.282155626843348
115112.346115.187259586243-2.84125958624323
116110.774113.487998289697-2.71399828969705
117113.07112.5776907491740.492309250826281
118111.138111.298248559056-0.160248559056427
119109.092111.345021600161-2.25302160016095
120107.971109.539527225459-1.56852722545864
121107.051108.035473570529-0.984473570528891


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
122108.135116036053105.193744413258111.076487658848
123107.666022772661103.870427758045111.461617787277
124107.839237441642103.349090895417112.329383987867
125107.232462805545102.141658301524112.323267309567
126107.011341544320101.383627533306112.639055555334
127106.483623842636100.365941317255112.601306368017
128107.125114023127100.553895416738113.696332629516
129109.019595091960102.024183133787116.015007050132
130107.21829105195999.8229774713097114.613604632609
131107.00981659769199.235143778354114.784489417027
132107.16808034099099.0317167835196115.304443898460
133107.05198.5683538072768115.533646192723
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275329183gjbby2pilkdp70l/192771275329148.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275329183gjbby2pilkdp70l/192771275329148.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275329183gjbby2pilkdp70l/2kboa1275329148.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275329183gjbby2pilkdp70l/2kboa1275329148.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275329183gjbby2pilkdp70l/3kboa1275329148.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275329183gjbby2pilkdp70l/3kboa1275329148.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