Home » date » 2008 » Jun » 01 »

opgave 10 oef 2

R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 01 Jun 2008 12:25:10 -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/Jun/01/t12123452251niyqcr49lnq4ce.htm/, Retrieved Sun, 01 Jun 2008 18:33:49 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
78 69 78 74 81 80 76 71 72 69 70 68 62 57 49 57 57 58 53 55 62 54 62 68 73 74 79 77 76 83 77 84 78 74 75 79 79 82 88 81 69 62 62 68 57 67 72 75 81 80 79 81 83 84 90 84 90 92 93 85 93 94 94 102 96 96 92 90 84 86 70 67
 
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 time8 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.690039354681511
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
136265.8847045912947-3.88470459129474
145759.6486145488604-2.64861454886037
154950.600721688916-1.60072168891604
165758.5915634346292-1.59156343462922
175758.4405615755904-1.44056157559039
185858.7912637201857-0.791263720185704
195352.80562904240350.194370957596519
205553.85951881967221.14048118032778
216259.6372771937682.362722806232
225451.61141925938072.38858074061930
236259.62413562201412.37586437798591
246865.35256903407322.64743096592683
257363.98702787876599.01297212123413
267466.58470403704397.41529596295612
277963.013697909860915.9863020901391
287787.7791692072488-10.7791692072488
297681.731326468887-5.73132646888706
308379.8828693472893.11713065271103
317774.7720147000372.22798529996304
328478.04859330619385.95140669380625
337890.1469770895449-12.1469770895449
347469.01088336665484.98911663334525
357580.9613005725973-5.96130057259728
367981.9926691848068-2.99266918480676
377978.20354114896920.796458851030806
388274.1348831525197.86511684748096
398872.283919870027715.7160801299723
408188.5253943469738-7.52539434697377
416986.4326655125165-17.4326655125165
426279.1258300697769-17.1258300697769
436261.18464490411230.81535509588769
446863.99349652734924.00650347265081
455768.3443836448818-11.3443836448818
466754.684893402779312.3151065972207
477267.46439616065074.53560383934929
487576.280351811562-1.280351811562
498174.87069284911826.12930715088179
508076.50333076811973.49666923188026
517973.6420507040935.35794929590706
528175.6232514730685.37674852693206
538378.50641321708464.49358678291539
548486.2025933492362-2.20259334923624
559083.91110758901356.08889241098647
568492.637590478116-8.63759047811602
579082.05437801672027.94562198327978
589289.05553956356052.94446043643946
599393.5452324173059-0.545232417305854
608598.1882770617686-13.1882770617686
619391.0702922639171.92970773608306
629488.47082058856855.52917941143147
639486.77600915819747.22399084180259
6410289.683905785882912.3160942141171
659696.784093133400-0.78409313339992
669699.15076370676-3.15076370675992
679298.9489664716977-6.94896647169774
689093.919750225103-3.9197502251029
698491.6090946664054-7.60909466640538
708686.3084784684595-0.308478468459498
717087.3828854337043-17.3828854337043
726775.9415462386613-8.94154623866126


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
7375.238172753341760.385641655687390.0907038509962
7472.90319609218455.168091882450490.6383003019175
7568.942785612244348.544789799237789.3407814252508
7668.33474727620146.203255671781290.4662388806207
7764.676619976007339.941823567486989.4114163845278
7866.126626643540139.220127674197493.0331256128829
7966.598720082976737.652642871527995.5447972944255
8067.082831005894136.609007987278597.5566540245098
8166.417352475890633.598277420308399.236427531473
8268.166837632206235.3571637951204100.976511469292
8364.312713697067528.767052140727999.8583752534072
8467NANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123452251niyqcr49lnq4ce/1gndd1212344700.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123452251niyqcr49lnq4ce/1gndd1212344700.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123452251niyqcr49lnq4ce/2xlrl1212344700.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123452251niyqcr49lnq4ce/2xlrl1212344700.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123452251niyqcr49lnq4ce/3v04y1212344700.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t12123452251niyqcr49lnq4ce/3v04y1212344700.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