Home » date » 2011 » May » 18 »

Opgave 10-Daphné Van den Buys

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 18 May 2011 17:52:00 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/18/t1305740965ufxzk05ni4h71p5.htm/, Retrieved Wed, 18 May 2011 19:49:28 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
476 475 470 461 455 456 517 525 523 519 509 512 519 517 510 509 501 507 569 580 578 565 547 555 562 561 555 544 537 543 594 611 613 611 594 595 591 589 584 573 567 569 621 629 628 612 595 597 593 590 580 574 573 573 620 626 620 588 566 557 561 549 532 526 511 499 555 565 542 527 510 514 517 508 493 490 469 478 528 534 518 506 502 516
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.908493182493487
beta0.125208658779051
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13519495.15261712648823.8473828735125
14517517.093475249971-0.093475249970652
15510512.075431881386-2.07543188138561
16509511.36144411155-2.36144411154982
17501503.739744728424-2.7397447284236
18507509.599514771422-2.59951477142238
19569568.1421080523140.857891947686085
20580579.5646284660760.435371533924354
21578579.7485661572-1.74856615719955
22565575.222868009268-10.2228680092677
23547555.126370653665-8.12637065366516
24555550.0660785558284.93392144417248
25562563.853913698699-1.85391369869876
26561556.6335525837124.36644741628822
27555552.1592753074562.84072469254409
28544553.671275484217-9.67127548421706
29537536.0321355606180.967864439381515
30543543.342096864995-0.342096864995142
31594606.108805718683-12.1088057186828
32611602.3409182403648.65908175963557
33613606.8445633751336.15543662486709
34611606.4567538625074.5432461374935
35594598.731864300194-4.73186430019359
36595598.322465538278-3.32246553827792
37591603.750211721385-12.7502117213853
38589584.941843265244.05815673476013
39584577.6385886605616.36141133943897
40573579.485372333632-6.48537233363197
41567564.125369174172.87463082583042
42569572.439615455722-3.43961545572233
43621632.876389185919-11.876389185919
44629630.297068467522-1.29706846752219
45628622.9773356929035.02266430709665
46612618.743104942904-6.74310494290387
47595596.259424804809-1.25942480480876
48597595.91781998031.08218001969976
49593601.742170238892-8.74217023889207
50590585.8245775097454.1754224902545
51580576.6322402231093.36775977689069
52574572.1454684485621.8545315514383
53573563.6864198566459.3135801433549
54573576.507065028749-3.50706502874903
55620635.67105170788-15.6710517078805
56626629.288303079767-3.28830307976693
57620619.2228278179110.77717218208943
58588608.209040035549-20.2090400355493
59566571.170539247736-5.17053924773575
60557563.598761917183-6.59876191718297
61561556.5535920664124.44640793358781
62549550.91896141542-1.91896141541974
63532533.191940704597-1.19194070459707
64526520.8091272548445.1908727451555
65511513.069113956602-2.06911395660245
66499509.072928369888-10.0729283698878
67555547.0063169083437.99368309165686
68565558.3958870363296.60411296367135
69542555.560954425597-13.5609544255969
70527526.9108333154460.089166684553902
71510509.2819984021580.718001597842317
72514505.6450854642738.3549145357266
73517513.3295233203833.67047667961651
74508507.2992614789860.700738521014387
75493493.578755031763-0.578755031763194
76490483.5471181089786.45288189102206
77469477.816520286092-8.81652028609182
78478466.96663495239811.033365047602
79528526.0761985478611.92380145213906
80534533.4847587826270.515241217373386
81518525.003655631961-7.00365563196101
82506506.05922847729-0.0592284772903895
83502490.85881728650911.1411827134908
84516500.53964122804315.4603587719569


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
85518.261494818009503.834489756166532.688499879853
86512.155297010596491.656341035812532.65425298538
87500.9753663982475.166427439476526.784305356925
88495.424374409046464.332533030446526.516215787647
89484.920491026349448.952230550487520.888751502211
90487.587968155072445.864114796691529.311821513452
91539.482715176359487.517508683408591.447921669309
92547.625260089619488.845066984406606.405453194832
93540.136685567944476.044819437564604.228551698324
94530.886999145872461.720459962608600.053538329137
95519.206889045054445.351424820548593.06235326956
96520.929590304987434.237970543672607.621210066301
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t1305740965ufxzk05ni4h71p5/1r4bk1305741119.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305740965ufxzk05ni4h71p5/1r4bk1305741119.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305740965ufxzk05ni4h71p5/2qczd1305741119.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305740965ufxzk05ni4h71p5/2qczd1305741119.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305740965ufxzk05ni4h71p5/3esx31305741119.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305740965ufxzk05ni4h71p5/3esx31305741119.ps (open in new window)


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