Home » date » 2010 » Jun » 02 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 02 Jun 2010 11:48:14 +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/Jun/02/t1275479417l96mp1zlr49pc9n.htm/, Retrieved Wed, 02 Jun 2010 13:50:21 +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/Jun/02/t1275479417l96mp1zlr49pc9n.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 «
127,87 127,94 122,44 120,25 118,13 114,93 112,57 110,81 109,02 106,39 103,75 102,60 101,63 100,00 97,98 96,56 94,32 91,79 89,61 86,83 83,94 81,41 80,47 79,24 78,23 74,60 70,14 65,15 59,92 55,67 52,20 49,97 47,83 44,66 40,91 36,28 32,20 30,10 28,55 27,36 26,33 25,38 24,69 24,01 23,05 22,15 21,26 20,81 20,52 20,32 20,26 20,02 19,76 19,15 18,63 18,73 18,48 18,53 18,37 16,80 16,94 17,21 15,26 14,99 15,80 4,71 4,65 4,50
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.129014448423179
gamma2.56496888259109e-14


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13101.63113.672174302484-12.0421743024838
1410098.3854000541891.61459994581089
1597.9896.66209921815131.31790078184866
1696.5695.4462319886791.113768011321
1794.3293.2761151150311.04388488496906
1891.7990.81847270402910.971527295970887
1989.6187.67654618354451.93345381645551
2086.8387.4766585208546-0.646658520854558
2183.9484.5226792203938-0.582679220393757
2281.4180.77600658545460.63399341454543
2380.4778.30964295497862.16035704502141
2479.2478.77322004010010.466779959899881
2578.2377.70540691220230.524593087797655
2674.676.277301457744-1.67730145774398
2770.1472.1979065027617-2.05790650276172
2865.1567.9223532678424-2.77235326784243
2959.9261.9451427862315-2.02514278623153
3055.6756.2470571238373-0.577057123837342
3152.251.51688323399720.683116766002762
3249.9749.16794650617190.802053493828105
3347.8346.98076516156940.849234838430561
3444.6644.51221239017050.147787609829479
3540.9141.372090749097-0.462090749097008
3636.2838.1410288239702-1.86102882397022
3732.233.265134134704-1.06513413470397
3830.128.80500728766531.29499271233467
3928.5526.77506289332801.77493710667197
4027.3625.62305225421511.73694774578493
4126.3324.40262781571121.92737218428882
4225.3823.53496443876721.84503556123281
4324.6922.64461086264652.04538913735349
4424.0122.69059169630921.31940830369079
4523.0522.15188033876450.898119661235519
4622.1521.09894184286011.05105815713993
4721.2620.33715389791610.922846102083863
4820.8119.86032538139240.94967461860763
4920.5219.55074450371730.969255496282724
5020.3219.25564089035341.06435910964662
5120.2619.13191565938761.12808434061241
5220.0219.34596193469690.674038065303144
5319.7619.00869837199090.751301628009081
5419.1518.77292831050540.377071689494571
5518.6318.06170948918980.568290510810204
5618.7317.97491064484970.755089355150297
5718.4818.15554743030800.324452569692035
5818.5317.77675237410090.753247625899107
5918.3717.91553907378770.454460926212253
6016.818.0712783598503-1.27127835985025
6116.9416.34769168006320.592308319936777
6217.2116.46207711276010.74792288723987
6315.2616.7785493403617-1.51854934036171
6414.9914.72982043844970.260179561550283
6515.814.35454908583811.44545091416191
664.7115.2890253348108-10.5790253348108
674.652.887415748222191.76258425177781
684.53.137812235502011.36218776449799


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
693.15453720120978-1.738566077837348.04764048025691
701.78273530557923-5.57285980821699.13833041937534
710.426634442942795-9.114558499711619.9678273855972
72-0.924958824678932-12.695102450222410.8451848008645
73-2.30107192827578-16.329330729142711.7271868725911
74-3.68076902624497-19.924915598638212.5633775461482
75-5.05472174846452-23.508315847271913.3988723503428
76-6.47285116523605-27.310561483360114.3648591528880
77-7.83840903211632-30.929448154604415.2526300903717
78-9.16146505824447-34.450681251689016.1277511352
79-10.3769578920506-37.661565307671916.9076495235708
80-11.7782884699307-41.420930881268217.8643539414067
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275479417l96mp1zlr49pc9n/1idw71275479291.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275479417l96mp1zlr49pc9n/1idw71275479291.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275479417l96mp1zlr49pc9n/2t4es1275479291.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275479417l96mp1zlr49pc9n/2t4es1275479291.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/02/t1275479417l96mp1zlr49pc9n/3t4es1275479291.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/02/t1275479417l96mp1zlr49pc9n/3t4es1275479291.ps (open in new window)


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