Home » date » 2010 » Dec » 18 »

opgave 10 deel 1

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 18 Dec 2010 11:16:28 +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/18/t1292670929t7snc4al1dq8a51.htm/, Retrieved Sat, 18 Dec 2010 12:15:33 +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/18/t1292670929t7snc4al1dq8a51.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:
KDGP2W101
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.594274923316469
beta0.0241142539120671
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
343129382944835
43786339840.6072043022-1977.60720430219
53595337310.3126917716-1357.31269177162
62913335129.1926884732-5996.19268847325
72469330105.3742131582-5412.37421315824
82220525350.9424083448-3145.94240834485
92172521898.3112741991-173.311274199077
102719220209.75664275596982.2433572441
112179022873.6277044564-1083.62770445643
121325320728.6249365727-7475.62493657274
133770214677.889087534423024.1109124656
143036427082.32835977193281.67164022814
153260927801.35903102834807.64096897165
163021229496.1308896787715.869110321277
172996528769.52410050551195.4758994945
182835228345.06736225766.93263774241859
192581427214.3885164138-1400.38851641381
202241425227.3057370169-2813.30573701693
212050622360.2456169729-1854.24561697288
222880620036.55861609558769.44138390453
232222824151.9328411358-1923.93284113584
241397121884.9320059530-7913.93200595302
253684515944.814302355720900.1856976443
263533827427.71422327847910.28577672164
273502231304.40068660833717.59931339171
283477732742.75376700932034.24623299068
292688733209.8840829477-6322.88408294773
302397028619.9713536830-4649.97135368304
312278024957.5923105991-2177.59231059912
321735122733.2801549976-5382.28015499757
332138218527.37163005792854.62836994208
342456119257.35952870445303.64047129556
351740921518.7377067351-4109.73770673514
361151418127.0867084793-6613.08670847931
373151413152.989358945718361.0106410543
382707123283.49419349393787.50580650611
392946224807.60739834284654.39260165723
402610526913.5894433004-808.589443300443
412239725761.4707643099-3364.47076430986
422384323042.2413731133800.758626886691
432170522809.778627581-1104.778627581
441808921429.0708501340-3340.07085013404
452076418672.12008526452091.87991473551
462531619173.21912222236142.78087777768
471770422169.6961175754-4465.6961175754
481554818797.8256178990-3249.82561789898
492802916101.944851880711927.0551481193
502938322596.22436006746786.77563993261
513643826133.022521539110304.9774784609
523203431908.2752534138125.724746586246
532267931636.0550466623-8957.0550466623
542431925837.8075297268-1518.80752972681
551800424438.1587196985-6434.1587196985
561753720025.2352698424-2488.23526984243
572036617921.61752899932444.38247100073
582278218784.36003203243997.63996796759
591916920627.4526801134-1458.45268011344
601380719207.2259372748-5400.22593727476
612974315367.114275982414375.8857240176
622559123485.46343423722105.53656576276
632909624342.02517156794753.97482843212
642648226840.6141734928-358.614173492802
652240526295.7806192299-3890.78061922994
662704423596.11230365033447.88769634975
671797025307.0404807576-7337.04048075762
681873020503.6128602856-1773.61286028561
691968418980.9740096469703.025990353104
701978518940.2142334740844.785766525962
711847918995.8049367969-516.804936796925
721069818234.8303580308-7536.8303580308


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7313194.0241901101447.14858640008225940.8997938201
7412632.1673052573-2289.8490200031627554.1836305178
7512070.3104204046-4832.8815609695928973.5024017788
7611508.4535355519-7245.3076196733530262.2146907771
7710946.5966506991-9564.139126027331457.3324274256
7810384.7397658464-11813.116189915832582.5957216086
799822.88288099367-14008.480366305133654.2461282924
809261.02599614093-16161.881265730434683.9332580123
818699.1691112882-18281.982889006635680.3211115830
828137.31222643546-20375.415791834336650.0402447052
837575.45534158273-22447.373255259637598.2839384251
847013.59845673-24502.001378349838529.1982918098
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292670929t7snc4al1dq8a51/1aj3j1292670985.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292670929t7snc4al1dq8a51/1aj3j1292670985.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292670929t7snc4al1dq8a51/2ktkm1292670985.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292670929t7snc4al1dq8a51/2ktkm1292670985.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292670929t7snc4al1dq8a51/3ktkm1292670985.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292670929t7snc4al1dq8a51/3ktkm1292670985.ps (open in new window)


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