Home » date » 2011 » May » 18 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 18 May 2011 12:41:13 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/18/t1305722239z6svyk8dgz8ginu.htm/, Retrieved Wed, 18 May 2011 14:37:22 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2851 2672 2755 2721 2946 3036 2282 2212 2922 4301 5764 7132 2541 2475 3031 3266 3776 3230 3028 1759 3595 4474 6838 8357 3113 3006 4047 3523 3937 3986 3260 1573 3528 5211 7614 9254 5375 3088 3718 4514 4520 4539 3663 1643 4734 5428 8314 10651 3633 4292 4154 4121 4647 4753 3965 1723 5048 6923 9858 11331 4016 3957 4510 4276 4968 4677 3523 1821
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0409527574646179
beta0.213826354573099
gamma0.447049703127968


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1325412393.50833868648147.491661313524
1424752352.71674743204122.283252567958
1530312909.94895616264121.051043837358
1632663143.69713027014122.302869729856
1737763628.34529602076147.654703979244
1832303064.23475525313165.765244746867
1930282423.0330404558604.966959544204
2017592419.06012184961-660.060121849606
2135953191.03786233196403.962137668041
2244744729.88256768319-255.882567683188
2368386291.64062789902546.359372100982
2483577810.17732415066546.822675849338
2531132867.70568146713245.294318532867
2630062817.92641705209188.073582947914
2740473481.96781679856565.032183201442
2835233789.84617732456-266.846177324564
2939374369.59721924909-432.597219249086
3039863695.31439670542290.685603294582
3132603166.9860069591593.0139930408532
3215732497.69029989874-924.690299898737
3335283918.88531217404-390.885312174042
3452115318.31789454648-107.317894546477
3576147503.12819436748110.871805632515
3692549194.5318414344159.4681585655926
3753753377.049325929011997.95067407099
3830883363.09759626089-275.097596260895
3937184291.02816634234-573.028166342339
4045144173.03737217756340.96262782244
4145204772.1122244441-252.112224444103
4245394360.09627193035178.903728069648
4336633649.6268581404513.3731418595548
4416432377.99734193208-734.997341932077
4547344262.99823563221471.001764367787
4654286048.21133711549-620.21133711549
4783148632.15450989888-318.154509898883
481065110513.2537071004137.74629289957
4936334803.64341602592-1170.64341602592
5042923549.8333992673742.166600732702
5141544456.01782046898-302.017820468982
5241214752.11165747155-631.111657471546
5346475057.35921811475-410.359218114747
5447534776.88814941631-23.888149416307
5539653903.7809814111861.2190185888244
5617232186.57995221726-463.579952217257
5750484735.44973133142312.550268668577
5869236088.11011265394834.88988734606
5998589004.22351387919853.77648612081
601133111240.729659400890.2703405991979
6140164557.17612771076-541.176127710756
6239574116.08279119259-159.082791192587
6345104545.77811521034-35.7781152103371
6442764706.3851694402-430.3851694402
6549685124.26571975536-156.265719755356
6646775005.43847633557-328.438476335567
6735234106.88558389211-583.88558389211
6818212054.40221049811-233.402210498113


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
695042.575959912664565.48783734875519.66408247662
706632.943381878836151.260104107677114.62665964998
719545.872861763039050.3989545550210041.346768971
7211387.024396867910871.959885587111902.0889081488
734340.416921586483855.55562440544825.27821876755
744065.31697605093577.311550435694553.32240166612
754539.179601978214041.771247482135036.5879564743
764513.748166477884008.988050984655018.5082819711
775052.229927039024529.579386771345574.8804673067
784851.87892162314321.173772015015382.58407123118
793847.024375292663326.932496422724367.1162541626
801959.243780722991830.566270013362087.92129143262
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t1305722239z6svyk8dgz8ginu/17pwn1305722470.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305722239z6svyk8dgz8ginu/17pwn1305722470.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305722239z6svyk8dgz8ginu/262121305722470.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305722239z6svyk8dgz8ginu/262121305722470.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305722239z6svyk8dgz8ginu/3z1351305722470.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305722239z6svyk8dgz8ginu/3z1351305722470.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=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