Home » date » 2010 » Dec » 21 »

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: Tue, 21 Dec 2010 18:33:15 +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/21/t12929562625hikfqly6l1blr3.htm/, Retrieved Tue, 21 Dec 2010 19:31:03 +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/21/t12929562625hikfqly6l1blr3.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 «
1038.00 934.00 988.00 870.00 854.00 834.00 872.00 954.00 870.00 1238.00 1082.00 1053.00 934.00 787.00 1081.00 908.00 995.00 825.00 822.00 856.00 887.00 1094.00 990.00 936.00 1097.00 918.00 926.00 907.00 899.00 971.00 1087.00 1000.00 1071.00 1190.00 1116.00 1070.00 1314.00 1068.00 1185.00 1215.00 1145.00 1251.00 1363.00 1368.00 1535.00 1853.00 1866.00 2023.00 1373.00 1968.00 1424.00 1160.00 1243.00 1375.00 1539.00 1773.00 1906.00 2076.00 2004.00
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.389032955231208
beta0.0286225511594326
gamma0.689233804798979


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13934918.0726495726515.9273504273501
14787782.1123505837154.8876494162846
1510811080.120001960490.87999803951493
16908911.495010425234-3.49501042523389
179951005.67074573912-10.6707457391155
18825838.811063549857-13.811063549857
19822848.742573118919-26.7425731189189
20856928.928850993235-72.9288509932346
21887816.12674017060470.8732598293964
2210941204.34923810212-110.349238102125
23990994.841460579284-4.8414605792841
24936955.284108655832-19.2841086558321
251097834.55868680411262.44131319589
26918790.708583897266127.291416102734
279261136.8676451593-210.867645159301
28907883.88562477427723.1143752257228
29899985.54998548892-86.5499854889204
30971787.16186261572183.83813738428
311087870.05429339561216.94570660439
3210001029.8221541756-29.8221541755963
331071999.05272560692771.9472743930733
3411901316.10018296636-126.100182966362
3511161149.43838524672-33.4383852467192
3610701096.90005240976-26.9000524097585
3713141095.98725803912218.012741960885
381068981.58790141632586.4120985836752
3911851172.6363050747512.3636949252548
4012151110.70520145293104.294798547072
4111451204.3527485473-59.352748547295
4212511137.28919222821113.710807771793
4313631212.9442126035150.055787396498
4413681248.13399220433119.866007795674
4515351325.47804151983209.521958480171
4618531621.20571160027231.794288399727
4718661645.33839843436220.661601565638
4820231709.77799076074313.222009239262
4913731963.47512299638-590.475122996381
5019681489.28648777257478.713512227433
5114241816.29573481096-392.295734810956
5211601645.66934082907-485.669340829074
5312431444.33868958243-201.338689582428
5413751396.78294379575-21.7829437957541
5515391435.39063657518103.609363424823
5617731439.64051733905333.35948266095
5719061640.01406344116265.985936558845
5820761969.93512922857106.064870771429
5920041941.915141150762.0848588492952


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
601983.322669254581596.326742228292370.31859628088
611730.814674774651313.983144783062147.64620476623
621939.344389331341493.155573424062385.53320523862
631710.77618001721235.580649896652185.97171013775
641655.253589819081151.304524151442159.20265548673
651769.81107476871237.285765100022302.33638443738
661885.650778582881324.666318038212446.63523912755
671995.235196702781405.860206932552584.61018647301
682064.471345703371446.734925055652682.2077663511
692111.620275587091465.518948679812757.72160249437
702272.59378970271598.096988041282947.09059136412
712185.482448350681482.536890693612888.42800600775
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929562625hikfqly6l1blr3/1g9g31292956391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929562625hikfqly6l1blr3/1g9g31292956391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t12929562625hikfqly6l1blr3/2rjfo1292956391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929562625hikfqly6l1blr3/2rjfo1292956391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t12929562625hikfqly6l1blr3/3rjfo1292956391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t12929562625hikfqly6l1blr3/3rjfo1292956391.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
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