Home » date » 2009 » Jun » 02 »

Opgave 10 Oefening 2 Anke Winckelmans

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 02 Jun 2009 13:12:36 -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/02/t124397063275a4fh7l00hi0pe.htm/, Retrieved Tue, 02 Jun 2009 21:23:55 +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/02/t124397063275a4fh7l00hi0pe.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 «
3779.7 3795.5 3813.1 3826.9 3833.3 3844.8 3851.3 3851.8 3854.1 3858.4 3861.6 3856.3 3855.8 3860.4 3855.1 3839.5 3833 3833.6 3826.8 3818.2 3811.4 3806.8 3810.3 3818.2 3858.9 3867.8 3872.3 3873.3 3876.7 3882.6 3883.5 3882.2 3888.1 3893.7 3901.9 3914.3 3930.3 3948.3 3971.5 3990.1 3993 3998 4015.8 4041.2 4060.7 4076.7 4103 4125.3 4139.7 4146.7 4158 4155.1 4144.8 4148.2 4142.5 4142.1 4145.4 4146.3 4143.5 4149.2 4158.9 4166.1 4179.1 4194.4 4211.7 4226.3 4235.8 4243.6 4258.7 4278.2 4298 4315.1 4334.3 4356 4374 4395.5
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.953329031569823
beta0.626323202133583
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
53833.33808.7635871323524.5364128676538
63844.83861.02704115044-16.2270411504383
73851.33861.14357370245-9.84357370245107
83851.83862.39634606019-10.5963460601874
93854.13852.251562824801.84843717520471
103858.43860.20611213384-1.80611213384418
113861.63862.19267532288-0.592675322885043
123856.33865.57620559282-9.2762055928174
133855.83851.404466157494.39553384251258
143860.43857.273698273213.12630172678837
153855.13862.62068956048-7.52068956048197
163839.53853.45652546211-13.9565254621148
1738333827.143547274105.85645272589545
183833.63826.880152704646.71984729535689
193826.83829.84500527164-3.04500527163873
203818.23822.00413013856-3.80413013855605
213811.43809.720872721781.67912727821704
223806.83806.432065448890.367934551109556
233810.33800.0229112285510.2770887714491
243818.23809.933939290748.26606070926118
253858.93821.7050545191337.1949454808714
263867.83885.74113334937-17.9411333493663
273872.33884.91421961965-12.6142196196479
283873.33881.81730666609-8.517306666085
293876.73877.81418623354-1.11418623353939
303882.63878.75665534183.84334465820257
313883.53887.95911392597-4.45911392597145
323882.23886.70995606965-4.50995606964534
333888.13883.147975985954.95202401404731
343893.73889.998028116313.70197188368684
353901.93898.488584164843.41141583516492
363914.33909.252096586045.04790341396347
373930.33925.473062106114.82693789389123
383948.33942.278507219136.02149278086654
393971.53964.490163567727.0098364322821
403990.13992.44306525081-2.34306525080865
4139934010.8955595138-17.8955595138009
4239984001.77961145368-3.77961145368454
434015.84004.5381792024011.2618207976047
444041.24028.4935694447712.7064305552340
454060.74061.94174084626-1.24174084625793
464076.74080.67032043543-3.97032043543049
4741034095.15772375567.84227624440018
484125.34125.076107947880.223892052119481
494139.74147.67231163608-7.97231163608012
504146.74157.53459980018-10.8345998001769
5141584159.63123052326-1.63123052326318
524155.14168.0864119263-12.9864119262975
534144.84157.74536911135-12.9453691113495
544148.24139.808485461468.39151453854356
554142.54149.21609995201-6.71609995201106
564142.14137.814742048534.28525795147380
574145.44139.773002858375.62699714162864
584146.34147.45750214121-1.15750214120726
594143.54148.27467061052-4.77467061052266
604149.24141.614747506717.58525249329159
614158.94151.127552754967.7724472450418
624166.14166.16942031988-0.0694203198809191
634179.14174.136448422694.96355157731523
644194.44189.431577898364.9684221016405
654211.74206.98130085374.71869914629769
664226.34227.4485221859-1.14852218590022
674235.84242.69597429281-6.89597429281184
684243.64247.66840880222-4.06840880221898
694258.74252.170288404766.52971159523986
704278.24270.752109549467.44789045054404
7142984295.733488009462.26651199053958
724315.14316.84840386786-1.74840386786036
734334.34332.711340315611.58865968439295
7443564352.322304172293.67769582770507
7543744376.92782063219-2.92782063219056
764395.54393.257990345352.24200965465388


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
774415.817467838394398.241746280244433.39318939654
784435.790943752914403.366700913254468.21518659257
794456.173212994874406.41508174724505.93134424254
804476.881195318764409.83445694874543.92793368881
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124397063275a4fh7l00hi0pe/1loq01243969954.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124397063275a4fh7l00hi0pe/1loq01243969954.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124397063275a4fh7l00hi0pe/2t0wy1243969954.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124397063275a4fh7l00hi0pe/2t0wy1243969954.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124397063275a4fh7l00hi0pe/3u3uo1243969954.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t124397063275a4fh7l00hi0pe/3u3uo1243969954.ps (open in new window)


 
Parameters (Session):
par1 = 4 ; par2 = Triple ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 4 ; 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