Home » date » 2008 » Apr » 15 » attachments

test

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 14:54:56 -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/t1208292936pmnyvoth3vkfsku.htm/, Retrieved Tue, 15 Apr 2008 22:55:41 +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 time2 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.440051506384153
beta0.000510357792766258
gamma0.969612467681559


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131448313950.0064127244532.993587275634
141401113710.3180276635300.681972336470
151505714858.4539887859198.546011214061
161488414757.8307940628126.169205937182
171541415346.879194847267.1208051528447
181444014409.496592875230.503407124801
191490014882.374378915617.6256210843821
201507415074.1789431872-0.178943187207551
211444214462.2002026382-20.2002026381779
221530715336.5931238976-29.5931238976373
231493814973.0809767451-35.0809767451283
241719317227.6015232389-34.6015232389
251552815796.1793597404-268.179359740365
261476515019.3832309765-254.383230976508
271583815923.2660255566-85.2660255565697
281572315640.763094344082.2369056560492
291615016200.2974877907-50.2974877906745
301548615138.1294300757347.870569924311
311598615765.315618536220.684381463989
321598316042.5739394619-59.5739394618704
331569215349.5587830130342.44121698697
341649016436.547282224253.4527177757809
351568616073.7925925929-387.79259259293
361889718313.7834502122583.216549787812
371631616895.902837954-579.902837953989
381563615936.0503022292-300.050302229214
391716316983.0463333612179.953666638754
401653416889.6413325144-355.641332514424
411651817207.8578450821-689.85784508209
421637516035.9966343456339.003365654389
431629016603.8926137903-313.892613790318
441635216491.7088311061-139.708831106091
451594315964.7551711965-21.7551711965316
461636216746.0563229807-384.05632298073
471639315944.7054354088448.294564591182
481905119156.3562268122-105.356226812200
491674716770.4584969018-23.4584969017887
501632016188.8764249222131.123575077825
511791017737.8757527059172.124247294105
521696117327.2676307851-366.267630785063
531748017460.009975119119.9900248809172
541704917134.9256386614-85.9256386614434
551687917158.8465352252-279.846535225188
561747317157.4450247844315.554975215622
571699816867.0219923134130.978007686619
581730717547.9730593580-240.973059358035
591741817241.1132802829176.886719717128
602016920181.7132615435-12.7132615435003
611787117740.7680291173130.231970882684
621722617274.8412128557-48.8412128556665
631906218848.1932548181213.806745181941
641780418111.7650355630-307.765035563043
651910018504.8029249481595.197075051859
661852218340.3783130132181.621686986797
671806018365.5852249806-305.585224980576
681886918703.5773108708165.422689129176
691812718200.9628220797-73.9628220796694
701887118612.3533893378258.646610662221
711889018747.3054779328142.694522067235
722126321783.5634715530-520.56347155304
731954719028.8903805260518.109619474024
741845018582.0878468771-132.087846877093
752025420385.1178385465-131.117838546452
761924019132.7870737037107.212926296310
772021620265.7094088722-49.7094088722079
781942019548.113819717-128.113819717008
791941519150.0971746056264.902825394409
802001820037.3628166549-19.3628166549206
811865219274.9496496976-622.949649697624
821997819650.4021559322327.597844067837
831950919746.2597465845-237.259746584492
842197122352.5260978327-381.526097832706


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8520131.543851706619588.764074226320674.3236291868
8619069.624411246318480.39259108119658.8562314116
8720990.227487978320335.357782440721645.0971935158
8819883.062559205619199.857931330020566.2671870813
8920913.994213540520173.362229941321654.6261971398
9020146.972887516119383.476170341420910.4696046907
9120009.788200345519213.063017878320806.5133828126
9220642.330661550219795.935049376921488.7262737234
9319519.289666735118669.910167721920368.6691657482
9420733.159856054519817.256158959321649.0635531497
9520360.655569500519426.686977069321294.6241619316
9623101.553534085122199.366344090024003.7407240801
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208292936pmnyvoth3vkfsku/1ex981208292894.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208292936pmnyvoth3vkfsku/1ex981208292894.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208292936pmnyvoth3vkfsku/2z78x1208292894.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208292936pmnyvoth3vkfsku/2z78x1208292894.ps (open in new window)


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208292936pmnyvoth3vkfsku/43yse1208292894.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/15/t1208292936pmnyvoth3vkfsku/43yse1208292894.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='hist.png')
hist(myresid,main="Residual Histogram")
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