Home » date » 2010 » Dec » 19 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 19 Dec 2010 13:58:47 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767000xskov2vo9z0u3pi.htm/, Retrieved Sun, 19 Dec 2010 14:56:41 +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/Dec/19/t1292767000xskov2vo9z0u3pi.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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3.65 3.59 3.31 3.89 4.31 4.35 4.11 3.90 3.75 3.75 3.88 3.93 3.97 3.97 4.33 4.16 4.93 3.86 4.06 4.18 4.08 4.38 4.48 4.41 4.37 4.56 4.71 4.94 5.03 5.08 5.05 4.83 4.68 4.69 4.58 4.54 4.75 4.71 4.50 4.62 4.69 5.05 4.93 4.53 4.33 4.33 3.87 3.74 3.31 3.21 2.93 3.19 3.46 3.73 3.60 3.46 3.25 3.19 2.82 1.89 1.98 2.30 2.42 2.47 2.81 3.37 3.14 3.21 3.02 2.96 2.92 3.07
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.997151100012884
beta0.00829700255916443
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
33.313.53-0.22
43.893.248806617646860.641193382353144
54.313.831657990865390.478342009134614
64.354.256079436286240.0939205637137581
74.114.29795165366323-0.187951653663235
83.94.0571996867436-0.1571996867436
93.753.84581150704317-0.0958115070431735
103.753.694843934667940.0551560653320622
113.883.694870169426010.185129830573988
123.933.826031533870950.103968466129049
133.973.877122923573620.092877076426376
143.973.917922927808250.052077072191747
154.333.918470015578070.411529984421926
164.164.28085070804473-0.120850708044729
174.934.111367565346840.81863243465316
183.864.88546391695364-1.02546391695364
194.063.812233525512180.247766474487817
204.184.010656082001270.16934391799873
214.084.1322805441043-0.0522805441043008
224.384.03247939399580.347520606004198
234.484.334215565402370.145784434597627
244.414.43599641945058-0.0259964194505775
254.374.366270728050710.00372927194929051
264.564.326216896157740.233783103842263
274.714.51749566880140.192504331198598
284.944.669205926536360.270794073463636
295.034.901223265162160.128776734837839
305.084.992693275316610.087306724683387
315.055.043533739648230.00646626035176734
324.835.01381754377958-0.183817543779579
334.684.79283885363159-0.11283885363159
344.694.641703085394060.0482969146059382
354.584.65164360371996-0.0716436037199601
364.544.5413925685612-0.00139256856119907
374.754.501180909159730.248819090840272
384.714.71252665238087-0.00252665238087246
394.54.67322180734754-0.173221807347544
404.624.462274973494570.157725026505429
414.694.582637055813850.107362944186146
425.054.65366878519880.396331214801197
434.935.01612453638795-0.0861245363879473
444.534.89678646482661-0.366786464826605
454.334.49455148420647-0.164551484206472
464.334.292613942445030.0373860575549729
473.874.29234795109352-0.422347951093518
483.743.83016344845185-0.0901634484518512
493.313.69847113288724-0.388471132887236
503.213.2661070180824-0.0561070180824048
512.933.16469595210753-0.234695952107532
523.192.88326300878990.306736991210103
533.463.144258267642080.315741732357917
543.733.416844860704880.313155139295124
553.63.68944307649045-0.0894430764904457
563.463.55985004330323-0.099850043303228
573.253.4190535958345-0.169053595834499
583.193.20785210769285-0.0178521076928542
592.823.14727365276819-0.327273652768191
601.892.77544750934489-0.885447509344893
611.981.839712060202070.140287939797933
622.31.927950495857350.372049504142652
632.422.250368331770590.169631668229406
642.472.372348424686330.097651575313669
652.812.423361395919840.386638604080162
663.372.765736903160370.60426309683963
673.143.33011620204012-0.190116202040119
683.213.10080640843910.109193591560904
693.023.17085710323558-0.150857103235576
702.962.98034986574422-0.0203498657442234
712.922.919809701805360.000190298194640892
723.072.879752759339040.190247240660955


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
733.030785291023842.452092576713153.60947800533453
742.992112577409142.171494812544453.81273034227383
752.953439863794451.944709963728453.96216976386044
762.914767150179761.745451714440264.08408258591925
772.876094436565061.563559830635964.18862904249417
782.837421722950371.393840285472354.28100316042838
792.798749009335671.233218665425664.36427935324568
802.760076295720981.079699370798294.44045322064367
812.721403582106280.9319016212815664.510905542931
822.682730868491590.7888240396092764.5766376973739
832.64405815487690.6497136809399654.63840262881383
842.60538544126220.513987935923224.69678294660118
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767000xskov2vo9z0u3pi/1etcv1292767123.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767000xskov2vo9z0u3pi/1etcv1292767123.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767000xskov2vo9z0u3pi/273bg1292767123.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767000xskov2vo9z0u3pi/273bg1292767123.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767000xskov2vo9z0u3pi/373bg1292767123.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767000xskov2vo9z0u3pi/373bg1292767123.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Double ; 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