Home » date » 2011 » Jan » 16 »

opgave 10 oef 2 verbetering

*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 17:15:18 +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/t1295197995bwab2i81qci0w6z.htm/, Retrieved Sun, 16 Jan 2011 18:13:18 +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/t1295197995bwab2i81qci0w6z.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 «
102,8 106,3 103,7 106,9 104,3 105,4 96,2 95,7 95,9 93,6 94,7 94,5 96,6 96,7 98,9 102 105,2 106,4 99,3 96,4 93,1 95,6 93,3 96,7 105,6 105,2 107 104,9 104,5 105,2 99,7 100,2 98,5 98,4 97,1 98,4 100,6 111,3 119 117,8 108,8 109,3 103,5 103,7 110 105,5 110,4 106,7 110,2 105,2 108 108,1 107,2 106 99,4 100,2 100,3 100,8 99,5 100,2 103 111 120,5 109,5 106,6 105,5 103,9 104,9 104,8 99,6 97 95,4 99,3 103,9 107,4 107,4 111 113,2 108,5 113,3 113,8 105,3 107,5 109,4 118,9 119 115 124,1 120,5 117,7 117,1 118,1 119,6 118,8 124,9 124 124,9 121,7 121,6 125,1 127,9 129 130,1 130,3 127,9 124,1 125,7 129,2 129,2 132,6 131,5 131 125,8 127,2 127,3 127,5 122 118,4 118,3 115,5
 
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'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.792089098495697
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1396.697.6449252136752-1.04492521367523
1496.796.67549726392570.0245027360742682
1598.998.89898486813270.00101513186729107
16102101.9497015304310.0502984695690856
17105.2105.0811216539270.118878346073132
18106.4106.2585298166440.141470183355509
1999.394.60383272738854.69616727261149
2096.498.398528216149-1.99852821614893
2193.197.5320950571806-4.43209505718056
2295.692.0422267996373.55777320036292
2393.396.0435460873106-2.74354608731063
2496.793.5078257277443.19217427225605
25105.697.66480674686257.93519325313748
26105.2104.0307784670021.16922153299844
27107107.15610202213-0.15610202213044
28104.9110.092614442731-5.19261444273108
29104.5109.085438907981-4.58543890798077
30105.2106.541305747153-1.34130574715311
3199.794.65908918573575.04091081426432
32100.297.33495210125112.86504789874886
3398.599.8149394868075-1.3149394868075
3498.498.4553168871981-0.0553168871981313
3597.198.284633930865-1.18463393086506
3698.498.21781186696630.182188133033733
37100.6100.976741030751-0.376741030750779
38111.399.352200937322611.9477990626774
39119110.7395690358698.26043096413089
40117.8119.295579644212-1.4955796442121
41108.8121.343023482929-12.5430234829292
42109.3113.170264979995-3.87026497999506
43103.5100.6118197785832.88818022141652
44103.7101.1301426391912.5698573608086
45110102.5072478720597.49275212794144
46105.5108.385991053644-2.88599105364376
47110.4105.7383646240434.66163537595726
48106.7110.586485952449-3.88648595244908
49110.2110.0064552614710.193544738528786
50105.2111.396038550367-6.19603855036718
51108107.6452266451980.35477335480212
52108.1107.9108710840860.189128915914125
53107.2108.995870199595-1.79587019959548
54106111.138975691126-5.13897569112636
5599.498.98075300087590.419246999124127
56100.297.47727797827372.72272202172627
57100.399.99898913164440.301010868355576
58100.898.0233786109452.77662138905507
5999.5101.430279581408-1.9302795814078
60100.299.27976932231740.920230677682596
61103103.355369332751-0.355369332751238
62111102.9816997479448.01830025205578
63120.5111.8518958592878.64810414071262
64109.5118.652157919295-9.15215791929545
65106.6111.925322611123-5.32532261112334
66105.5110.577719247255-5.07771924725547
67103.999.62363220869944.27636779130063
68104.9101.6542580857033.24574191429681
69104.8104.0867474451950.71325255480491
7099.6102.95237548541-3.35237548540977
7197100.525948822834-3.52594882283444
7295.497.7041785105199-2.30417851051985
7399.398.9605480057610.339451994239027
74103.9100.8782160117423.02178398825835
75107.4105.9216691543361.47833084566402
76107.4103.3419634167414.05803658325864
77111107.8744199418813.12558005811931
78113.2113.272163893365-0.072163893365385
79108.5108.2277393514780.272260648521694
80113.3106.8724772562776.42752274372337
81113.8111.2986883787782.50131162122211
82105.3110.735330121946-5.43533012194581
83107.5106.6229300100480.87706998995185
84109.4107.5427622668781.85723773312245
85118.9112.6449838044996.25501619550066
86119119.805991788761-0.805991788761162
87115121.496604732586-6.49660473258601
88124.1113.13638840777310.9636115922268
89120.5122.944807739605-2.44480773960522
90117.7123.265462414386-5.56546241438573
91117.1113.941465616223.15853438378014
92118.1116.1521355731991.94786442680051
93119.6116.2137560839053.38624391609488
94118.8114.701228711014.09877128899019
95124.9119.4531031885885.4468968114125
96124124.196433011817-0.196433011817177
97124.9128.586310425202-3.68631042520201
98121.7126.404841433083-4.70484143308323
99121.6123.824077609704-2.22407760970408
100125.1122.4782527585052.62174724149479
101127.9122.8914157259645.00858427403639
102129128.4670028348470.532997165152693
103130.1125.7873434262784.31265657372221
104130.3128.6604695060631.63953049393731
105127.9128.776916846176-0.87691684617559
106124.1124.0357285167960.0642714832035693
107125.7125.872209673035-0.172209673035312
108129.2124.9913967156144.20860328438636
109129.2132.144871798543-2.94487179854281
110132.6130.3389245597462.26107544025425
111131.5133.791565395702-2.29156539570246
112131133.399784018277-2.39978401827739
113125.8130.331696256294-4.5316962562945
114127.2127.420007809943-0.220007809943283
115127.3124.9297337645022.37026623549787
116127.5125.7085415792731.79145842072658
117122125.422132538882-3.42213253888217
118118.4118.860589920037-0.460589920036497
119118.3120.232167070165-1.93216707016535
120115.5118.868129815959-3.36812981595936


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121118.532871754513110.57149365463126.494249854396
122120.141898547411109.98558519966130.298211895162
123120.857022515837108.902196695855132.811848335819
124122.257865275459108.741763028342135.773967522575
125120.647372477763105.732541619758135.562203335769
126122.221638265603106.028450219659138.414826311548
127120.444176219933103.066417484707137.821934955159
128119.225181534467100.738601044064137.71176202487
129116.43581541212396.9032575203225135.968373303924
130113.20064366666192.6753427586366133.725944574685
131114.63109213941193.1588976327161136.103286646106
132114.49895104895192.1198917188148136.878010379087
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295197995bwab2i81qci0w6z/1zcuz1295198117.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295197995bwab2i81qci0w6z/1zcuz1295198117.ps (open in new window)


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


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