Home » date » 2011 » May » 19 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 14:23:08 +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/May/19/t1305814777q64bk2rqxgygeln.htm/, Retrieved Thu, 19 May 2011 16:19:37 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
30790 30800 31025 30835 31110 31270 31090 30755 31460 32135 32680 32700 32515 32275 32200 31835 31985 31875 31795 32260 33255 33160 32195 33130 33950 34210 33855 33735 34175 34265 33915 33660 33720 33810 33590 33545 33660 33165 33800 33880 33975 33930 33905 33890 33640 34395 34245 33940 34295 33745 33535 33715 33600 34120 34330 34130 33755 32910 32910 32850 32780 32565 31905 31975 31380 31355 31440 30310 31410 31300 31070 31075 31815
 
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.881100620755513
beta0.0267387813206933
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133251532055.3766025641459.623397435891
143227532222.891416743152.108583256886
153220032152.155663643347.8443363566985
163183531808.789871313626.2101286864054
173198532056.9796641921-71.9796641920693
183187531981.7502272917-106.75022729173
193179532092.1194376148-297.119437614838
203226031448.3792162767811.620783723261
213325532863.5887848533391.411215146742
223316033907.5645831395-747.564583139458
233219533812.8758082572-1617.87580825716
243313032404.6971689743725.3028310257
253395032934.91476653851015.08523346148
263421033548.7725819275661.227418072456
273385534033.9538569078-178.953856907829
283373533502.5695378428232.430462157194
293417533940.029744796234.970255204033
303426534157.5957337773107.404266222708
313391534465.5430650265-550.543065026504
323366033755.8903486605-95.8903486604904
333372034325.6987745448-605.698774544828
343381034336.3754933537-526.37549335372
353359034318.9868820909-728.986882090918
363354533979.442925989-434.442925989046
373366033501.7712817191158.228718280901
383316533277.9001721621-112.900172162139
393380032922.1833689154877.816631084643
403388033336.8138214624543.186178537573
413397534021.6846282736-46.684628273586
423393033942.5827088857-12.5827088857113
433390534030.4189738699-125.418973869855
443389033723.2560802956166.74391970443
453364034443.8981610928-803.898161092802
463439534264.7456199613130.254380038728
473424534792.6663919014-547.666391901395
483394034643.0197186921-703.0197186921
493429533987.9602289324307.039771067561
503374533855.2625387277-110.262538727693
513353533612.0204754608-77.0204754607548
523371533115.415575171599.584424828994
533360033751.0319242677-151.031924267707
543412033552.7741438355567.225856164521
553433034120.4538755588209.546124441207
563413034133.4484960053-3.4484960053378
573375534574.9971061925-819.99710619248
583291034478.6225611835-1568.62256118354
593291033374.9252882213-464.925288221333
603285033227.5276239975-377.527623997521
613278032934.840502046-154.840502046041
623256532290.1667711452274.833228854844
633190532343.8619143012-438.861914301157
643197531554.0380022025420.961997797469
653138031883.9657387138-503.965738713814
663135531392.7667319746-37.7667319745924
673144031303.2344358661136.765564133904
683031031143.4376687478-833.437668747774
693141030653.7015411162756.298458883797
703130031791.4340804147-491.434080414667
713107031727.6984356857-657.698435685656
723107531375.9193781966-300.919378196639
733181531134.0936646679680.906335332125


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7431253.459230886230180.956036176132325.9624255963
7530950.240086960829503.986315678532396.493858243
7630629.768952550928874.004926639532385.5329784622
7730449.334542828928418.395831987632480.2732536703
7830440.005108329928155.504926277232724.5052903827
7930387.784926855827864.558553376432911.0113003351
8029972.189280053427220.975055282132723.4035048247
8130405.511566470127434.359747493533376.6633854467
8230710.393711284727525.485783633533895.3016389359
8331053.349451878827659.510511603534447.1883921541
8431332.442027112727733.479290507834931.4047637175
8531488.536883871527687.47315094635289.600616797
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305814777q64bk2rqxgygeln/1pv8x1305814984.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814777q64bk2rqxgygeln/1pv8x1305814984.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305814777q64bk2rqxgygeln/2mnqe1305814984.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814777q64bk2rqxgygeln/2mnqe1305814984.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305814777q64bk2rqxgygeln/36ezb1305814984.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814777q64bk2rqxgygeln/36ezb1305814984.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