Home » date » 2010 » Jul » 29 »

Tijdreeks 2 - Stap 27

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 29 Jul 2010 14:34:16 +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/Jul/29/t1280414120g9tg96bd55q01d4.htm/, Retrieved Thu, 29 Jul 2010 16:35:21 +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/Jul/29/t1280414120g9tg96bd55q01d4.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:
Patrick Fieremans
 
Dataseries X:
» Textbox « » Textfile « » CSV «
259 258 257 255 253 252 253 255 256 256 257 259 267 263 266 257 249 249 251 252 252 252 256 257 259 260 261 253 243 233 241 239 233 228 228 227 225 230 222 207 190 184 192 187 173 167 163 156 153 157 152 128 115 114 136 132 126 124 123 119 105 107 108 92 74 73 100 97 99 102 99 103 92 99 97 87 69 66 95 91 93 99 91 91
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.703339343785154
beta0.111780621846133
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13267266.6989850427350.30101495726484
14263263.06737923417-0.0673792341703461
15266266.254703294283-0.25470329428282
16257257.331916940614-0.331916940614121
17249249.203727978248-0.203727978248168
18249249.066348988811-0.0663489888105175
19251252.72871104278-1.72871104277996
20252252.710957701073-0.710957701073482
21252252.311468372467-0.311468372467147
22252251.2934680532180.706531946781695
23256252.5886814133583.41131858664176
24257257.262807842518-0.262807842518498
25259265.33808068527-6.33808068526997
26260256.4434896956853.55651030431545
27261261.924815363002-0.924815363002153
28253252.2558717555370.744128244462729
29243244.755199868646-1.75519986864552
30233243.278051869614-10.2780518696139
31241238.1728102621152.82718973788542
32239240.927358314087-1.92735831408686
33233238.961236034472-5.96123603447214
34228232.997746078847-4.99774607884723
35228229.361064976328-1.36106497632835
36227227.491159037687-0.491159037686742
37225231.488117681057-6.48811768105722
38230223.2961283688756.70387163112531
39222227.781921449197-5.78192144919723
40207212.930267047946-5.93026704794619
41190197.207412128505-7.20741212850544
42184186.152096617264-2.15209661726439
43192188.0738116070133.92618839298657
44187187.701087248775-0.70108724877477
45173183.007411860488-10.0074118604882
46167171.772462666732-4.77246266673185
47163166.679350019811-3.67935001981115
48156160.560964536619-4.56096453661883
49153156.720434909742-3.72043490974195
50157151.41023214775.58976785230041
51152148.3424202834413.65757971655884
52128137.762092616605-9.76209261660503
53115116.34019078805-1.3401907880498
54114108.747420806415.25257919359026
55136116.09866180603119.9013381939695
56132125.2634579936886.73654200631194
57126123.2991835644072.70081643559263
58124123.8135960431380.186403956862137
59123124.180558819298-1.18055881929804
60119121.402611306797-2.40261130679667
61105121.343657746784-16.343657746784
62107110.938751721999-3.93875172199904
63108100.8685586576637.13144134233664
649289.29616544227112.70383455772891
657480.6662748405034-6.66627484050345
667372.39032795130470.609672048695259
6710081.563768220323218.4362317796768
689786.419462183905510.5805378160945
699986.890635917568612.1093640824314
7010294.94527581710437.05472418289565
7199101.946212647575-2.94621264757464
7210399.63379953453623.36620046546376
7392102.019983676966-10.0199836769657
7499102.763444802236-3.76344480223604
759799.1350561276357-2.13505612763575
768782.037557988734.96244201127006
776974.6999471899395-5.69994718993945
786671.8215712556196-5.82157125561956
799583.813909029130311.1860909708697
809182.72361946749078.27638053250928
819383.33038023697699.66961976302308
829989.28037609364219.71962390635794
839196.5091078205981-5.5091078205981
849195.3856107981544-4.38561079815436


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8588.857898257292476.1752451530761101.540551361509
8699.802056593826483.7022791195334115.901834068119
87100.89678604454781.4461449149307120.347427174162
8889.167423303649466.3592679771602111.975578630139
8976.547192638779750.3394684988334102.754916778726
9079.460633155080149.7922248949589109.129041415201
91102.86960592098669.6685618949362136.070649947036
9294.445645297806457.633719587132131.257571008481
9390.391078077665249.886404992253130.895751163077
9489.54111828215545.2598607475646133.822375816745
9584.637970660944336.4953699985855132.780571323303
9687.377747836124735.2888078049693139.46668786728
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280414120g9tg96bd55q01d4/12xdd1280414053.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280414120g9tg96bd55q01d4/12xdd1280414053.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280414120g9tg96bd55q01d4/2douy1280414053.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280414120g9tg96bd55q01d4/2douy1280414053.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280414120g9tg96bd55q01d4/3douy1280414053.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280414120g9tg96bd55q01d4/3douy1280414053.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