Home » date » 2010 » May » 28 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 28 May 2010 14:31:39 +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/May/28/t12750572302pyp8nsrkw0rwpr.htm/, Retrieved Fri, 28 May 2010 16:33:51 +0200
 
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/May/28/t12750572302pyp8nsrkw0rwpr.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:
KDGP2W61
 
Dataseries X:
» Textbox « » Textfile « » CSV «
41086 39690 43129 37863 35953 29133 24693 22205 21725 27192 21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698
 
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.298636158049011
beta0
gamma0.619823384767296


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133770240443.7037927351-2741.70379273505
143036431996.9844988044-1632.98449880435
153260933561.8688751679-952.86887516793
163021230629.3187017367-417.31870173672
172996529937.661507874827.3384921251818
182835228050.12836337301.871636629967
192581421460.41407573064353.5859242694
202241420567.60484313081846.39515686924
212050621231.3911255919-725.391125591916
222880627004.35736666911801.64263333094
232222822474.1539274377-246.153927437736
241397113911.154390832559.8456091675198
253684536937.4508844866-92.4508844865995
263533829763.87864866565574.12135133435
273502233776.72645399281245.27354600721
283477731733.43637550323043.56362449683
292688732268.6259188965-5381.62591889647
302397028885.1259418206-4915.12594182057
312278022498.7957062659281.20429373407
321735119299.8958105312-1948.89581053121
332138217712.25964813123669.74035186876
342456125896.3275058556-1335.32750585557
351740919539.0897327482-2130.08973274819
361151410546.5034871906967.49651280944
373151433777.6507673379-2263.65076733789
382707128419.0617150119-1348.06171501192
392946228482.8512417911979.148758208943
402610527141.8424179566-1036.84241795661
412239722795.8623682015-398.862368201477
422384321103.19342234112739.80657765889
432170519261.86039270312443.13960729689
441808915739.11962111252349.8803788875
452076417877.79658726842886.20341273161
462531623652.06032366371663.93967633631
471770417845.0117841157-141.011784115715
481554810793.02412619944754.97587380063
492802933750.5998189922-5721.59981899219
502938327757.3685860671625.63141393296
513643829720.89932163676717.10067836331
523203429217.0552819092816.94471809096
532267926299.2991948781-3620.29919487807
542431925009.0402644495-690.040264449468
551800422014.4633783915-4010.46337839154
561753716523.90159428991013.09840571007
572036618496.51839446491869.48160553511
582278223435.8076544214-653.807654421384
591916916151.94437048193017.05562951808
601380712171.46196092951635.53803907052
612974329643.065818431299.9341815688058
622559128582.3560621918-2991.3560621918
632909631380.4596235772-2284.45962357716
642648226492.9417286765-10.9417286764692
652240519932.26681321612472.73318678387
662704421735.45483847555308.54516152455
671797019088.8124421773-1118.81244217734
681873016645.65355552932084.34644447074
691968419310.4721237642373.527876235796
701978522706.0868862811-2921.08688628111
711847916340.93600901582138.06399098422
721069811497.3792236086-799.379223608617


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7327574.268409076922373.729641692932774.807176461
7425139.863710464719712.375660466330567.351760463
7529138.597582540423493.276546967234783.9186181136
7625921.649520901520066.594213178531776.7048286246
7720443.949608759514386.417461233926501.4817562851
7822741.479127472116488.0225808828994.9356740643
7915715.40130801379271.975057801222158.8275582261
8014998.84298079048370.8896840525521626.7962775282
8116297.4703605169489.9900656089523104.9506554231
8218149.295628243811166.902698355225131.6885581324
8314855.80963892287702.779924936622008.8393529089
848096.77929892456777.08960939678215416.4689884523
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/28/t12750572302pyp8nsrkw0rwpr/1wcwh1275057095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t12750572302pyp8nsrkw0rwpr/1wcwh1275057095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t12750572302pyp8nsrkw0rwpr/274dk1275057095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t12750572302pyp8nsrkw0rwpr/274dk1275057095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t12750572302pyp8nsrkw0rwpr/374dk1275057095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t12750572302pyp8nsrkw0rwpr/374dk1275057095.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