Home » date » 2008 » Apr » 15 » attachments

steve

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 15 Apr 2008 11:48:35 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g.htm/, Retrieved Tue, 15 Apr 2008 19:49:31 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13328 12873 14000 13477 14237 13674 13529 14058 12975 14326 14008 16193 14483 14011 15057 14884 15414 14440 14900 15074 14442 15307 14938 17193 15528 14765 15838 15723 16150 15486 15986 15983 15692 16490 15686 18897 16316 15636 17163 16534 16518 16375 16290 16352 15943 16362 16393 19051 16747 16320 17910 16961 17480 17049 16879 17473 16998 17307 17418 20169 17871 17226 19062 17804 19100 18522 18060 18869 18127 18871 18890 21263 19547 18450 20254 19240 20216 19420 19415 20018 18652 19978 19509 21971
 
Text written by user:
 
Output produced by software:


Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.440051506383271
beta0.000510357792765983
gamma0.96961246768094


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131448313950.0064127244532.99358727564
141401113710.3180276631300.681972336923
151505714858.4539887854198.546011214616
161488414757.8307940623126.169205937656
171541415346.879194846867.1208051532321
181444014409.496592874930.5034071250557
191490014882.374378915417.6256210845550
201507415074.1789431871-0.178943187094774
211444214462.2002026381-20.2002026381178
221530715336.5931238976-29.5931238976209
231493814973.0809767451-35.0809767451483
241719317227.6015232390-34.6015232389509
251552815796.1793597407-268.179359740729
261476515019.3832309771-254.383230977075
271583815923.2660255571-85.2660255571136
281572315640.763094344282.2369056557509
291615016200.2974877907-50.2974877906727
301548615138.1294300757347.870569924342
311598615765.3156185356220.684381464374
321598316042.5739394614-59.5739394614156
331569215349.5587830128342.441216987201
341649016436.547282223753.4527177762684
351568616073.7925925926-387.792592592596
361889718313.7834502124583.216549787649
371631616895.9028379536-579.902837953625
381563615936.0503022295-300.050302229527
391716316983.0463333618179.953666638183
401653416889.6413325147-355.641332514726
411651817207.8578450826-689.857845082581
421637516035.9966343466339.0033656534
431629016603.8926137906-313.892613790649
441635216491.7088311064-139.708831106396
451594315964.7551711969-21.7551711968772
461636216746.0563229809-384.056322980894
471639315944.7054354089448.294564591091
481905119156.356226812-105.356226812008
491674716770.4584969015-23.4584969015123
501632016188.8764249218131.123575078169
511791017737.8757527058172.124247294203
521696117327.2676307849-366.267630784881
531748017460.009975119019.9900248809681
541704917134.9256386618-85.9256386617926
551687917158.8465352256-279.846535225559
561747317157.4450247848315.554975215218
571699816867.0219923134130.978007686579
581730717547.9730593578-240.973059357799
591741817241.1132802831176.886719716909
602016920181.7132615435-12.7132615435185
611787117740.7680291172130.231970882836
621722617274.8412128554-48.8412128553646
631906218848.1932548180213.806745181970
641780418111.7650355626-307.765035562628
651910018504.8029249480595.197075051976
661852218340.3783130128181.621686987244
671806018365.5852249802-305.585224980157
681886918703.5773108711165.422689128878
691812718200.9628220799-73.962822079895
701887118612.3533893378258.646610662221
711889018747.3054779326142.694522067351
722126321783.5634715529-520.563471552898
731954719028.8903805263518.1096194737
741845018582.0878468767-132.087846876704
752025420385.1178385464-131.117838546423
761924019132.7870737035107.212926296495
772021620265.7094088722-49.7094088721533
781942019548.1138197171-128.113819717128
791941519150.0971746055264.902825394514
802001820037.3628166547-19.3628166547314
811865219274.9496496977-622.949649697675
821997819650.4021559329327.597844067142
831950919746.2597465847-237.259746584718
842197122352.5260978328-381.526097832812


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8520131.543851707219588.764074227120674.3236291872
8619069.624411246818480.392591081919658.8562314118
8720990.227487978720335.357782441721645.0971935157
8819883.062559206019199.857931331020566.2671870810
8920913.994213540820173.362229942421654.6261971393
9020146.972887516419383.476170342620910.4696046901
9120009.788200345819213.063017879620806.5133828120
9220642.330661550519795.935049378421488.7262737226
9319519.289666735118669.910167723020368.6691657471
9420733.159856054819817.256158960921649.0635531486
9520360.655569500819426.686977071021294.6241619306
9623101.553534085222199.36634409224003.7407240785
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g/1zdog1208281709.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g/1zdog1208281709.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g/217or1208281709.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g/217or1208281709.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g/3hvq51208281709.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g/3hvq51208281709.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g/4m2051208281709.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208281771q0q3lnlfd7zcr2g/4m2051208281709.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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()

bitmap(file="myhist.png")
hist(myresid)
grid()
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