Home » date » 2009 » Jun » 06 »

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 06 Jun 2009 09:28:21 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/06/t1244302126n8rgayd8nf6oy7u.htm/, Retrieved Sat, 06 Jun 2009 17:28:50 +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/2009/Jun/06/t1244302126n8rgayd8nf6oy7u.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 «
3851,3 3851,8 3854,1 3858,4 3861,6 3856,3 3855,8 3860,4 3855,1 3839,5 3833 3833,6 3826,8 3818,2 3811,4 3806,8 3810,3 3818,2 3858,9 3867,8 3872,3 3873,3 3876,7 3882,6 3883,5 3882,2 3888,1 3893,7 3901,9 3914,3 3930,3 3948,3 3971,5 3990,1 3993 3998 4015,8 4041,2 4060,7 4076,7 4103 4125,3 4139,7 4146,7 4158 4155,1 4144,8 4148,2 4142,5 4142,1 4145,4 4146,3 4143,5 4149,2 4158,9 4166,1 4179,1 4194,4 4211,7 4226,3 4235,8 4243,6 4258,7 4278,2 4298 4315,1 4334,3 4356 4374 4395,5 4417,8 4432,8 4446,3
 
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.94877810070843
beta0.264457573588829
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133826.83847.46652333828-20.6665233382782
143818.23812.586128237815.61387176218886
153811.43805.278156759026.12184324098416
163806.83801.103648744575.69635125542572
173810.33804.957561729775.34243827022692
183818.23813.582464895854.61753510415292
193858.93847.8870742731911.0129257268072
203867.83868.79801811904-0.99801811903717
213872.33868.911526897623.38847310238089
223873.33864.417565662218.88243433778916
233876.73876.84934061016-0.149340610159925
243882.63887.29222191269-4.69222191268636
253883.53881.37949053132.12050946870113
263882.23881.129507343671.07049265633032
273888.13880.022701128588.07729887142432
283893.73888.634250963815.06574903619139
293901.93902.80779413922-0.90779413922246
303914.33914.93366863109-0.633668631090586
313930.33953.44356592619-23.1435659261888
323948.33940.998099182877.30190081713363
333971.53950.7985169427420.7014830572607
343990.13968.6742869418621.4257130581386
3539934001.55741553316-8.55741553315966
3639984010.90624409420-12.9062440941962
374015.84002.2884323208413.5115676791561
384041.24020.2909593332320.9090406667701
394060.74050.774805978629.92519402138396
404076.74073.831878653412.86812134659067
4141034098.219280173744.7807198262617
424125.34130.01735958948-4.71735958948011
434139.74178.18844262100-38.4884426210047
444146.74162.46619561426-15.7661956142592
4541584154.496558340733.5034416592689
464155.14154.721888332810.378111667188932
474144.84159.828803484-15.0288034839996
484148.24155.24402569768-7.04402569768263
494142.54147.10663009876-4.60663009876225
504142.14137.276348666244.82365133376061
514145.44136.947108866918.45289113308718
524146.34142.967403521833.3325964781734
534143.54152.89200115352-9.39200115352196
544149.24152.21907764142-3.01907764141743
554158.94182.14579974345-23.2457997434476
564166.14167.60261032765-1.50261032764593
574179.14163.2387323129415.8612676870607
584194.44167.1796832672427.2203167327561
594211.74195.8616914135615.8383085864371
604226.34227.74430753045-1.44430753044799
614235.84233.044079606192.75592039380808
624243.64240.436647691673.16335230832556
634258.74247.9977574377210.7022425622763
644278.24265.7011693360212.4988306639816
6542984295.981622335032.01837766496828
664315.14321.82695392218-6.72695392218247
674334.34362.69599795859-28.3959979585907
6843564357.9570673634-1.95706736340071
6943744367.076872413946.92312758606477
704395.54373.2855472834022.2144527166038
714417.84405.8072624078611.9927375921388
724432.84441.84042947121-9.04042947120615
734446.34446.49322031745-0.193220317454688


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
744456.562365782114432.23056280184480.89416876242
754466.122374256874428.164465477464504.08028303627
764475.701359428324423.962059418434527.44065943822
774492.738706370144426.52830093894558.94911180139
784515.096135556114433.579590063404596.61268104882
794562.921119358794464.778976529414661.06326218817
804594.678280756234479.340068475314710.01649303716
814614.190858563734481.151371815694747.23034531176
824620.238158385184469.178868756434771.29744801392
834631.508586522244461.610705628624801.40646741586
844652.908991973864463.119750974934842.6982329728
854666.310488460464457.692043913344874.92893300759
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244302126n8rgayd8nf6oy7u/1x5901244302099.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244302126n8rgayd8nf6oy7u/1x5901244302099.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244302126n8rgayd8nf6oy7u/20au01244302099.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244302126n8rgayd8nf6oy7u/20au01244302099.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244302126n8rgayd8nf6oy7u/3c2x51244302099.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t1244302126n8rgayd8nf6oy7u/3c2x51244302099.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