Home » date » 2010 » Jan » 27 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 27 Jan 2010 03:13:03 -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/27/t1264587208uynzc2t7lg2ad2g.htm/, Retrieved Wed, 27 Jan 2010 11:13:32 +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/27/t1264587208uynzc2t7lg2ad2g.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 «
1.61 1.58 1.69 1.78 1.76 1.83 1.8 1.57 1.45 1.4 1.55 1.58 1.58 1.59 1.8 1.99 2.06 2.06 2.08 2 1.85 1.77 1.7 1.66 1.67 1.73 1.91 2.02 2.07 2.15 2.1 1.68 1.68 1.65 1.72 1.73 1.76 1.84 1.99 2.05 2.12 2.13 2.08 1.88 1.81 1.81 1.88 1.87 1.87 1.9 2.01 2.05 2.16 2.18 2.15 2.12 2.04 2.04 2.06 1.93 1.86 1.94 2.35 2.46 2.59 2.66 2.41 2.18 2.13 2.11 2.12 2.16 2.07 2.2 2.29 2.32 2.37 2.38 2.38 2.28 2.22 2.25 2.3 2.3 2.23 2.27 2.3 2.32 2.41 2.43 2.45 2.47 2.46 2.5 2.46 2.43 2.37 2.45 2.53 2.56 2.62 2.67 2.62 2.6 2.53 2.49 2.48 2.44
 
Output produced by software:


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


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.836733274783946
beta0.00571230996515615
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131.581.482686965811970.0973130341880326
141.591.566727494383730.0232725056162744
151.81.783927084142440.0160729158575561
161.991.977679360976880.0123206390231181
172.062.058767538304160.00123246169583524
182.062.07266709281064-0.0126670928106405
192.082.034042549575610.0459574504243911
2021.865940774282880.134059225717118
211.851.87636411278813-0.0263641127881282
221.771.81409656056281-0.0440965605628096
231.71.92886424513356-0.228864245133563
241.661.76710342877101-0.107103428771011
251.671.69343333267237-0.0234333326723666
261.731.663351117877220.0666488821227764
271.911.91487515117494-0.0048751511749392
282.022.08959217569594-0.0695921756959352
292.072.09904464225383-0.0290446422538309
302.152.083910084150520.0660899158494783
312.12.11970110363563-0.0197011036356267
321.681.90967640861885-0.229676408618849
331.681.586451394546360.0935486054536363
341.651.619089978487270.0309100215127311
351.721.76427655219160-0.0442765521915973
361.731.77555296131678-0.0455529613167778
371.761.76604599447201-0.00604599447200727
381.841.764304140696300.075695859303704
391.992.01084819617850-0.0208481961784972
402.052.16068516977695-0.110685169776952
412.122.14122867646356-0.0212286764635632
422.132.14705851521806-0.0170585152180607
432.082.09776444445036-0.0177644444503615
441.881.853582280377560.0264177196224447
451.811.797139726557200.0128602734427978
461.811.751379329473430.0586206705265735
471.881.90695173536237-0.0269517353623734
481.871.93207368290545-0.0620736829054451
491.871.91467217075956-0.0446721707595563
501.91.893250333105560.00674966689444045
512.012.06530694104696-0.0553069410469638
522.052.17044360355169-0.120443603551688
532.162.156180386340510.00381961365948635
542.182.18252274793323-0.00252274793322771
552.152.144218395332530.00578160466747102
562.121.926006426622590.193993573377411
572.042.007422600111590.0325773998884089
582.041.985581484798180.0544185152018208
592.062.12359675187947-0.0635967518794693
601.932.11207726879975-0.182077268799748
611.861.99628719183693-0.136287191836930
621.941.905346942840390.0346530571596109
632.352.089496286235370.260503713764634
642.462.448633875884560.0113661241154368
652.592.565964593898420.0240354061015844
662.662.609299611718290.0507003882817103
672.412.61825196880358-0.208251968803575
682.182.25202404324695-0.0720240432469472
692.132.083573360369950.0464266396300488
702.112.076025312267660.0339746877323392
712.122.1767078876263-0.0567078876263016
722.162.150682852225540.00931714777445602
732.072.20250388389495-0.132503883894955
742.22.142645227967760.0573547720322414
752.292.38277937437592-0.0927793743759198
762.322.40406441601359-0.0840644160135908
772.372.44158461606873-0.0715846160687259
782.382.40677856904803-0.0267785690480333
792.382.305766961628970.0742330383710317
802.282.196638876898120.0833611231018758
812.222.176779627957060.0432203720429358
822.252.16373691448650.0862630855135018
832.32.292836521659310.00716347834068687
842.32.33081079607892-0.0308107960789186
852.232.32548530904424-0.0954853090442436
862.272.32736038699631-0.0573603869963124
872.32.44620979007434-0.146209790074337
882.322.42316846522228-0.103168465222284
892.412.44560767394966-0.0356076739496585
902.432.44725849261619-0.0172584926161896
912.452.369788411719780.0802115882802243
922.472.266265594130310.203734405869694
932.462.340260876049810.119739123950191
942.52.398324975199220.101675024800781
952.462.52753317899041-0.0675331789904101
962.432.49657656118980-0.0665765611898044
972.372.45036474545687-0.080364745456869
982.452.47078777772548-0.0207877777254817
992.532.60557889866838-0.0755788986683825
1002.562.64884794990773-0.0888479499077328
1012.622.69455242979988-0.0745524297998825
1022.672.666678932996080.00332106700392165
1032.622.62250668591578-0.00250668591578318
1042.62.469707145511950.130292854488054
1052.532.467956019645560.0620439803544404
1062.492.473937858348570.0160621416514268
1072.482.5026180948813-0.0226180948812997
1082.442.50834753620686-0.0683475362068608


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1092.457342200219592.290632294771042.62405210566815
1102.554059608466922.336176455240422.77194276169343
1112.696721929691662.437148917426802.95629494195653
1122.800848150550252.505029450790083.09666685031042
1132.923437498807812.595007899656513.2518670979591
1142.971223837810362.612822785980093.32962488964063
1152.92387057796112.537521111758533.31022004416367
1162.795411504936032.382723899490073.208099110382
1172.673435777737332.235728075316733.11114348015793
1182.61963803465612.158012538081313.08126353123089
1192.628128560663942.143523021568823.11273409975906
1202.644990539117912.138213871439043.15176720679678
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264587208uynzc2t7lg2ad2g/1a8w31264587181.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264587208uynzc2t7lg2ad2g/1a8w31264587181.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264587208uynzc2t7lg2ad2g/2rtnq1264587181.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264587208uynzc2t7lg2ad2g/2rtnq1264587181.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264587208uynzc2t7lg2ad2g/31j6o1264587181.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264587208uynzc2t7lg2ad2g/31j6o1264587181.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