Home » date » 2008 » May » 28 »

exonential smoothing - Blazers - Wouter Dewachter

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 28 May 2008 04:12:49 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/28/t1211969619l78fnm5u2jqrz1p.htm/, Retrieved Wed, 28 May 2008 12:13:39 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
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
 
Text written by user:
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.792088674339765
beta0.000643553350096742
gamma0.0036999903249905


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13162.57161.9174097222220.652590277777733
14162.57162.4359805533380.134019446662421
15162.44162.4196989522070.0203010477933674
16162.79162.795852643753-0.00585264375331462
17163.15163.163370642374-0.0133706423742410
18163.23163.249926903731-0.0199269037311751
19163.23163.250863200289-0.0208632002891704
20163.23163.251047231904-0.0210472319038786
21163.38163.387324765307-0.00732476530654935
22163.71163.7011346419430.00886535805713606
23163.73163.7206897177260.0093102822736455
24163.73163.7197686255380.0102313744619664
25163.73163.87008435355-0.140084353550151
26163.73163.760364348663-0.0303643486632552
27163.93163.6136816128500.316318387150346
28164.27164.2243309502720.045669049728474
29164.57164.632722961873-0.0627229618733338
30164.73164.6802276554190.049772344580731
31164.73164.736451635245-0.00645163524529835
32164.76164.748138527390.0118614726100077
33165.75164.9105977691110.839402230889476
34165.86165.895639124375-0.0356391243746543
35165.99165.8804565198230.109543480176541
36166.13165.9594942849500.170505715049615
37166.13166.237292137517-0.107292137516879
38166.13166.15429386368-0.0242938636800147
39166.15166.0133522611250.136647738874558
40166.45166.482052801465-0.0320528014645731
41166.48166.829333704375-0.349333704374885
42166.51166.650292585988-0.140292585987766
43166.51166.556216921551-0.0462169215512915
44166.51166.536691884141-0.0266918841414281
45166.58166.669502013826-0.0895020138255234
46166.82166.917874147183-0.0978741471831768
47167.35166.8532542989880.496745701011832
48167.5167.2389815596360.261018440363614
49167.5167.588250059571-0.0882500595710383
50167.6167.5203985990960.0796014009036128
51167.72167.4619279782260.258072021774154
52167.29168.026792349542-0.73679234954173
53166.98167.815368529448-0.835368529448488
54166.98167.251013348965-0.271013348965113
55166.98167.052908792308-0.0729087923084819
56166.98167.011684014241-0.0316840142409376
57167.63167.1399166393680.490083360631701
58167.83167.847085810724-0.0170858107236143
59167.85167.8466765614730.00332343852730332
60167.87167.8408984252740.0291015747259848
61167.87168.005591427698-0.135591427697506
62167.96167.8997383033430.0602616966572214
63167.7167.825444129975-0.125444129974937
64169.25168.0849268001161.16507319988364
65168.79169.380005206888-0.590005206887895
66168.77169.010690647766-0.240690647765604
67168.77168.837029183226-0.0670291832256567
68169168.8007687150910.199231284908791
69168.92169.112701247907-0.192701247906655
70169.23169.278699398062-0.0486993980623822
71169.28169.2532940536900.0267059463102157
72169.29169.2660976558360.0239023441644122


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
73169.426583951341168.83655114721170.016616755472
74169.428389281117168.675499038626170.181279523609
75169.306296279952168.419825676588170.192766883317
76169.666275163672168.663729338761170.668820988583
77170.036708840292168.930070733496171.143346947089
78170.134846881687168.932981824095171.336711939278
79170.151937479338168.861746228513171.442128730163
80170.168979196005168.796029953869171.541928438140
81170.322704125917168.871612029975171.773796221859
82170.641450501419169.116121162256172.166779840581
83170.654703203403169.058497148905172.250909257901
84170.646363355463168.982211626098172.310515084829
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211969619l78fnm5u2jqrz1p/1nebp1211969563.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211969619l78fnm5u2jqrz1p/1nebp1211969563.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211969619l78fnm5u2jqrz1p/20gb21211969563.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211969619l78fnm5u2jqrz1p/20gb21211969563.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211969619l78fnm5u2jqrz1p/35hpz1211969563.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/28/t1211969619l78fnm5u2jqrz1p/35hpz1211969563.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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