Home » date » 2011 » May » 17 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 17 May 2011 15:23:40 +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/17/t1305645569mmc921u411mjgkp.htm/, Retrieved Tue, 17 May 2011 17:19:33 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,41 0,42 0,42 0,42 0,42 0,42 0,42 0,42 0,42 0,42 0,42 0,42 0,42 0,42 0,42 0,43 0,43 0,44 0,44 0,44 0,44 0,44 0,44 0,44 0,44 0,44 0,44 0,44 0,43 0,44 0,44 0,46 0,46 0,46 0,46 0,46 0,45 0,45 0,46 0,46 0,46 0,47 0,47 0,47 0,47 0,47 0,47 0,47 0,47 0,47 0,47 0,47
 
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.913882252944706
beta0.0156442872297025
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
130.410.4099105614956268.94385043740398e-05
140.410.41012333698141-0.000123336981409539
150.410.410139897373554-0.000139897373553799
160.410.4097229382994670.000277061700532488
170.410.4092762300445840.000723769955416176
180.410.4092495805599030.000750419440096961
190.410.412170784068899-0.00217078406889887
200.410.410308310797649-0.000308310797648648
210.410.410143510864863-0.000143510864863083
220.420.4101272668858690.0098727331141305
230.420.4194058413457270.00059415865427298
240.420.420213385982037-0.000213385982037462
250.420.42028777462779-0.000287774627789616
260.420.420263393099985-0.000263393099985076
270.420.420274837118587-0.000274837118586724
280.420.4198834528858550.000116547114144716
290.420.4194288879123290.000571112087671355
300.420.4193621986153030.000637801384696601
310.420.422088671475199-0.00208867147519926
320.420.420583058047971-0.000583058047971208
330.420.420295245913563-0.000295245913562947
340.420.421116845638211-0.00111684563821135
350.420.419507220605410.000492779394590026
360.430.4201054090467390.00989459095326095
370.430.429508261323530.000491738676469455
380.440.4303064470604160.00969355293958424
390.440.4396671016444970.000332898355502542
400.440.440107206085745-0.000107206085745326
410.440.4397060759631280.000293924036872228
420.440.439602902813480.000397097186520146
430.440.442200424281174-0.00220042428117367
440.440.440983673304023-0.000983673304022936
450.440.440597952773114-0.000597952773114085
460.440.441347497928141-0.00134749792814121
470.440.4398680145082250.000131985491775288
480.440.441191778795396-0.00119177879539639
490.430.439704532677982-0.00970453267798227
500.440.4318860159340660.00811398406593383
510.440.4389000266238180.00109997337618228
520.460.4399161310144490.0200838689855511
530.460.4581707314051450.00182926859485477
540.460.4596628186033040.000337181396695918
550.460.46227131537547-0.00227131537546976
560.460.461335037728099-0.00133503772809945
570.450.460881477536563-0.0108814775365635
580.450.452257087949292-0.00225708794929202
590.460.4501173866182630.0098826133817374
600.460.460462176689568-0.000462176689567939
610.460.4590256858456960.00097431415430388
620.470.4630082167429760.00699178325702354
630.470.468641172932120.00135882706787982
640.470.471885428322728-0.00188542832272848
650.470.4684698172956790.00153018270432076
660.470.4695657301721290.000434269827870926
670.470.472095823205018-0.0020958232050185
680.470.471443579426219-0.00144357942621898
690.470.470061621557005-6.16215570045653e-05
700.470.472320438823448-0.00232043882344773
710.470.471356374901362-0.00135637490136215
720.470.470557974629451-0.000557974629451452


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
730.4691464094240260.4604614902495790.477831328598473
740.4728155567061520.4609308546735960.484700258738707
750.4714701715553230.4570775267208870.485862816389758
760.4730846205667320.4564412503792260.489727990754237
770.4715881192708830.4529959618512560.490180276690509
780.4710820191320240.4506575831575760.491506455106472
790.4728874901677060.4506510063413950.495123973994017
800.4741280473158620.4501867758703780.498069318761345
810.4741173561227350.4485968508044760.499637861440995
820.4761888386139870.4490384435033760.503339233724598
830.4774080090885780.4487165776817890.506099440495366
840.477907428000934-12.762181070505513.7179959265073
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/17/t1305645569mmc921u411mjgkp/1doqd1305645816.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305645569mmc921u411mjgkp/1doqd1305645816.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/17/t1305645569mmc921u411mjgkp/2qcz81305645816.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305645569mmc921u411mjgkp/2qcz81305645816.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/17/t1305645569mmc921u411mjgkp/3qecr1305645816.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305645569mmc921u411mjgkp/3qecr1305645816.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