Home » date » 2011 » Jan » 05 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 05 Jan 2011 21:32:04 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/05/t1294263055718vg6pwscaku7n.htm/, Retrieved Wed, 05 Jan 2011 22:30:58 +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/2011/Jan/05/t1294263055718vg6pwscaku7n.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13.2 13.8 16.2 14.7 13.9 16.0 14.4 12.3 15.9 15.9 15.5 15.1 14.5 15.1 17.4 16.2 15.6 17.2 14.9 13.8 17.5 16.2 17.5 16.6 16.2 16.6 19.6 15.9 18.0 18.3 16.3 14.9 18.2 18.4 18.5 16.0 17.4 17.2 19.6 17.2 18.3 19.3 18.1 16.2 18.4 20.5 19.0 16.5 18.7 19.0 19.2 20.5 19.3 20.6 20.1 16.1 20.4 19.7 15.6 14.4 13.9 14.3 15.3 14.4 13.8 15.7 14.7 12.5 16.2 16.1 16 15.8 15.2
 
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' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.582791898887054
beta0.00347774327083311
gamma0.116580657647063


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1314.513.82457264957270.675427350427348
1415.114.84137006604560.258629933954428
1517.417.26995218269420.13004781730579
1616.216.1738612644130.0261387355869864
1715.615.6005992864237-0.000599286423735634
1817.217.16175339118030.0382466088197368
1914.915.6747907539062-0.774790753906244
2013.813.12075951510790.679240484892132
2117.517.1196692547020.380330745297961
2216.217.3368143408135-1.1368143408135
2317.516.24664213197621.25335786802377
2416.616.5644832298790.0355167701209567
2516.216.05550008933470.144499910665335
2616.616.7447002532945-0.144700253294545
2719.618.93324862218880.666751377811167
2815.918.1472558569398-2.24725585693984
291816.24553535225291.75446464774715
3018.318.8327309857767-0.532730985776716
3116.316.9736202258681-0.673620225868053
3214.914.54963497533340.350365024666553
3318.218.3420365847266-0.142036584726583
3418.418.17959630024990.22040369975009
3518.517.99804229962910.501957700370866
361617.8186050821708-1.81860508217076
3717.416.23046302758361.16953697241637
3817.217.5011653171813-0.301165317181258
3919.619.6358627574372-0.0358627574371972
4017.218.29510341128-1.09510341127996
4118.317.25826434278181.04173565721818
4219.319.3161762735339-0.0161762735339046
4318.117.74963824539870.350361754601259
4416.215.97268326050310.227316739496899
4518.419.6696311718359-1.26963117183587
4620.518.86558847060911.63441152939095
471919.5225890848276-0.522589084827615
4816.518.6318972722187-2.13189727221875
4918.717.0045859395441.69541406045605
501918.50937482453880.490625175461176
5119.221.1191723288922-1.91917232889216
5220.518.62624565202931.8737543479707
5319.319.4265125352652-0.126512535265228
5420.620.7527032177003-0.15270321770025
5520.119.1247289732620.975271026738046
5616.117.7075506635883-1.60755066358832
5720.420.2601939889020.139806011097978
5819.720.4195148989846-0.71951489898462
5915.619.5956893368729-3.99568933687291
6014.416.5915255088486-2.19152550884863
6113.915.1043935904871-1.20439359048713
6214.314.84349772677-0.543497726769987
6315.316.7142107939444-1.41421079394438
6414.414.6818796255207-0.281879625520743
6513.814.1060278328726-0.30602783287258
6615.715.30341785088110.396582149118949
6714.714.02863208644260.671367913557376
6812.512.28630781367760.21369218632241
6916.215.96662724813820.233372751861753
7016.116.1201536546898-0.0201536546897678
711615.52745130782050.472548692179469
7215.815.20703727895030.59296272104967
7315.215.388283898882-0.188283898882037


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7415.751361740887513.633511410830417.8692120709446
7517.897220651017615.443790986577420.3506503154578
7616.74777102698613.997499119037819.4980429349343
7716.339209360249813.319381183211219.3590375372884
7817.753931492924114.48507023518521.0227927506631
7916.265389961430212.763632184453919.7671477384065
8014.11218052406210.390627100010817.8337339481133
8117.671129232446713.740677877813321.6015805870801
8217.678053890154313.547943931780221.8081638485284
8317.122839146495312.801024945275721.4446533477149
8416.533704516350812.027121124647221.0402879080543
8516.330997070653511.645755054680621.0162390866264
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/05/t1294263055718vg6pwscaku7n/1ymcz1294263122.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/05/t1294263055718vg6pwscaku7n/1ymcz1294263122.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/05/t1294263055718vg6pwscaku7n/28y5w1294263122.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/05/t1294263055718vg6pwscaku7n/28y5w1294263122.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/05/t1294263055718vg6pwscaku7n/39sf41294263122.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/05/t1294263055718vg6pwscaku7n/39sf41294263122.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