Home » date » 2010 » Jan » 19 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 19 Jan 2010 15:24:14 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/19/t1263939934h1xfnpvnwc5amfv.htm/, Retrieved Tue, 19 Jan 2010 23:25:39 +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/Jan/19/t1263939934h1xfnpvnwc5amfv.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 «
161.88 162.05 162.16 162.61 162.53 162.53 162.53 162.53 162.83 161.61 161.79 161.79 161.79 161.79 161.85 161.77 161.86 161.89 161.89 161.89 162.18 162.43 162.58 162.57 162.57 162.57 162.44 162.79 163.15 163.23 163.23 163.23 163.38 163.71 163.73 163.73 163.73 163.73 163.93 164.27 164.57 164.73 164.73 164.76 165.75 165.86 165.99 166.13 166.13 166.13 166.15 166.45 166.48 166.51 166.51 166.51 166.58 166.82 167.35 167.5 167.5 167.6 167.72 167.29 166.98 166.98 166.98 166.98 167.63 167.83 167.85 167.87 167.87 167.96 167.7 169.25 168.79 168.77 168.77 169 168.92 169.23 169.28 169.29 169.29 170.29 170.59 171.98 172.31 172.28 172.28 172.45 172.27 172.65 172.08 172.2 172.2 172.2 172.36 172.53 173.18 173.17 173.17 173.17 173.4 174.47 174.56 174.59 174.59 175.22 175.3 175.25 175.54 175.58 175.58 175.68 176.05 176.4 176.58 176.49
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.752503278433036
beta0.0380281280298083
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13161.79162.070066773504-0.280066773504331
14161.79161.872791520583-0.0827915205832994
15161.85161.882014022659-0.0320140226591263
16161.77161.7276973024710.0423026975287542
17161.86161.7405147041700.119485295829747
18161.89161.7564981567930.133501843207085
19161.89162.237682768199-0.347682768198950
20161.89161.945991657381-0.0559916573813553
21162.18162.181363456848-0.00136345684839512
22162.43160.96197080591.46802919409987
23162.58162.3053104927330.274689507267198
24162.57162.570185414485-0.000185414485059709
25162.57162.5576451423230.0123548576772805
26162.57162.673035602884-0.103035602884120
27162.44162.722804819364-0.282804819364173
28162.79162.4341968330750.355803166924517
29163.15162.7470345125090.402965487491315
30163.23163.0329266465950.197073353405301
31163.23163.497796453228-0.267796453228129
32163.23163.395637739183-0.165637739182699
33163.38163.616108228195-0.236108228195491
34163.71162.6311091313581.07889086864171
35163.73163.4225074970870.307492502913021
36163.73163.6812090434740.0487909565259201
37163.73163.747201754240-0.0172017542402898
38163.73163.849520633067-0.119520633066571
39163.93163.8796494044720.050350595528073
40164.27164.0465859012960.223414098703728
41164.57164.3144749666890.255525033311045
42164.73164.4772429226060.252757077393738
43164.73164.909337497808-0.179337497807893
44164.76164.941936088549-0.181936088548639
45165.75165.1751421069440.574857893055906
46165.86165.1915037886180.668496211382006
47165.99165.5370644380650.452935561935249
48166.13165.8992507947970.230749205203182
49166.13166.149107891066-0.0191078910658575
50166.13166.287887448449-0.157887448448946
51166.15166.393308361539-0.243308361538595
52166.45166.435815473790.0141845262098172
53166.48166.601935870345-0.121935870344544
54166.51166.516906587067-0.00690658706668046
55166.51166.676159190015-0.166159190015321
56166.51166.747906249489-0.237906249488674
57166.58167.154571800821-0.574571800820991
58166.82166.3245398648920.495460135108402
59167.35166.4769689134720.873031086527845
60167.5167.1027388784870.397261121513253
61167.5167.4232736225850.0767263774152411
62167.6167.609779414124-0.00977941412364203
63167.72167.819707133685-0.0997071336846886
64167.29168.052309041777-0.762309041776575
65166.98167.596511520489-0.616511520489212
66166.98167.149714278442-0.169714278442115
67166.98167.124312579372-0.144312579372269
68166.98167.172640808570-0.192640808569678
69167.63167.5092391469990.120760853001485
70167.83167.4663685649850.363631435014867
71167.85167.6083630649420.241636935058409
72167.87167.6185066034000.251493396600239
73167.87167.7230992756310.146900724369345
74167.96167.9160896403780.0439103596216057
75167.7168.120786723988-0.420786723988186
76169.25167.9152197298431.33478027015667
77168.79169.10102045958-0.311020459580106
78168.77169.030876376209-0.260876376208614
79168.77168.976742297021-0.206742297021179
80169168.9979249338410.00207506615905118
81168.92169.595979589385-0.675979589385435
82169.23169.0282352281130.201764771886957
83169.28169.0281656139550.251834386045488
84169.29169.0586483422010.231351657798712
85169.29169.1318476971860.158152302814159
86170.29169.3177868631280.97221313687183
87170.59170.1425601368610.447439863138641
88171.98171.0862153077580.893784692242264
89172.31171.5815972128470.728402787153328
90172.28172.384539543148-0.104539543148036
91172.28172.544427747400-0.264427747399623
92172.45172.655213059747-0.20521305974691
93172.27173.004864152603-0.734864152603336
94172.65172.683760494379-0.0337604943787824
95172.08172.585822229125-0.505822229124533
96172.2172.0863879588190.113612041180943
97172.2172.0947934911640.105206508835892
98172.2172.482775274142-0.28277527414167
99172.36172.2377799887840.122220011215518
100172.53173.04236245027-0.512362450269876
101173.18172.3936312389840.786368761015837
102173.17172.9906501274690.179349872531247
103173.17173.289325572315-0.119325572315148
104173.17173.492839805206-0.322839805206229
105173.4173.58840705326-0.188407053259908
106174.47173.8331901619290.636809838071315
107174.56174.1233689255410.436631074459001
108174.59174.5137557120870.0762442879128287
109174.59174.5182061243980.071793875602026
110175.22174.8103090048810.409690995118751
111175.3175.2317361118720.0682638881279729
112175.25175.88221956009-0.632219560089851
113175.54175.5048575568050.0351424431949567
114175.58175.404974041620.175025958379905
115175.58175.644983847259-0.064983847259299
116175.68175.859085673376-0.179085673375710
117176.05176.120278124767-0.070278124767043
118176.4176.685750608855-0.285750608854613
119176.58176.2333142599170.346685740083132
120176.49176.4654066734710.0245933265290148


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121176.426994380779175.644288517035177.209700244523
122176.743752364600175.750564381066177.736940348134
123176.755711529035175.577532508447177.933890549623
124177.162833325453175.814248094876178.511418556030
125177.425854805415175.916167856869178.935541753961
126177.33260783522175.668117873330178.997097797111
127177.374960436864175.560076989025179.189843884704
128177.605034633421175.642897195861179.567172070981
129178.028355560677175.921207162871180.135503958484
130178.595831337892176.345258428167180.846404247617
131178.525573811711176.132667872911180.918479750512
132178.417771022660175.883241686965180.952300358355
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263939934h1xfnpvnwc5amfv/1235m1263939851.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263939934h1xfnpvnwc5amfv/1235m1263939851.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/19/t1263939934h1xfnpvnwc5amfv/29j181263939851.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263939934h1xfnpvnwc5amfv/29j181263939851.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/19/t1263939934h1xfnpvnwc5amfv/3bhmn1263939851.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/19/t1263939934h1xfnpvnwc5amfv/3bhmn1263939851.ps (open in new window)


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