Home » date » 2009 » Jun » 07 »

huishoudbroodprijzen - exponential smoothing - Joris Hoefnagels

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 07 Jun 2009 14:09:25 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/07/t1244405469ww49rupy9dg9gdg.htm/, Retrieved Sun, 07 Jun 2009 22:11:13 +0200
 
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/2009/Jun/07/t1244405469ww49rupy9dg9gdg.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
40.04 40.04 40.03 40.03 41.63 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.03 42.38 42.06 42.06 42.05 42.05 42.05 42.05 44.36 44.48 44.49 44.49 44.49 44.49 44.49 44.48 44.48 44.48 44.48 44.48 44.48 44.49 44.49 44.49 44.49 44.49 44.49 44.49 44.49 45.5 45.94 45.95 45.96 45.96 45.96 45.96 45.96 45.96 45.96 45.96 45.97 46.06 47.9 47.93 47.94 47.94 47.94 47.94 47.94 47.94 47.94 47.94
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.894925705383375
beta0.00194398841394829
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1342.0341.52360002392990.5063999760701
1442.0342.02707917659290.0029208234071163
1542.0342.0799869748432-0.0499869748432147
1642.0342.0708617495105-0.0408617495104835
1742.0342.0685695653491-0.0385695653491140
1842.0342.0815838565958-0.0515838565958262
1942.0342.7441940129195-0.714194012919492
2042.0341.98639943829880.0436005617012256
2142.0341.90721959148540.122780408514600
2242.3841.89919789596440.480802104035611
2342.0642.2786232324901-0.218623232490089
2442.0642.1157796963423-0.0557796963422987
2542.0542.1686448008874-0.118644800887367
2642.0542.0587154064800-0.00871540647995772
2742.0542.0945256342213-0.0445256342213227
2842.0542.090128442476-0.0401284424760178
2944.3642.08761618134832.27238381865168
3044.4844.17011159432610.309888405673917
3144.4945.1228281182427-0.632828118242664
3244.4944.5158871038238-0.0258871038238340
3344.4944.37707587343330.112924126566696
3444.4944.39332716547440.096672834525613
3544.4944.34963070340710.140369296592922
3644.4844.5286923503892-0.048692350389203
3744.4844.5874775530088-0.107477553008820
3844.4844.5002271325712-0.0202271325712289
3944.4844.5249456558405-0.044945655840543
4044.4844.5233837679123-0.0433837679122959
4144.4844.7659788994564-0.285978899456438
4244.4944.3508663230730.139133676927010
4344.4945.0495630977604-0.55956309776036
4444.4944.5707960839758-0.0807960839757627
4544.4944.39615746955610.0938425304439363
4644.4944.39238925288130.0976107471187504
4744.4944.35288315708480.137116842915226
4844.4944.5079248156548-0.0179248156548297
4944.4944.5868623097427-0.09686230974269
5045.544.51708960041010.982910399589876
5145.9445.43725505010440.502744949895551
5245.9545.92708437369820.0229156263017884
5345.9646.2116943006226-0.251694300622589
5445.9645.86794842437490.092051575625149
5545.9646.4667498236828-0.506749823682789
5645.9646.0879636217293-0.127963621729272
5745.9645.88656275726640.0734372427336112
5845.9645.86193990525310.0980600947468773
5945.9645.82282106159240.137178938407622
6045.9645.9620497300195-0.00204973001952879
6145.9746.0496538079115-0.0796538079114981
6246.0646.1109550520416-0.0509550520416227
6347.946.05397498652531.8460250134747
6447.9347.69522049381990.234779506180089
6547.9448.1507024651347-0.210702465134716
6647.9447.87643626608070.0635637339193451
6747.9448.4060110834942-0.466011083494195
6847.9448.1088100038075-0.168810003807515
6947.9447.88942845469060.05057154530936
7047.9447.84339925732080.0966007426791649
7147.9447.80203816693980.137961833060182
7247.9447.92766763590480.0123323640952293


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7348.0237354997847.123478916118348.9239920834416
7448.165708815180546.955578589403849.3758390409573
7548.3555795309646.897551442451649.8136076194685
7648.172687024526246.51041764236349.8349564066894
7748.371044426497846.516919069023950.2251697839718
7848.312665080535146.291762401264950.3335677598053
7948.731497992690846.538863854801450.9241321305802
8048.884306860640246.540554415845151.2280593054353
8148.837572855032846.359604162067151.3155415479985
8248.748872081276646.145614110893251.35213005166
8348.622607048427445.901943889583551.3432702072713
8448.610639053481932.376324719407564.8449533875563
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244405469ww49rupy9dg9gdg/1j9h91244405363.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244405469ww49rupy9dg9gdg/1j9h91244405363.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244405469ww49rupy9dg9gdg/2m3zt1244405363.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244405469ww49rupy9dg9gdg/2m3zt1244405363.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244405469ww49rupy9dg9gdg/3c78u1244405363.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244405469ww49rupy9dg9gdg/3c78u1244405363.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=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