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:41:55 +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/t13057223327n8yflk0g48y1s9.htm/, Retrieved Wed, 18 May 2011 14:38:55 +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
alpha1
beta0.0295881156175766
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3106.32106.020.299999999999997
4105.81106.128876434685-0.318876434685265
5105.92105.6094414818680.310558518131913
6107.54105.7286303232091.81136967679141
7107.34107.402225338632-0.0622253386316771
8107.24107.2003842081180.039615791882099
9107.74107.1015563647480.638443635251619
10105.71107.620446708844-1.91044670884351
11105.41105.533920190741-0.123920190741032
12106.22105.230253625810.989746374189963
13106.32106.0695383559620.250461644038353
14106.12106.176949044043-0.0569490440432077
15106.22105.9752640291440.24473597085624
16105.92106.082505305345-0.162505305345235
17105.71105.777697079582-0.0676970795822172
18105.71105.5656940505650.144305949435449
19105.92105.5699637916810.350036208319253
20105.71105.790320703483-0.0803207034828546
21105.41105.577944165222-0.167944165221712
22104.49105.272975013844-0.782975013843838
23101.35104.329808258609-2.97980825860854
2499.72101.101641347335-1.38164134733462
2599.0199.4307611834077-0.420761183407663
2697.8998.7083116528656-0.818311652865617
2795.8697.5640993530694-1.70409935306941
2894.9595.483678264387-0.53367826438695
2995.3594.55788773019770.792112269802303
3095.1594.98132483961870.168675160381312
3195.4694.7863156197660.673684380234107
3295.5695.1162486710980.44375132890201
3395.0595.229378436723-0.179378436723013
3494.6494.714070966798-0.0740709667979473
3593.6394.3018793464684-0.67187934646843
3693.1293.271999702684-0.151999702684037
3793.5392.75750231790720.77249768209279
3897.1893.19035906863933.98964093136074
3996.2796.958405025789-0.688405025788995
4095.1596.0280364182942-0.878036418294215
4197.0894.88205697523332.1979430247667
42101.9596.8770899675715.07291003242906
43103.07101.8971878161281.17281218387198
44103.68103.0518891186220.628110881377893
45102.87103.680473736001-0.810473736000986
46102.56102.846493345395-0.286493345395172
47103.38102.5280165471680.85198345283203
48103.27103.373225132075-0.103225132074613
49102.89103.260170894932-0.370170894932144
50102.69102.869218235695-0.179218235694634
51101.54102.663915505816-1.12391550581611
52102.9101.4806609638861.41933903611435
53101.53102.882656531387-1.35265653138674
54101.96101.4726339735450.487366026454794
55101.99101.9170542158840.0729457841159729
56101.11101.949212544178-0.839212544178253
57101.75101.0443818263930.70561817360661
58101.71101.7052597384960.00474026150406814
59104.11101.6653999939012.44460000609864
60103.57104.137731101521-0.56773110152055
61103.32103.580933008049-0.260933008049065
62103.64103.3232124920380.31678750796155
63103.68103.652585637450.0274143625497771
64103.79103.6933967767790.0966032232210665
65103.01103.806255084117-0.796255084116638
66101.54103.002695396627-1.46269539662671
67101.9101.4894169961180.410583003881982
68103.68101.8615653735081.8184346264925
69104.62103.6953694274790.92463057252084
70104.11104.662727503762-0.552727503762455
71105.04104.1363733384760.903626661523901
72104.83105.093109948612-0.26310994861241
73105.05104.8753250210330.174674978967275
74104.68105.100493324506-0.420493324505898
75107.32104.7180517194042.60194828059598
76109.9107.4350384659612.46496153403878
77109.77110.087972032823-0.317972032823263
78110.69109.9485638395530.74143616044708
79110.54110.890501538391-0.350501538391271
80110.89110.7301308583490.159869141650773
81110.95111.084861084996-0.134861084996075
82109.73111.140870799621-1.41087079962089
83110.85109.879125791280.970874208719735
84110.39111.027852129618-0.637852129617968
85110.58110.548979287060.0310207129400766
86110.4110.739897131501-0.339897131500919
87111.07110.5498402158760.52015978412399
88110.86111.235230763708-0.375230763708259
89111.38111.0141283924880.365871607511593
90111.44111.544953843913-0.104953843912639
91110.36111.601848457444-1.24184845744445
92110.06110.485104501706-0.425104501706073
93108.34110.17252646056-1.83252646056003
94107.94108.398305455773-0.458305455772731
95107.39107.984745060959-0.594745060959141
96107.1107.417147675333-0.317147675332521
97107.61107.1177638732470.492236126753085
98107.74107.6423282126760.0976717873235486
99106.9107.775218136812-0.875218136812336
100106.71106.90932208139-0.199322081389752
101106.6106.7134245166-0.113424516600446
102108.21106.6000684988891.60993150111059
103110.54108.2577033382812.28229666171937
104110.91110.6552321957810.254767804218787
105109.51111.032770295028-1.52277029502805
106110.27109.587714391480.682285608520218
107111.39110.3679019369491.02209806305113
108112.13111.5181438926110.611856107389059
109111.64112.276247561858-0.636247561857672


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
110111.767422195436109.553005633928113.981838756944
111111.894844390872108.71651883852115.073169943224
112112.022266586308108.072212956841115.972320215776
113112.149688781744107.521974698767116.777402864722
114112.27711097718107.028417707404117.525804246956
115112.404533172616106.572668998615118.236397346617
116112.531955368052106.143692725182118.920218010922
117112.659377563488105.734412116629119.584343010347
118112.786799758924105.339990634824120.233608883025
119112.91422195436104.95696460555120.871479303171
120113.041644149796104.582763169281121.500525130312
121113.169066345232104.215423468622122.122709221842
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t13057223327n8yflk0g48y1s9/1u4q51305722512.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t13057223327n8yflk0g48y1s9/1u4q51305722512.ps (open in new window)


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


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