Home » date » 2009 » Dec » 16 »

*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: Wed, 16 Dec 2009 07:14:38 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/16/t12609729950uv9lhl5rvnij1i.htm/, Retrieved Wed, 16 Dec 2009 15:16:39 +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/2009/Dec/16/t12609729950uv9lhl5rvnij1i.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
19915 19843 19761 20858 21968 23061 22661 22269 21857 21568 21274 20987 19683 19381 19071 20772 22485 24181 23479 22782 22067 21489 20903 20330 19736 19483 19242 20334 21423 22523 21986 21462 20908 20575 20237 19904 19610 19251 18941 20450 21946 23409 22741 22069 21539 21189 20960 20704 19697 19598 19456 20316 21083 22158 21469 20892 20578 20233 19947 20049
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.598370702820769
beta0.0107745129481494
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131968319555.2445023852127.755497614751
141938119300.009799671880.9902003282441
151907119031.988064247939.0119357521253
162077220771.39656153160.603438468384411
172248522527.9424913596-42.942491359634
182418124273.0405170656-92.040517065554
192347922811.4104974059667.589502594074
202278222867.2479659161-85.2479659161218
212206722470.6351640011-403.635164001094
222148921991.6786582602-502.678658260164
232090321396.6514386398-493.651438639772
242033020766.0182017139-436.01820171385
251973619220.9352701911515.064729808906
261948319177.3644472700305.63555273004
271924219024.6391491622217.360850837838
282033420861.1049392308-527.104939230769
292142322260.2714793545-837.271479354516
302252323443.2061833741-920.206183374095
312198621830.7669769188155.233023081189
322146221303.4537869478158.546213052217
332090820936.7489180875-28.7489180874945
342057520641.1143367415-66.114336741528
352023720309.8613155447-72.8613155446583
361990419953.5953116783-49.5953116782694
371961019031.1261848107578.873815189312
381925118943.5175002801307.482499719870
391894118757.8803619225183.119638077493
402045020238.9907461483211.009253851709
412194621948.8905239335-2.89052393353268
422340923633.3330987482-224.333098748197
432274122850.0509888369-109.050988836931
442206922149.6809603769-80.6809603769252
452153921553.4840770882-14.4840770881929
462118921247.2876431217-58.2876431216646
472096020913.707999978846.2920000212107
482070420633.046880579470.9531194205738
491969720012.0874739407-315.087473940694
501959819273.8826648136324.117335186431
511945619043.5873658153412.412634184657
522031620700.0625314756-384.062531475611
532108321967.7457822828-884.745782282811
542215822990.6224750623-832.622475062348
552146921902.2384502922-433.238450292247
562089221036.8092259392-144.809225939214
572057820442.6467721509135.353227849053
582023320211.816500878621.1834991214419
591994719968.5491458151-21.5491458151373
602004919660.3160643856388.683935614412


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6119096.53044993618373.695048850519819.3658510215
6218804.401249925817963.127562570519645.6749372812
6318420.748506361217478.766839824319362.730172898
6419439.366226976718366.96238602920511.7700679244
6520661.468760245819452.335821043621870.6016994479
6622190.802392964820831.018259656323550.5865262732
6721758.231128307520341.306943334323175.1553132807
6821263.638122278819796.553826306822730.7224182508
6920864.882066261619345.813146100722383.9509864226
7020504.765246709718934.487290808522075.0432026110
7120230.365852765118606.163830533721854.5678749965
7220098.585504490118566.555875981021630.6151329992
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/16/t12609729950uv9lhl5rvnij1i/1iu5u1260972876.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t12609729950uv9lhl5rvnij1i/1iu5u1260972876.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t12609729950uv9lhl5rvnij1i/242tb1260972876.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t12609729950uv9lhl5rvnij1i/242tb1260972876.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t12609729950uv9lhl5rvnij1i/3ojki1260972876.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t12609729950uv9lhl5rvnij1i/3ojki1260972876.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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