Home » date » 2010 » Jan » 25 »

Exponential smoothing porto

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 25 Jan 2010 10:48:59 -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/25/t1264441784arxa7rbghz2ljjr.htm/, Retrieved Mon, 25 Jan 2010 18:49:49 +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/25/t1264441784arxa7rbghz2ljjr.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 «
8,2 8,21 8,22 8,2 8,18 8,2 8,19 8,24 8,31 8,27 8,36 8,32 8,29 8,27 8,27 8,43 8,46 8,48 8,46 8,46 8,43 8,4 8,38 8,3 8,39 8,53 8,52 8,54 8,62 8,52 8,49 8,44 8,31 8,26 8,21 8,03 7,89 7,83 7,85 7,84 7,88 8,01 8,08 8,11 8,11 8,07 8,06 7,95 7,95 8,07 8,17 8,21 8,2 8,19 8,18 8,16 8,17 8,17 8,19 8,01 8,04 8,13 8,14 8,17 8,25 8,27 8,27 8,26 8,24 8,21 8,25 8,06 8,16 8,32 8,43 8,39 8,41
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.731983554074229
beta0.0105744478801132
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
138.298.186006944444450.103993055555552
148.278.237800514821160.0321994851788414
158.278.263541606775490.00645839322451103
168.438.43424063279812-0.00424063279812081
178.468.47124199053114-0.0112419905311434
188.488.49928145292143-0.0192814529214296
198.468.352536916405310.107463083594688
208.468.49189909505162-0.0318990950516191
218.438.5506702082702-0.120670208270198
228.48.4264449669418-0.0264449669417992
238.388.49140302675327-0.111403026753266
248.38.361227555371-0.0612275553710102
258.398.305594298685840.0844057013141626
268.538.322601811398720.20739818860128
278.528.469835952423180.0501640475768159
288.548.67014709500729-0.13014709500729
298.628.612623768768230.007376231231774
308.528.65179412092145-0.131794120921455
318.498.455448263512410.0345517364875914
328.448.5023113035444-0.0623113035444032
338.318.51301578594351-0.203015785943512
348.268.35111819292922-0.0911181929292244
358.218.34281510871978-0.132815108719781
368.038.20709721161844-0.17709721161844
377.898.10146752619301-0.211467526193014
387.837.92836070374696-0.0983607037469643
397.857.800772348290620.0492276517093826
407.847.9431937847836-0.103193784783596
417.887.93358905066529-0.0535890506652912
428.017.881692684207540.128307315792455
438.087.913192303488580.166807696511417
448.118.024799424291840.0852005757081642
458.118.100806631308070.00919336869192833
468.078.1209131821462-0.0509131821461999
478.068.12785538262013-0.0678553826201291
487.958.0253127512322-0.075312751232203
497.957.98325779817257-0.033257798172567
508.077.970573445903860.0994265540961425
518.178.02851054546360.141489454536407
528.218.19952111724030.0104788827597098
538.28.28920411853051-0.089204118530514
548.198.26249998137135-0.0724999813713545
558.188.158287039257540.0217129607424589
568.168.141648411708420.0183515882915781
578.178.147667907649060.0223320923509380
588.178.160699771754740.00930022824526056
598.198.20706000895451-0.0170600089545108
608.018.13997682976858-0.129976829768578
618.048.06903374319487-0.0290337431948728
628.138.094889267692350.0351107323076523
638.148.116410316816870.0235896831831326
648.178.164483149219840.00551685078015929
658.258.222254875368490.0277451246315117
668.278.2849754035192-0.0149754035191947
678.278.247908142186090.0220918578139084
688.268.230436908681870.0295630913181295
698.248.24560761236589-0.00560761236588725
708.218.23435678726281-0.024356787262807
718.258.248416618458820.00158338154117921
728.068.16426178826803-0.104261788268026
738.168.138940397929210.0210596020707889
748.328.218787241759050.101212758240948
758.438.286249747159140.143750252840855
768.398.41900809662625-0.0290080966262494
778.418.45877221035183-0.0487722103518315


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
788.454747773090238.283809537001388.62568600917908
798.439407080456068.22678359097398.65203056993821
808.408426569676388.160366143094188.65648699625858
818.392961607734238.113320654538938.67260256092952
828.381264138194128.072706992822088.68982128356615
838.420767421074468.085263584610968.75627125753795
848.307735371650447.94680809234648.66866265095448
858.393777145332118.008643346205778.77891094445845
868.480985118790098.07264095952028.88932927805997
878.486272926436028.055549430717578.91699642215447
888.46690433148478.014505307868558.91930335510085
898.522227274748168.04875616253368.99569838696272
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264441784arxa7rbghz2ljjr/1iukj1264441736.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264441784arxa7rbghz2ljjr/1iukj1264441736.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264441784arxa7rbghz2ljjr/250ne1264441736.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264441784arxa7rbghz2ljjr/250ne1264441736.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264441784arxa7rbghz2ljjr/3gu5v1264441736.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264441784arxa7rbghz2ljjr/3gu5v1264441736.ps (open in new window)


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