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 06:30:12 -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/t1263994301g65qspdvh9qeiln.htm/, Retrieved Wed, 20 Jan 2010 14:31:45 +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/t1263994301g65qspdvh9qeiln.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 «
10.846 10.413 10.709 10.662 10.570 10.297 10.635 10.872 10.296 10.383 10.431 10.574 10.653 10.805 10.872 10.625 10.407 10.463 10.556 10.646 10.702 11.353 11.346 11.451 11.964 12.574 13.031 13.812 14.544 14.931 14.886 16.005 17.064 15.168 16.050 15.839 15.137 14.954 15.648 15.305 15.579 16.348 15.928 16.171 15.937 15.713 15.594 15.683 16.438 17.032 17.696 17.745 19.394 20.148 20.108 18.584 18.441 18.391 19.178 18.079 18.483 19.644 19.195 19.650 20.830 23.595 22.937 21.814 21.928 21.777 21.383 21.467
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.824846748999328
beta0.0184321753657881
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1310.65310.61884695512820.0341530448717915
1410.80510.8272771840405-0.0222771840404850
1510.87210.8836140926889-0.011614092688923
1610.62510.58473650682720.0402634931728088
1710.40710.33705380054960.0699461994503903
1810.46310.39279322047300.0702067795269752
1910.55610.8778983165717-0.321898316571737
2010.64610.8539744137037-0.207974413703745
2110.70210.09302495367840.608975046321627
2211.35310.69606728589880.656932714101233
2311.34611.32323849880650.0227615011935320
2411.45111.5142033745942-0.0632033745942362
2511.96411.57178149249540.392218507504602
2612.57412.08444342805120.489556571948823
2713.03112.59138071045750.439619289542481
2813.81212.70719675573851.10480324426148
2914.54413.39238890400861.15161109599137
3014.93114.40642074811910.524579251880875
3114.88615.2705821796915-0.384582179691529
3216.00515.28690197130300.718098028696959
3317.06415.51898558783781.54501441216219
3415.16817.0028220489699-1.83482204896988
3516.0515.5260215147180.523978485282003
3615.83916.1853981436523-0.3463981436523
3715.13716.1548885669791-1.01788856697908
3814.95415.5657744386017-0.611774438601712
3915.64815.1830885055540.464911494445989
4015.30515.4642131771372-0.159213177137227
4115.57915.12370358641310.455296413586936
4216.34815.45168883854760.89631116145242
4315.92816.467014230709-0.539014230708997
4416.17116.5505260126632-0.379526012663245
4515.93716.0068238736702-0.0698238736701615
4615.71315.52687410527190.186125894728088
4715.59416.1211206455525-0.527120645552506
4815.68315.7359948118279-0.0529948118278867
4916.43815.80928764541570.628712354584263
5017.03216.65393695971720.378063040282843
5117.69617.29578732221310.400212677786904
5217.74517.43273128483330.312268715166656
5319.39417.61442699629591.77957300370412
5420.14819.15778822929630.990211770703663
5520.10820.04639853751490.0616014624851289
5618.58420.7096259065367-2.12562590653671
5718.44118.8097218746401-0.368721874640141
5818.39118.15333072589320.237669274106786
5919.17818.69122208590180.486777914098187
6018.07919.2669237749264-1.18792377492640
6118.48318.5476941381383-0.064694138138254
6219.64418.79016172956370.853838270436285
6319.19519.8492412889133-0.654241288913337
6419.6519.10589499537640.544105004623589
6520.8319.74422434805981.08577565194016
6623.59520.57490271941463.02009728058540
6722.93723.0039230022748-0.0669230022748337
6821.81423.2047979754168-1.3907979754168
6921.92822.2566745199270-0.328674519926960
7021.77721.7780692448329-0.00106924483286619
7121.38322.1975819504328-0.814581950432768
7221.46721.42165807837940.0453419216206044


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7321.950297528538220.348620459761323.5519745973151
7422.441871962548820.35005179272624.5336921323717
7522.554399400394320.053964228438725.0548345723500
7622.592421695162119.729564957973925.4552784323502
7722.900376297360919.705346476748726.0954061179732
7823.181304163736619.675571343603326.6870369838699
7922.539633961316818.739242423786826.3400254988468
8022.52597520515818.443348448044026.608601962272
8122.894372672596418.539381881507027.2493634636857
8222.732543069266618.113184620041127.3519015184921
8322.998753032919618.12160116938627.8759048964532
8423.046042262154717.916564293659328.1755202306501
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/20/t1263994301g65qspdvh9qeiln/1ynmt1263994209.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/20/t1263994301g65qspdvh9qeiln/1ynmt1263994209.ps (open in new window)


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


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