Home » date » 2011 » Jan » 15 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 15 Jan 2011 15:33:55 +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/Jan/15/t1295105532khhb5u9s5qmuzn2.htm/, Retrieved Sat, 15 Jan 2011 16:32:12 +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/2011/Jan/15/t1295105532khhb5u9s5qmuzn2.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1,35 1,91 1,31 1,19 1,3 1,14 1,1 1,02 1,11 1,18 1,24 1,36 1,29 1,73 1,41 1,15 1,31 1,15 1,08 1,1 1,14 1,24 1,33 1,49 1,38 1,96 1,36 1,24 1,35 1,23 1,09 1,08 1,33 1,35 1,38 1,5 1,47 2,09 1,52 1,29 1,52 1,27 1,35 1,29 1,41 1,39 1,45 1,53 1,45 2,11 1,53 1,38 1,54 1,35 1,29 1,33 1,47 1,47 1,54 1,59 1,5 2 1,51 1,4 1,62 1,44 1,29 1,28 1,4 1,39 1,46 1,49
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.253682747786366
beta0.000800115960723572
gamma0.477115909808832


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131.291.29367788461538-0.00367788461538465
141.731.73173450683460-0.00173450683460397
151.411.408200445073310.00179955492668693
161.151.146396612409580.00360338759042489
171.311.302551112372330.00744888762766527
181.151.136765994627040.0132340053729614
191.081.10620114762802-0.0262011476280224
201.11.031043631128940.0689563688710586
211.141.14337326468262-0.00337326468261945
221.241.211520100026210.0284798999737896
231.331.281503314430760.0484966855692428
241.491.414490952318280.0755090476817237
251.381.364286866399870.0157131336001277
261.961.808001729592520.151998270407481
271.361.52480370987104-0.164803709871041
281.241.221422275796020.0185777242039793
291.351.38279231521622-0.0327923152162248
301.231.208897997928440.02110200207156
311.091.16632799579539-0.0763279957953855
321.081.11236859355169-0.0323685935516942
331.331.173248899837140.156751100162864
341.351.293401486577530.0565985134224749
351.381.377693882133190.00230611786680979
361.51.50862135208323-0.00862135208323411
371.471.415804664313400.0541953356865976
382.091.917839946561330.172160053438669
391.521.52698367819881-0.00698367819880663
401.291.32900277942220-0.0390027794221977
411.521.457528001133210.0624719988667861
421.271.32706481055688-0.0570648105568776
431.351.230030047261620.119969952738380
441.291.241618616568090.0483813834319089
451.411.390439410361860.0195605896381372
461.391.44021287072182-0.0502128707218179
471.451.47814100934692-0.0281410093469177
481.531.59751171241841-0.0675117124184088
491.451.51216955442677-0.0621695544267717
502.112.026712551981240.0832874480187589
511.531.54952595070233-0.0195259507023304
521.381.336963975919790.0430360240802086
531.541.522452839314320.0175471606856790
541.351.338037916642870.0119620833571257
551.291.32157617716061-0.03157617716061
561.331.269221684143420.0607783158565791
571.471.410920200858450.0590797991415499
581.471.445877440605750.0241225593942467
591.541.510540988400560.0294590115994395
601.591.63053484926045-0.0405348492604511
611.51.55397410606957-0.0539741060695722
6222.12242773165260-0.122427731652603
631.511.55644048390593-0.0464404839059258
641.41.359317874640090.0406821253599117
651.621.535123107098640.084876892901357
661.441.365803091610810.0741969083891871
671.291.34964203821004-0.0596420382100389
681.281.32306347764545-0.0430634776454544
691.41.43780342253298-0.0378034225329817
701.391.43570493454025-0.0457049345402489
711.461.48450992384668-0.0245099238466782
721.491.56583370910222-0.0758337091022239


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
731.475469955647241.350574039585561.60036587170891
742.033189030344571.904330701466912.16204735922222
751.525290067703241.392581528605661.65799860680082
761.370953593713591.234497544309291.50740964311789
771.552149462266651.412040356869051.69225856766426
781.357451612220351.213776695747061.50112652869363
791.274752569041711.127592739844941.42191239823849
801.269161397414121.118591932324071.41973086250416
811.396661485724621.242752654354341.55057031709490
821.401309860447721.244127449589041.55849227130640
831.469236151731321.308841916075641.62963038738701
841.538486924447651.374938976420881.70203487247443
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295105532khhb5u9s5qmuzn2/18gkv1295105631.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295105532khhb5u9s5qmuzn2/18gkv1295105631.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/15/t1295105532khhb5u9s5qmuzn2/2o4py1295105631.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295105532khhb5u9s5qmuzn2/2o4py1295105631.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/15/t1295105532khhb5u9s5qmuzn2/3iaqr1295105631.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/15/t1295105532khhb5u9s5qmuzn2/3iaqr1295105631.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=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