Home » date » 2008 » Aug » 18 »

Sanne Seghers - 2MAR03 - double exp. smoothing

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 18 Aug 2008 09:49:08 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Aug/18/t1219074650pcx5g92a14dsp7u.htm/, Retrieved Mon, 18 Aug 2008 15:50:54 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
Afzetprijsindexen van de verwerking en conservering van groenten en fruit
 
Dataseries X:
» Textbox « » Textfile « » CSV «
115.6 118.5 118.1 117.7 117.9 118.5 117 115.6 113.7 112.1 113.5 113.5 112.2 112.7 111.9 111.5 110.8 111.2 110.9 114.1 121.3 121.5 122.5 122.4 122.5 122.8 122.9 123.6 123.4 122.9 121 119 119 114.3 113.4 113.7 113.5 114.4 114.6 111.6 111.8 110.8 112.6 115.3 115.4 115.3 115.5 115 116.3 117 116.9 117.2 117.1 116.7 117.4 126.7 128.6 129.2 131.1 131.1 131.5 133.2 133.7 135.7 134.9 135.7 131.2 127.4 127.5 124.1 124.1 124.1 124.5 123.7 125.9 126 125.5 125.3
 
Text written by user:
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.320159117207958
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
3118.1121.4-3.30000000000001
4117.7119.943474913214-2.24347491321373
5117.9118.825205965521-0.92520596552103
6118.5118.728992840364-0.228992840364285
7117119.255678694746-2.25567869474631
8115.6117.033502595132-1.43350259513154
9113.7115.174553669759-1.47455366975889
10112.1112.802461868573-0.702461868573153
11113.5110.9775622968592.52243770314149
12113.5113.1851437251080.314856274891639
13112.2113.285947832125-1.08594783212504
14112.7111.6382717328581.06172826714200
15111.9112.478193717581-0.578193717580916
16111.5111.4930797273850.00692027261496264
17110.8111.095295315756-0.295295315756277
18111.2110.3007538281480.899246171851914
19110.9110.988655688681-0.0886556886808307
20114.1110.6602717616573.43972823834267
21121.3114.9615321178806.33846788211962
22121.5124.190850399471-2.69085039947079
23122.5123.529350111038-1.02935011103754
24122.4124.199794288190-1.79979428818984
25122.5123.523573737727-1.02357373772708
26122.8123.295867273459-0.495867273459126
27122.9123.437110844936-0.537110844936123
28123.6123.3651499109790.234850089021421
29123.4124.140339308156-0.740339308155853
30122.9123.703312928822-0.803312928822336
31121122.946124970689-1.94612497068884
32119120.423055318097-1.42305531809674
33119117.9674511837171.03254881628320
34114.3118.298031101212-3.99803110121215
35113.4112.3180249932781.08197500672190
36113.7111.7644291562711.93557084372873
37113.5112.6841198088930.815880191107084
38114.4112.7453312906251.65466870937479
39114.6114.1750885638900.42491143610971
40111.6114.511127834167-2.91112783416673
41111.8110.5791037167001.22089628329961
42110.8111.169984792964-0.369984792964075
43112.6110.0515307882682.54846921173167
44115.3112.6674464413282.632553558672
45115.4116.210282464675-0.810282464675083
46115.3116.050863146096-0.75086314609564
47115.5115.710467464098-0.210467464097661
48115115.843084386591-0.843084386591158
49116.3115.0731632336481.22683676635168
50117116.7659462097220.234053790278267
51116.9117.540880664596-0.640880664596395
52117.2117.235696876784-0.0356968767835752
53117.1117.524268196225-0.424268196225469
54116.7117.288434865062-0.588434865062496
55117.4116.7000420781300.699957921870293
56126.7117.6241399884789.07586001152158
57128.6129.829859317670-1.22985931767019
58129.2131.336108644235-2.13610864423492
59131.1131.252213986436-0.152213986436351
60131.1133.103481290912-2.00348129091219
61131.5132.462048489471-0.962048489471073
62133.2132.5540398943710.6459601056292
63133.7134.460849911541-0.76084991154059
64135.7134.7172568755340.982743124465998
65134.9137.031891046705-2.13189104670519
66135.7135.5493466912090.150653308791448
67131.2136.397579721556-5.19757972155566
68127.4130.233527186284-2.83352718628441
69127.5125.5263476237391.97365237626114
70124.1126.258230426198-2.15823042619802
71124.1122.1672532782151.93274672178489
72124.1122.7860397624481.31396023755167
73124.5123.2067161121491.29328388785078
74123.7124.020772739983-0.3207727399828
75125.9123.1180744227262.78192557727446
76126126.208733259684-0.208733259683967
77125.5126.241905403532-0.741905403531604
78125.3125.504377624485-0.204377624485119


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
79125.238944264653121.184742062575129.293146466731
80125.177888529306118.463537130918131.892239927694
81125.116832793959115.666571810868134.567093777049
82125.055777058612112.707462826733137.40409129049
83124.994721323264109.568368387637140.421074258892
84124.933665587917106.248069818557143.619261357278
85124.872609852570102.750498911595146.994720793545
86124.81155411722399.081205701149150.541902533297
87124.75049838187695.2460892932217154.254907470531
88124.68944264652991.2509120913367158.127973201721
89124.62838691118287.1011182295478162.155655592816
90124.56733117583582.8017781717002166.332884179969
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219074650pcx5g92a14dsp7u/1cpws1219074545.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219074650pcx5g92a14dsp7u/1cpws1219074545.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219074650pcx5g92a14dsp7u/240y51219074545.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219074650pcx5g92a14dsp7u/240y51219074545.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219074650pcx5g92a14dsp7u/3p9re1219074545.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/18/t1219074650pcx5g92a14dsp7u/3p9re1219074545.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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