Home » date » 2011 » Jan » 16 »

opdracht 10 deel 2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Jan 2011 18:29:05 +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/Jan/16/t1295202407lzf39qcs74ys4y0.htm/, Retrieved Sun, 16 Jan 2011 19:26:51 +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/2011/Jan/16/t1295202407lzf39qcs74ys4y0.htm/},
    year = {2011},
}
@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 = {2011},
    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 «
110.04 111.73 110.99 115.83 125.33 123.03 123.46 130.34 131.21 132.97 133.91 133.14 135.31 133.09 135.39 131.85 130.25 127.65 118.3 119.73 122.51 123.28 133.52 153.2 163.63 168.45 166.26 162.31 161.56 156.59 157.97 158.68 163.55 162.89 164.95 159.82 159.05 166.76 164.55 163.22 160.68 155.24 157.6 156.56 154.82 151.11 149.65 148.99 148.53 146.7 145.11 142.7 143.59 140.96 140.77 139.81 140.58 139.59 138.05 136.06 135.98 134.75 132.22 135.37 138.84 138.83 136.55 135.63 139.14 136.09 135.97 134.51 134.54 134.08 132.86 134.48 129.08 133.13 134.78 134.13 132.43 127.84 128.12
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0586130494653002
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3110.99113.42-2.43000000000001
4115.83112.5375702897993.29242971020068
5125.33117.5705496352647.75945036473567
6123.03127.525354683316-4.49535468331612
7123.46124.961868236899-1.50186823689886
8130.34125.3038391596395.03616084036088
9131.21132.47902390409-1.2690239040904
10132.97133.274642543227-0.304642543227317
11133.91135.016786514772-1.1067865147719
12133.14135.891914382034-2.75191438203404
13135.31134.9606162882360.349383711764403
14133.09137.151094733016-4.06109473301564
15135.39134.6930615865460.696938413453864
16131.85137.033911272248-5.18391127224814
17130.25133.190066424424-2.94006642442415
18127.65131.417740165658-3.7677401656581
19118.3128.596901424956-10.296901424956
20119.73118.6433686323961.08663136760428
21122.51120.1370594104962.37294058950434
22123.28123.0561446946470.223855305353496
23133.52123.8392655367329.68073446326775
24153.2134.64668290468818.5533170953118
25163.63155.4141493973418.21585060265889
26168.45166.3257054551142.12429454488571
27166.26171.270216836353-5.01021683635253
28162.31168.786552749091-6.4765527490915
29161.56164.456942242444-2.8969422424444
30156.59163.53714362349-6.94714362348986
31157.97158.159950350644-0.189950350643727
32158.68159.528816781345-0.848816781345477
33163.55160.1890650413543.36093495864651
34162.89165.256059688334-2.36605968833433
35164.95164.4573777147840.492622285215873
36159.82166.546251809155-6.72625180915517
37159.05161.022005679149-1.97200567914908
38166.76160.1364204127316.6235795872687
39164.55168.234648610717-3.6846486107172
40163.22165.808680119435-2.58868011943503
41160.68164.326949683545-3.6469496835447
42155.24161.573190841346-6.33319084134564
43157.6155.7619832132891.83801678671131
44156.56158.229714982126-1.66971498212624
45154.82157.091847895286-2.27184789528593
46151.11155.218687962222-4.10868796222186
47149.65151.267865231455-1.61786523145472
48148.99149.713037216615-0.723037216615239
49148.53149.010657800473-0.480657800472528
50146.7148.522484981038-1.82248498103755
51145.11146.585663578694-1.4756635786942
52142.7144.909170436362-2.20917043636211
53143.59142.3696842202981.22031577970171
54140.96143.331210649457-2.37121064945725
55140.77140.5622267623680.20777323763204
56139.81140.384404985423-0.574404985422859
57140.58139.3907373575991.18926264240085
58139.59140.230443667685-0.640443667685446
59138.05139.202905311312-1.15290531131163
60136.06137.595330015271-1.53533001527094
61135.98135.515339641140.464660358859703
62134.75135.462574801739-0.712574801738697
63132.22134.190808619637-1.97080861963667
64135.37131.5452935165273.82470648347274
65138.84134.9194712268333.92052877316669
66138.83138.6192653737450.210734626254947
67136.55138.621617172818-2.07161717281778
68135.63136.220193372994-0.590193372994264
69139.14135.2656003396293.87439966037115
70136.09139.002690718571-2.9126907185705
71135.97135.7819690334060.18803096659417
72134.51135.672990101752-1.16299010175183
73134.54134.144823705390.395176294609826
74134.08134.197986193094-0.117986193093657
75132.86133.731070662522-0.871070662521646
76134.48132.4600145546912.01998544530849
77129.08134.198412061517-5.11841206151652
78133.13128.4984063221714.6315936778289
79134.78132.8198781515131.96012184848715
80134.13134.584766870376-0.454766870376233
81132.43133.908111597308-1.47811159730767
82127.84132.121474969139-4.28147496913948
83128.12127.2805246649890.839475335011144


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
84127.609728874325119.669801764698135.549655983952
85127.09945774865115.53694563977138.661969857529
86126.589186622974112.015892740242141.162480505706
87126.078915497299108.771598235899143.386232758699
88125.568644371624105.678650451113145.458638292134
89125.058373245949102.674898537738147.441847954159
90124.54810212027399.7247131562471149.3714910843
91124.03783099459896.8057337488157151.26992824038
92123.52755986892393.9030337874236153.152085950422
93123.01728874324891.006195690753155.028381795742
94122.50701761757288.1077024747243156.90633276042
95121.99674649189785.2019897933534158.791503190441
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295202407lzf39qcs74ys4y0/1qimv1295202543.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295202407lzf39qcs74ys4y0/1qimv1295202543.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295202407lzf39qcs74ys4y0/2ok7z1295202543.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295202407lzf39qcs74ys4y0/2ok7z1295202543.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295202407lzf39qcs74ys4y0/3sfn81295202543.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295202407lzf39qcs74ys4y0/3sfn81295202543.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