Home » date » 2010 » Jan » 20 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 20 Jan 2010 09:42:27 -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/20/t1264005810hhmytqxdqhg3xbo.htm/, Retrieved Wed, 20 Jan 2010 17:43:34 +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/20/t1264005810hhmytqxdqhg3xbo.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 «
4,26 4,26 4,07 4,26 4,4 4,46 4,34 4,18 4,11 3,98 3,85 3,66 3,59 3,57 3,76 3,6 3,43 3,26 3,3 3,31 3,14 3,3 3,49 3,39 3,37 3,54 3,7 3,96 4,03 4,02 4,04 3,92 3,79 3,83 3,76 3,82 4,06 4,11 4,01 4,22 4,34 4,64 4,62 4,44 4,39 4,42 4,28 4,41 4,25 4,23 4,23 4,37 4,51 4,84 4,85 4,58 4,56 4,46 4,26 3,87 4,13 4,24 4,03 3,93 4,03 4,12 3,92 3,77
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.770019236878996
beta0.0459442665820473
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133.594.00846955128205-0.418469551282054
143.573.66284997093498-0.0928499709349788
153.763.77176222129098-0.0117622212909771
163.63.584780808580130.0152191914198729
173.433.38369736011180.0463026398881983
183.263.191103524942150.0688964750578451
193.33.55709479485318-0.257094794853185
203.313.164637690838620.145362309161376
213.143.16222292221461-0.0222229222146098
223.32.968728099759010.331271900240985
233.493.086650817779280.403349182220716
243.393.236844104367980.153155895632024
253.373.226478811807310.143521188192688
263.543.421148283658760.118851716341236
273.73.75187223626913-0.0518722362691264
283.963.578940243477770.381059756522229
294.033.718382056331930.311617943668066
304.023.796340966346020.223659033653977
314.044.27306455749515-0.233064557495147
323.924.0590526264077-0.139052626407704
333.793.85641351993006-0.0664135199300588
343.833.765946735761810.0640532642381868
353.763.740987338865070.0190126611349264
363.823.570402409185380.249597590814619
374.063.668203132474830.391796867525171
384.114.093279491500780.0167205084992190
394.014.34738737176980-0.337387371769804
404.224.085358463952360.134641536047645
414.344.041554651071010.298445348928992
424.644.111146958298640.528853041701364
434.624.75064071659109-0.130640716591087
444.444.67354414644109-0.233544146441088
454.394.44793352835303-0.05793352835303
464.424.42738453568961-0.00738453568961361
474.284.36791404633415-0.087914046334145
484.414.195096603306180.214903396693819
494.254.32473082800756-0.0747308280075609
504.234.31365233738552-0.0836523373855202
514.234.41482300521861-0.184823005218613
524.374.39001639067437-0.0200163906743729
534.514.270510469349860.239489530650142
544.844.35132500665270.488674993347297
554.854.81041860651690.0395813934831004
564.584.84896122840081-0.268961228400814
574.564.6434435574781-0.0834435574781
584.464.62095187216924-0.160951872169243
594.264.42535366537929-0.165353665379286
603.874.26045108029768-0.39045108029768
614.133.833826868258780.296173131741222
624.244.095908070664010.144091929335993
634.034.34684431171796-0.316844311717957
643.934.25127587092082-0.321275870920824
654.033.941812544203260.0881874557967421
664.123.940413495899490.179586504100506
673.924.02426926105732-0.104269261057318
683.773.84204523678205-0.0720452367820461


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
693.798748643562213.356637525198154.24085976192627
703.793563225517743.225891058725944.36123539230953
713.697461423280743.018915542029094.37600730453238
723.590538837565752.809213044841794.3718646302897
733.618715766324812.739581297349424.49785023530021
743.603520142602832.629797361308014.57724292389766
753.618156611644572.551978766936904.68433445635223
763.757414774788962.600192185528954.91463736404897
773.792744387395952.545382326961545.04010644783036
783.744575081491092.407612687086445.08153747589573
793.618626769465262.192330024334415.04492351459612
803.521554173552812.005980594170635.03712775293499
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264005810hhmytqxdqhg3xbo/1vvdj1264005744.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264005810hhmytqxdqhg3xbo/1vvdj1264005744.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264005810hhmytqxdqhg3xbo/2j2ot1264005744.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264005810hhmytqxdqhg3xbo/2j2ot1264005744.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/20/t1264005810hhmytqxdqhg3xbo/3y7si1264005744.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1264005810hhmytqxdqhg3xbo/3y7si1264005744.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