Home » date » 2011 » May » 19 »

Opdracht 10 - Frederik Degrave

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 21:40:08 +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/19/t1305840995ftvzuulj9kxs3st.htm/, Retrieved Thu, 19 May 2011 23:36:39 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
101397 97994 94044 91159 87239 89235 118647 125620 125154 117529 109459 108483 107137 104699 100804 96066 91971 93228 120144 127233 127166 118194 109940 106683 102834 99882 96666 92540 88744 89321 115870 122401 122030 113802 105791 103076 98658 96945 92497 90687 88796 90015 113228 118711 117460 106556 97347 92657 93118 89037 83570 81693 75956 73993 97088 102394 96549 89727 82336 82653 82303 79596 74472 73562 66618 69029 89899 93774 90305 83799 80320 82497 84420 84646 84186 83269 77793 81145 101691 107357 104253 95963 91432 94324 93855 92183 87600 83641 78195 79604 100846 105293 102518 93132 87479 85476
 
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
alpha0.900408097789281
beta0.0913871909632014
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13107137104619.1203626992517.87963730095
14104699104788.600903621-89.6009036205942
15100804101107.044012316-303.044012315717
169606696386.2418227676-320.241822767552
179197192309.220569077-338.220569077064
189322893634.1045092177-406.10450921765
19120144122385.200894548-2241.20089454768
20127233127026.648110507206.351889492697
21127166126297.101235628868.898764372294
22118194119071.112083861-877.112083861415
23109940109936.7395746413.260425358676
24106683108778.639780748-2095.63978074784
25102834105602.799011237-2768.79901123731
2699882100189.850993115-307.850993115338
279666695816.083271503849.916728497075
289254091796.5158977738743.484102226226
298874488399.5644798924344.435520107581
308932189906.1450994609-585.14509946086
31115870116615.235722145-745.235722144673
32122401122198.509350494202.490649505969
33122030121160.191647546869.808352453896
34113802113723.64418616678.355813833914
35105791105567.788681764223.211318235582
36103076104192.210454025-1116.21045402451
3798658101690.265688471-3032.26568847099
389694596181.177528213763.822471787091
399249792895.7512132914-398.751213291398
409068787741.8926883042945.10731169602
418879686365.17943182542430.82056817465
429001589813.0884135216201.911586478367
43113228117711.978961515-4483.9789615154
44118711119881.489988966-1170.48998896581
45117460117571.564277521-111.564277521087
46106556109282.327540962-2726.32754096226
479734798716.4097847291-1369.40978472913
489265795381.3184261404-2724.31842614038
499311890740.79213266352377.20786733653
508903790403.0112230851-1366.01122308514
518357085030.5374366513-1460.53743665128
528169379214.13694026682478.86305973321
537595677325.3747977432-1369.37479774318
547399376233.3805450807-2240.38054508073
559708895444.61494446531643.3850555347
56102394101691.388380141702.611619859439
5796549100651.459162345-4102.45916234482
588972789026.4971809714700.50281902864
598233682293.222696575142.7773034248821
608265379892.38464016122760.61535983883
618230380791.18518347541511.81481652455
627959679495.9221631644100.07783683564
637447275849.6665180149-1377.66651801491
647356270905.860706022656.13929398003
656661869263.4236282681-2645.42362826811
666902966804.21721410972224.78278589029
678989989254.2266601605644.773339839463
689377494445.8340541212-671.83405412118
699030592023.1095263779-1718.10952637788
708379983829.4686167014-30.4686167014152
718032077121.04413437033198.9558656297
728249778436.38977145384060.61022854624
738442081063.61421711693356.3857828831
748464682051.20824988392594.79175011608
758418681278.48977967682907.51022032321
768326981537.27809406971731.7219059303
777779379128.9254372178-1335.92543721777
788114579776.99758410161368.0024158984
79101691106489.155519651-4798.15551965068
80107357108517.851037485-1160.85103748459
81104253106482.644097461-2229.64409746086
829596398107.6606378548-2144.66063785483
839143289747.98854465111684.01145534891
849432490266.99269408464057.00730591537
859385593303.7147578206551.285242179409
869218391819.453980905363.546019094982
878760088951.4032495159-1351.40324951588
888364184976.6796240965-1335.67962409648
897819579089.8023914219-894.802391421894
907960480062.2492385634-458.249238563352
91100846103405.854953713-2559.85495371318
92105293107280.903532959-1987.90353295897
93102518103862.126563669-1344.12656366943
949313295938.0798448168-2806.07984481685
958747987048.8786534814430.121346518601
968547686129.19066623-653.190666229959


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
9783765.890628166479993.191901931787538.5893544011
9881073.738760562875853.82668393586293.6508371907
9977223.784688400370831.865694045283615.7036827553
10074029.825155724866555.300606539181504.3497049105
10169294.415435209660975.53051159677613.3003588231
10270334.260542469460605.847024124280062.6740608145
10390435.423194178276592.3904681818104278.455920175
10495480.65778442279408.2751073703111553.040461474
10593668.729135795976418.8715391528110918.586732439
10687123.602123175669620.3753603256104626.828886026
10781425.480846168463634.28493779899216.6767545387
10880026.695623104461478.153026563198575.2382196458
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305840995ftvzuulj9kxs3st/155yf1305841206.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305840995ftvzuulj9kxs3st/155yf1305841206.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305840995ftvzuulj9kxs3st/22dl21305841206.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305840995ftvzuulj9kxs3st/22dl21305841206.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305840995ftvzuulj9kxs3st/3hm7q1305841206.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305840995ftvzuulj9kxs3st/3hm7q1305841206.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