Home » date » 2010 » Jan » 16 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 16 Jan 2010 04:41:42 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/16/t1263642161tio2ubsnjuw65bw.htm/, Retrieved Sat, 16 Jan 2010 12:42:45 +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/2010/Jan/16/t1263642161tio2ubsnjuw65bw.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2,14 2,45 2,52 2,3 2,25 2,06 1,99 2,25 2,26 2,36 2,3 2,19 2,31 2,21 2,21 2,26 2,18 2,21 2,33 2,12 2,08 1,97 2,09 2,11 2,24 2,45 2,68 2,73 2,76 2,83 3,16 3,22 3,22 3,34 3,35 3,42 3,58 3,71 3,68 3,83 3,94 3,88 4,03 4,15 4,32 4,4 4,37 4,14 4,11 4,16 3,98 4,13 3,76 3,66 3,85 4,03 4,31 4,58 4,46 4,41 3,84 2,84 2,66 2,17 1,43 1,47 1,29 1,23 1,09 0,94 0,76 0,67
 
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' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.999926825388514
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
22.452.140.31
32.522.449977315870440.0700226841295604
42.32.51999487611729-0.219994876117294
52.252.30001609803959-0.0500160980395887
62.062.25000365990854-0.190003659908542
71.992.06001390344399-0.0700139034439948
82.251.990005123240180.259994876759817
92.262.249980974975900.0100190250240950
102.362.259999266861740.100000733138264
112.32.35999268248520-0.0599926824852042
122.192.30000438994123-0.110004389941233
132.312.190008049528500.119991950471504
142.212.30999121963564-0.0999912196356432
152.212.21000731681865-7.31681864918343e-06
162.262.210000000535410.0499999994645943
172.182.25999634126946-0.0799963412694646
182.212.180005853701190.0299941462988071
192.332.209997805190.120002194810002
202.122.32999121888602-0.209991218886017
212.082.12001536602586-0.0400153660258575
221.972.08000292810886-0.110002928108863
232.091.970008049421530.119991950578473
242.112.089991219635630.0200087803643649
252.242.109998535865270.130001464134730
262.452.239990487193370.210009512806631
272.682.449984632635490.230015367364508
282.732.679983168714860.0500168312851423
292.762.729996340037800.0300036599621967
302.832.759997804493840.0700021955061612
313.162.829994877616540.330005122383459
323.223.159975852003380.0600241479966188
333.223.219995607756294.39224370918367e-06
343.343.21999999967860.120000000321400
353.353.33999121904660.0100087809534024
363.423.349999267611340.0700007323886576
373.583.419994877723600.160005122276397
383.713.579988291687340.130011708312658
393.683.70999048644376-0.0299904864437552
403.833.680002194542190.149997805457806
413.943.829989023968860.110010976031138
423.883.93999194998957-0.0599919499895698
434.033.880004389887630.149995610112368
444.154.029989024129510.120010975870495
454.324.149991218243470.170008781756533
464.44.319987559673450.0800124403265547
474.374.39999414512077-0.0299941451207655
484.144.37000219480992-0.230002194809916
494.114.14001683032125-0.0300168303212454
504.164.11000219646990.0499978035301032
513.984.15999634143015-0.179996341430151
524.133.980013171162350.149986828837647
533.764.12998902477207-0.369989024772072
543.663.76002707380314-0.100027073803142
553.853.660007319442260.189992680557736
564.033.849986097359420.180013902640585
574.314.029986827552610.280013172447387
584.584.30997951014490.270020489855106
594.464.57998024135556-0.119980241355562
604.414.46000877950755-0.0500087795075466
613.844.41000365937301-0.570003659373011
622.843.84004170979632-1.00004170979632
632.662.84007317766358-0.180073177663584
642.172.66001317678481-0.490013176784815
651.432.17003585652383-0.740035856523834
661.471.430054151836290.0399458481637129
671.291.46999707697808-0.17999707697808
681.231.29001317121618-0.0600131712161767
691.091.23000439144049-0.140004391440488
700.941.09001024476695-0.150010244766950
710.760.94001097694138-0.180010976941380
720.670.760013172233301-0.090013172233301


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
730.6700065866789070.2288694047373541.11114376862046
740.6700065866789070.04616722612906411.29384594722875
750.670006586678907-0.09402815222446171.43404132558228
760.670006586678907-0.2122193575842621.55223253094208
770.670006586678907-0.3163483956732591.65636156903107
780.670006586678907-0.4104885246894161.75050169804723
790.670006586678907-0.4970594869307861.8370726602886
800.670006586678907-0.5776378957962281.91765106915404
810.670006586678907-0.6533188793839771.99333205274179
820.670006586678907-0.7248997985708172.06491297192863
830.670006586678907-0.7929825992313492.13299577258916
840.670006586678907-0.8580349351948462.19804810855266
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/16/t1263642161tio2ubsnjuw65bw/1utii1263642099.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t1263642161tio2ubsnjuw65bw/1utii1263642099.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/16/t1263642161tio2ubsnjuw65bw/2khnj1263642099.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t1263642161tio2ubsnjuw65bw/2khnj1263642099.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/16/t1263642161tio2ubsnjuw65bw/3rkhz1263642099.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t1263642161tio2ubsnjuw65bw/3rkhz1263642099.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; 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=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