Home » date » 2008 » May » 26 »

opgave 10 oef 2 Brecht Martens

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 26 May 2008 11:27:05 -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/May/26/t12118236768gpiwuhkowrq1wo.htm/, Retrieved Mon, 26 May 2008 19:41:20 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3,42 3,42 3,43 3,47 3,51 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,58 3,6 3,61 3,61 3,61 3,63 3,68 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,78 3,79 3,79 3,8 3,8 3,8 3,8 3,81 3,95 3,99 4 4,06 4,16 4,19 4,2 4,2 4,2 4,2 4,2 4,23 4,38 4,43 4,44 4,44 4,44 4,44 4,44 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,46 4,46 4,46 4,48 4,58 4,67 4,68 4,68
 
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 time6 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0158617543048723
gamma0.145558896711419


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
133.523.455011111111110.064988888888887
143.523.52402504068665-0.00402504068665266
153.583.58104452981355-0.00104452981354752
163.63.598527961738280.00147203826171927
173.613.608134644180850.00186535581915059
183.613.608164231996540.00183576800345664
193.613.608193350497570.00180664950242493
203.633.62822200712810.00177799287190261
213.683.68075020921419-0.000750209214186892
223.693.69407164291329-0.0040716429132881
233.693.69525705951378-0.00525705951377997
243.693.69184033999407-0.00184033999407296
253.693.659727815639920.0302721843600828
263.693.69437465225717-0.00437465225717482
273.693.75138859593124-0.0613885959312355
283.693.70791486510545-0.0179148651054533
293.693.69721403725008-0.00721403725007885
303.783.687099609963670.0929003900363279
313.793.778573173125250.0114268268747453
323.793.80875442264563-0.0187544226456264
333.83.84095694460149-0.0409569446014917
343.83.81364062894248-0.0136406289424778
353.83.80467426463763-0.00467426463762832
363.83.80126678926706-0.00126678926705681
373.813.769163362433610.040836637566386
383.953.8139777698120.136022230188005
393.994.01321865434057-0.023218654340571
4044.01035036575013-0.0103503657501323
414.064.009769524124970.0502304758750283
424.164.060566267591920.0994337324080838
434.194.162143461024990.0278565389750085
444.24.212585314602-0.0125853146019965
454.24.25488568943393-0.05488568943393
464.24.21734843944661-0.0173484394466081
474.24.20832326276253-0.00832326276253426
484.24.20485790788025-0.00485790788024598
494.234.172697519605680.057302480394319
504.384.237773104137420.142226895862578
514.434.44711240554847-0.0171124055484722
524.444.4543409727761-0.0143409727760968
534.444.45369683312276-0.0136968331227632
544.444.44347957732101-0.00347957732101456
554.444.44342438512046-0.00342438512046428
564.444.46337006836504-0.0233700683650380
574.454.49549937808254-0.0454993780825435
584.454.46811101145971-0.0181110114597063
594.454.45907373904572-0.0090737390457214
604.454.45559648029302-0.00559648029301751
614.454.423424376964300.0265756230356953
624.454.45801257963406-0.00801257963406155
634.454.51496881939789-0.0649688193978921
644.454.47143829994713-0.0214382999471256
654.464.46068158423398-0.000681584233983124
664.464.46067077311232-0.000670773112324774
674.464.46066013347402-0.000660133474023716
684.484.48064966259905-0.000649662599049528
694.584.533139357810520.0468606421894773
704.674.597215983136830.0727840168631664
714.684.679620465329640.000379534670360115
724.684.686293152082-0.0062931520819971


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
734.654109998316544.574899459674524.73332053695855
744.662386663299744.549474128301854.77529919829763
754.727746661616284.588362478309964.8671308449226
764.750606659932814.588391997852554.91282132201307
774.763049991582684.580267782803834.94583220036153
784.765493323232554.563705500295554.96728114616955
794.767936654882424.548292117765194.98758119199965
804.790379986532294.553760704523545.02699926854104
814.845323318182164.592427354479235.09821928188509
824.863599983165364.594992590536225.1322073757945
834.873126648148564.589273639454615.15697965684252
844.879319979798434.580610550521615.17802940907526
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t12118236768gpiwuhkowrq1wo/1pf8r1211822819.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t12118236768gpiwuhkowrq1wo/1pf8r1211822819.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t12118236768gpiwuhkowrq1wo/2wnke1211822819.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t12118236768gpiwuhkowrq1wo/2wnke1211822819.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t12118236768gpiwuhkowrq1wo/3vmsj1211822819.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/26/t12118236768gpiwuhkowrq1wo/3vmsj1211822819.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=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