Home » date » 2008 » May » 25 »

exponential smoothing

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 25 May 2008 13:19:29 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/25/t1211743263coelcalfoyczxbq.htm/, Retrieved Sun, 25 May 2008 21:21:07 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
16.100 15.800 16.900 17.800 17.600 18.300 18.000 15.700 14.500 14.000 15.500 15.800 15.800 15.900 18.000 19.900 20.600 20.600 20.800 20.000 18.500 17.700 17.000 16.600 16.700 17.300 19.100 20.200 20.700 21.500 21.000 16.800 16.800 16.500 17.200 17.300 17.600 18.400 19.900 20.500 21.200 21.300 20.800 18.800 18.100 18.100 18.800 18.700 18.700 19.000 20.100 20.500 21.600 21.800 21.500 21.200 20.400 20.400 20.600 19.300 18.600 19.400 23.500 24.600 25.900 26.600 24.100 21.800 21.300 21.100 21.200 21.600
 
Text written by user:
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.713479405306526
beta0.000573542998306538
gamma0.982697728764368


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1315.815.08465277777780.715347222222215
1415.915.51244152375900.387558476240956
151817.65651834342850.343481656571484
1619.919.59428781652490.305712183475109
1720.620.40940131590860.190598684091420
1820.620.56329503264300.0367049673569539
1920.820.8324037719621-0.0324037719621089
202020.0271915890666-0.0271915890665824
2118.518.5173537308898-0.0173537308898339
2217.717.7603612139083-0.0603612139082514
231717.1143257097058-0.114325709705835
2416.616.7047408657827-0.104740865782674
2516.717.8075338245395-1.10753382453946
2617.316.84235947474730.457640525252714
2719.119.02397488099750.0760251190025336
2820.220.7601225807557-0.560122580755731
2920.720.924552229563-0.224552229562999
3021.520.73822677736630.7617732226337
312121.5048082725798-0.50480827257983
3216.820.3634294147106-3.56342941471062
3316.816.33129825467620.468701745323813
3416.515.90715546804220.592844531957795
3517.215.71041017733161.48958982266844
3617.316.44697689155160.853023108448372
3717.617.9502492360665-0.350249236066507
3818.417.96587118115450.434128818845494
3919.920.0230469528414-0.123046952841381
4020.521.4377479392110-0.937747939210954
4121.221.4267822367241-0.226782236724112
4221.321.5161260207658-0.216126020765831
4320.821.2275211295833-0.427521129583308
4418.819.2792689617513-0.479268961751266
4518.118.5833632120164-0.483363212016389
4618.117.5149470663810.585052933618996
4718.817.56518120809111.23481879190890
4818.717.94068422192330.759315778076687
4918.719.0382067377487-0.338206737748724
501919.2831831899690-0.283183189968977
5120.120.6713084119903-0.571308411990277
5220.521.5362278338246-1.03622783382458
5321.621.6545737103083-0.0545737103082864
5421.821.8692488202708-0.0692488202708432
5521.521.6254405117158-0.125440511715766
5621.219.87779377131751.32220622868251
5720.420.4664352726871-0.0664352726871158
5820.419.99687043259880.403129567401241
5920.620.10073687296030.499263127039665
6019.319.8177317103542-0.517731710354184
6118.619.6947424407981-1.0947424407981
6219.419.4147864498598-0.0147864498597698
6323.520.91273920537082.5872607946292
6424.623.90107848535060.698921514649442
6525.925.53527529476190.364724705238064
6626.626.04661079301780.553389206982214
6724.126.2331067494480-2.13310674944795
6821.823.4617002593213-1.66170025932128
6921.321.5302394334239-0.230239433423886
7021.121.07579257484800.0242074251520243
7121.220.93599520502860.264004794971402
7221.620.19831520769341.40168479230663


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7321.282635975360119.543357141687023.0219148090332
7422.088590792245619.951586121821224.2255954626701
7524.330498837326921.858605835045726.8023918396081
7624.940900231330322.174044609090427.7077558535703
7725.981753565175922.948192121373629.0153150089782
7826.285257350620523.006344264724229.5641704365167
7925.319547704867421.812152799519728.8269426102151
8024.202716962149620.480601966875827.9248319574234
8123.860488958741319.935156477799627.7858214396831
8223.642647574713219.523897135700527.7613980137259
8323.553778424135919.250087992662027.8574688556099
8422.948638777377218.467436421720727.4298411330338
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211743263coelcalfoyczxbq/1edgo1211743163.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211743263coelcalfoyczxbq/1edgo1211743163.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211743263coelcalfoyczxbq/2puaa1211743163.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211743263coelcalfoyczxbq/2puaa1211743163.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211743263coelcalfoyczxbq/3zcbi1211743163.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211743263coelcalfoyczxbq/3zcbi1211743163.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=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