Home » date » 2011 » May » 18 »

Isabelle Regnard, oef 10, Exponential Smoothing, Koffie, thee, cacao

*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 12:15:22 +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/t1305720804txrk3nz5fk9oj2s.htm/, Retrieved Wed, 18 May 2011 14:13:37 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
106,42 106,22 106,32 105,81 105,92 107,54 107,34 107,24 107,74 105,71 105,41 106,22 106,32 106,12 106,22 105,92 105,71 105,71 105,92 105,71 105,41 104,49 101,35 99,72 99,01 97,89 95,86 94,95 95,35 95,15 95,46 95,56 95,05 94,64 93,63 93,12 93,53 97,18 96,27 95,15 97,08 101,95 103,07 103,68 102,87 102,56 103,38 103,27 102,89 102,69 101,54 102,9 101,53 101,96 101,99 101,11 101,75 101,71 104,11 103,57 103,32 103,64 103,68 103,79 103,01 101,54 101,9 103,68 104,62 104,11 105,04 104,83 105,05 104,68 107,32 109,9 109,77 110,69 110,54 110,89 110,95 109,73 110,85 110,39 110,58 110,4 111,07 110,86 111,38 111,44 110,36 110,06 108,34 107,94 107,39 107,1 107,61 107,74 106,9 106,71 106,6 108,21 110,54 110,91 109,51 110,27 111,39 112,13 111,64
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.999924063401756
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
2106.22106.42-0.200000000000003
3106.32106.220015187320.0999848126803471
4105.81106.319992407493-0.509992407493442
5105.92105.8100387270890.109961272911448
6107.54105.9199916499151.620008350085
7107.34107.539876982077-0.199876982076773
8107.24107.340015177978-0.100015177978094
9107.74107.2400075948120.499992405187612
10105.71107.739962032278-2.02996203227761
11105.41105.710154148411-0.300154148411295
12106.22105.4100227926850.809977207315029
13106.32106.2199384930860.100061506913775
14106.12106.31999240167-0.199992401669547
15106.22106.1200151867430.0999848132573362
16105.92106.219992407493-0.299992407493392
17105.71105.920022780403-0.210022780402937
18105.71105.710015948416-1.5948415509115e-05
19105.92105.7100000012110.20999999878893
20105.71105.919984053314-0.209984053314471
21105.41105.710015945475-0.300015945474698
22104.49105.41002278219-0.920022782190316
23101.35104.4900698634-3.14006986340038
2499.72101.350238446224-1.63023844622367
2599.0199.720123794762-0.710123794761927
2697.8999.0100539243853-1.12005392438532
2795.8697.8900850530849-2.03008505308487
2894.9595.860154157753-0.910154157753084
2995.3594.95006911401060.399930885989377
3095.1595.349969630609-0.199969630608976
3195.4695.15001518501350.309984814986493
3295.5695.45997646080760.100023539192364
3395.0595.5599924045527-0.50999240455269
3494.6495.0500387270883-0.41003872708832
3593.6394.640031136946-1.01003113694608
3693.1293.6300766983287-0.510076698328646
3793.5393.12003873348930.409961266510678
3897.1893.5299688689363.650031131064
3996.2797.1797228290524-0.909722829052427
4095.1596.270069081257-1.12006908125697
4197.0895.15008505423581.92991494576417
42101.9597.07985344882414.87014655117588
43103.07101.9496301776381.12036982236204
44103.68103.0699149229270.610085077073094
45102.87103.679953672215-0.809953672214604
46102.56102.870061505127-0.310061505126598
47103.38102.5600235450160.819976454984044
48103.27103.379937733777-0.109937733777372
49102.89103.270008348298-0.380008348297523
50102.69102.890028856541-0.20002885654128
51101.54102.690015189511-1.15001518951091
52102.9101.5400873282411.35991267175858
53101.53102.899896732858-1.36989673285781
54101.96101.5301040252980.429895974702148
55101.99101.9599673551620.0300326448379167
56101.11101.989997719423-0.879997719423102
57101.75101.1100668240330.639933175966732
58101.71101.749951405652-0.0399514056515073
59104.11101.7100030337742.39999696622615
60103.57104.109817752395-0.539817752394583
61103.32103.570040991924-0.250040991923782
62103.64103.3200189872620.319981012737671
63103.68103.639975701730.0400242982696142
64103.79103.6799969606910.110003039309063
65103.01103.789991646743-0.779991646743397
66101.54103.010059229912-1.47005922991232
67101.9101.5401116312970.359888368702869
68103.68101.8999726713021.78002732869847
69104.62103.679864830780.940135169220127
70104.11104.619928609333-0.509928609333357
71105.04104.1100387222440.929961277756078
72104.83105.039929381904-0.209929381904075
73105.05104.8300159413230.219984058676872
74104.68105.049983295159-0.369983295158903
75107.32104.6800280952732.63997190472715
76109.9107.3197995295142.58020047048592
77109.77109.899804068353-0.129804068353494
78110.69109.7700098568790.919990143120614
79110.54110.689930139078-0.149930139078108
80110.89110.5400113851850.34998861481526
81110.95110.8899734230550.0600265769448356
82109.73110.949995441786-1.21999544178594
83110.85109.7300926423041.11990735769628
84110.39110.849914958045-0.459914958044905
85110.58110.3900349243770.189965075622595
86110.4110.579985574698-0.179985574698364
87111.07110.4000136674920.669986332507719
88110.86111.069949123517-0.209949123517035
89111.38110.8600159428220.519984057177751
90111.44111.379960514180.0600394858204396
91110.36111.439995440806-1.07999544080567
92110.06110.36008201118-0.300082011179882
93108.34110.060022787207-1.72002278720711
94107.94108.340130612679-0.400130612679376
95107.39107.940030384558-0.550030384557573
96107.1107.390041767436-0.290041767436335
97107.61107.1000220247850.509977975214838
98107.74107.6099612740070.13003872599262
99106.9107.739990125302-0.839990125301497
100106.71106.900063785993-0.190063785992692
101106.6106.710014432797-0.110014432797357
102108.21106.6000083541221.60999164587822
103110.54108.2098777427112.33012225728879
104110.91110.5398230584420.370176941557702
105109.51110.909971890022-1.3999718900223
106110.27109.5101063091030.759893690897016
107111.39110.2699422962581.12005770374192
108112.13111.3899149466280.740085053371857
109111.64112.129943800459-0.489943800458633


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
110111.640037204666109.442602820961113.83747158837
111111.640037204666108.532513686428114.747560722903
112111.640037204666107.834161883257115.445912526074
113111.640037204666107.245418733419116.034655675912
114111.640037204666106.726723042765116.553351366566
115111.640037204666106.257784832355117.022289576976
116111.640037204666105.826550716769117.453523692562
117111.640037204666105.425167158505117.854907250826
118111.640037204666105.048179026854118.231895382477
119111.640037204666104.691614449673118.588459959658
120111.640037204666104.352474969748118.927599439584
121111.640037204666104.028431074977119.251643334354
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t1305720804txrk3nz5fk9oj2s/1tpn81305720919.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305720804txrk3nz5fk9oj2s/1tpn81305720919.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2011/May/18/t1305720804txrk3nz5fk9oj2s/35r191305720919.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305720804txrk3nz5fk9oj2s/35r191305720919.ps (open in new window)


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