Home » date » 2009 » Aug » 19 »

Thomas van den Bosch opgave 10

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 19 Aug 2009 09:48:41 -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/Aug/19/t1250696958uq78q214238v0l8.htm/, Retrieved Wed, 19 Aug 2009 17:49:18 +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/Aug/19/t1250696958uq78q214238v0l8.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 «
5.93 5.9 5.9 5.94 5.86 5.92 5.9 5.91 5.84 5.84 5.83 5.82 5.8 5.91 5.92 5.96 5.9 5.92 6.09 6.31 6.25 6.23 6.22 6.19 6.15 6.12 6.13 6.1 6.05 6.07 6.09 6.17 6.12 6.12 6.13 6.19 6.24 6.41 6.5 6.53 6.58 6.53 6.51 6.51 6.49 6.49 6.49 6.53 6.65 6.61 6.52 6.62 6.6 6.61 6.63 6.62 6.6 6.59 6.59 6.52 6.52 6.61 6.59 6.6 6.48 6.53 6.56 6.56 6.49 6.45 6.44 6.43
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta4.7857361519868e-19
gamma0.0425143406904243


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135.85.789638180826160.0103618191738422
145.915.900475510808010.009524489191989
155.925.90138607436680.0186139256331979
165.965.941780144004690.0182198559953131
175.95.882878990749860.0171210092501433
185.925.903727359521470.0162726404785287
196.096.081594838677650.00840516132235436
206.316.120669753457720.189330246542281
216.256.248905948243820.00109405175618171
226.236.26319341225341-0.0331934122534143
236.226.23162127244342-0.0116212724434224
246.196.22247541860107-0.0324754186010647
256.156.17526655614421-0.0252665561442118
266.126.25563038306529-0.135630383065286
276.136.110547292484380.0194527075156152
286.16.15202033872586-0.0520203387258569
296.056.020720300598140.0292796994018572
306.076.05344712527420.0165528747257984
316.096.23530632444558-0.145306324445584
326.176.120669753457720.0493302465422811
336.126.110593597450320.0094064025496765
346.126.13323029168604-0.0132302916860390
356.136.121856337090930.00814366290906676
366.196.132655262586020.0573447374139757
376.246.175266556144210.064733443855788
386.416.346955921645730.063044078354272
396.56.399388974646760.100611025353238
406.536.522443538948870.0075564610511325
416.586.44409003798930.135909962010696
426.536.58245696426719-0.0524569642671864
436.516.70668821413392-0.196688214133925
446.516.54173984835998-0.031739848359984
456.496.446495020805950.0435049791940454
466.496.50312532714703-0.0131253271470317
476.496.49106566509476-0.00106566509475581
486.536.491935886646190.0380641133538147
496.656.513642526796560.136357473203437
506.616.76299448628996-0.152994486289963
516.526.59859013475875-0.0785901347587474
526.626.54246641463660.077533585363402
536.66.532702308606060.0672976913939412
546.616.602419599700880.00758040029911644
556.636.78866767321016-0.158667673210159
566.626.66204558976063-0.0420455897606313
576.66.555169010715130.0448309892848693
586.596.61309412147327-0.0230941214732727
596.596.59085196996065-0.000851969960653953
606.526.59173605999623-0.0717360599962289
616.526.503690292365610.0163097076343881
626.616.63107981945155-0.0210798194515460
636.596.59859013475875-0.00859013475874715
646.66.61254647954365-0.0125464795436550
656.486.51301069291345-0.0330106929134448
666.536.48264378709870.0473562129013008
676.566.70668821413392-0.146688214133925
686.566.59186724061025-0.0318672406102536
696.496.49589228894649-0.0058922889464883
706.456.50312532714703-0.0531253271470318
716.446.4511511431484-0.0111511431483962
726.436.44203579997116-0.0120357999711631


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
736.414120182487056.275557287540226.55268307743388
746.523640582127446.326234730931066.72104643332383
756.51257565362476.272038614554076.75311269269533
766.535033576409836.257202381219266.81286477160041
776.44904600060046.142406509982676.75568549121813
786.451747616837246.115776709564356.78771852411013
796.626499613595066.255378217878116.997621009312
806.658536284913676.261505435684577.05556713414277
816.593240754695546.177241177405927.00924033198517
826.606336793685216.167979461721177.04469412564926
836.60715385271276.14831134936417.06599635606128
846.60885563473971-2.6368126397116115.8545239091910
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/19/t1250696958uq78q214238v0l8/1qoes1250696916.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/19/t1250696958uq78q214238v0l8/1qoes1250696916.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/19/t1250696958uq78q214238v0l8/24b7o1250696916.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/19/t1250696958uq78q214238v0l8/24b7o1250696916.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/19/t1250696958uq78q214238v0l8/3qvd51250696916.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/19/t1250696958uq78q214238v0l8/3qvd51250696916.ps (open in new window)


 
Parameters (Session):
par1 = 0 ;
 
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