Home » date » 2010 » Dec » 11 »

Exponential smoothing

*The author of this computation has been verified*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 11 Dec 2010 13:48:03 +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/Dec/11/t1292075190bor4n9stk7gg76z.htm/, Retrieved Sat, 11 Dec 2010 14:46:33 +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/Dec/11/t1292075190bor4n9stk7gg76z.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
16198,9 16554,2 19554,2 15903,8 18003,8 18329,6 16260,7 14851,9 18174,1 18406,6 18466,5 16016,5 17428,5 17167,2 19630 17183,6 18344,7 19301,4 18147,5 16192,9 18374,4 20515,2 18957,2 16471,5 18746,8 19009,5 19211,2 20547,7 19325,8 20605,5 20056,9 16141,4 20359,8 19711,6 15638,6 14384,5 13855,6 14308,3 15290,6 14423,8 13779,7 15686,3 14733,8 12522,5 16189,4 16059,1 16007,1 15806,8 15160 15692,1 18908,9 16969,9 16997,5 19858,9 17681,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' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.630243947316295
beta0
gamma0.749185747177312


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1317428.517045.0413728632383.458627136752
1417167.216972.2721121519194.927887848087
151963019575.053327454254.9466725458369
1617183.617148.428895740935.1711042591451
1718344.718304.741031810139.958968189876
1819301.419328.5706901423-27.1706901423095
1918147.517198.0131209586949.48687904144
2016192.916392.1964066868-199.296406686839
2118374.419641.4409798067-1267.04097980675
2220515.219100.26266510471414.93733489531
2318957.220065.7391167438-1108.53911674381
2416471.516943.7431418755-472.243141875519
2518746.818126.5805153514620.219484648616
2619009.518150.8023274469858.69767255308
2719211.221133.1434005877-1921.94340058765
2820547.717455.11781764783092.58218235222
2919325.820539.6710948882-1213.87109488816
3020605.520754.6859579458-149.185957945836
3120056.918817.77874336321239.12125663684
3216141.417876.2710324896-1734.87103248964
3320359.819861.9466991722497.853300827766
3419711.621176.0331323852-1464.43313238521
3515638.619627.7605115353-3989.16051153528
3614384.514866.5344813411-482.034481341103
3713855.616345.8305106622-2490.23051066216
3814308.314475.7723050423-167.472305042258
3915290.616041.0939917945-750.493991794543
4014423.814490.4709497192-66.6709497191696
4113779.714390.9677538183-611.267753818256
4215686.315280.7045054266405.595494573441
4314733.814078.0282055907655.771794409327
4412522.511945.0246842833577.475315716734
4516189.416006.5429259088182.857074091233
4616059.116578.5202246694-519.420224669355
4716007.114926.44647874781080.65352125218
4815806.814331.96995697631474.83004302370
491516016488.2656483216-1328.26564832162
5015692.115993.9698690558-301.869869055789
5118908.917313.08198961421595.81801038576
5216969.917430.6377850470-460.737785046964
5316997.516931.914342335365.5856576646911
5419858.918529.92121337391328.97878662613
5517681.217978.5044734271-297.304473427073


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
5615223.141028414912823.745377138517622.5366796913
5718811.393394731515975.223053832321647.5637356306
5819073.58410598715859.455154960322287.7130570137
5918192.117784939714640.021555238221744.2140146412
6017025.759111655413165.169734851420886.3484884594
6117476.049838251813329.857241721321622.2424347822
6218103.213461126713689.861474398822516.5654478547
6320138.267077974015473.029841778224803.5043141698
6418680.369443910713776.167043803323584.5718440182
6518617.823197700913485.770597380923749.8757980209
6620524.475171257815174.267081502525874.6832610131
6718684.971168926513125.160981976324244.7813558767
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292075190bor4n9stk7gg76z/1ogkg1292075280.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292075190bor4n9stk7gg76z/1ogkg1292075280.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292075190bor4n9stk7gg76z/2z7211292075280.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292075190bor4n9stk7gg76z/2z7211292075280.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292075190bor4n9stk7gg76z/3z7211292075280.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292075190bor4n9stk7gg76z/3z7211292075280.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