Home » date » 2008 » Jun » 01 »

Ruts Wouter: exponentional smoothin plot opgave 10 eigen reeks

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 15:42:51 -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/t1212356983igag30s9h7a8l2f.htm/, Retrieved Sun, 01 Jun 2008 21:49:43 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
6,5300 6,5400 6,5400 6,5100 6,5100 6,4900 6,4600 6,4600 6,5200 6,4800 6,4900 6,4800 6,5300 6,4900 6,4800 6,5700 6,5300 6,5700 6,5500 6,5700 6,6200 6,5600 6,6500 6,5900 6,6800 6,7500 6,7700 6,8200 6,8800 6,8100 6,8700 6,9100 6,9800 7,0400 6,9900 7,0800 7,1300 7,1000 7,0200 7,0300 7,1200 7,1100 7,0900 7,0200 7,0300 7,0600 7,0500 7,1100 7,0600 7,0500 7,1100 7,0900 7,1300 7,0300 7,0600 7,1100 7,0800 7,1300 7,0000 7,0200 6,9600 6,9800 7,0200 7,0200 7,0600 7,0200 6,9400 6,9700 6,9700 6,9400 6,9300 7,0000 6,9700 6,9700 6,9800 6,9200 7,0000 6,9400 6,9700 6,9300 6,9200 6,8400 6,8600 6,8600 6,8400
 
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 time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.740672708482406
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
26.546.530.00999999999999979
36.546.537406727084820.00259327291517586
46.516.53932749355874-0.0293274935587418
56.516.51760541947159-0.007605419471588
66.496.51197229283242-0.0219722928324213
76.466.49569801518866-0.0356980151886637
86.466.46925746959143-0.00925746959143048
96.526.462400714515450.0575992854845477
106.486.50506293330194-0.0250629333019425
116.496.486499502610680.00350049738932068
126.486.48909222549306-0.00909222549306321
136.536.482357862210980.0476421377890164
146.496.51764509344507-0.0276450934450665
156.486.49716912720686-0.0171691272068593
166.576.484452423256280.085547576743724
176.536.54781517862716-0.0178151786271563
186.576.534619962021280.035380037978717
196.556.56082499057719-0.0108249905771904
206.576.552807215487090.0171927845129138
216.626.565541441758620.0544585582413797
226.566.60587740959131-0.0458774095913101
236.656.571897264371160.0781027356288426
246.596.62974582910926-0.0397458291092576
256.686.600307178212020.0796928217879751
266.756.659333476372330.0906665236276698
276.776.726487695996320.0435123040036789
286.826.758716072055040.0612839279449648
296.886.804107404952470.0758925950475264
306.816.86031897888008-0.0503189788800835
316.876.82304908450490.0469509154950973
326.916.857824346250380.0521756537496154
336.986.896469429029950.0835305709700478
347.046.958338243271420.0816617567285807
356.997.01882287780701-0.0288228778070083
367.086.997474558835430.0825254411645657
377.137.05859890086150.0714010991385008
387.17.11148374634903-0.0114837463490334
397.027.10297804883717-0.0829780488371696
407.037.04151847266036-0.0115184726603568
417.127.032987054317430.0870129456825701
427.117.097435168469170.0125648315308284
437.097.10674159627074-0.0167415962707356
447.027.09434155281657-0.0743415528165716
457.037.03927879353913-0.00927879353913319
467.067.032406244397050.0275937556029451
477.057.05284418609669-0.00284418609668968
487.117.050737575077030.0592624249229736
497.067.09463163585596-0.0346316358559609
507.057.06898092832735-0.0189809283273501
517.117.054922272733620.0550777272663794
527.097.09571684216507-0.0057168421650653
537.137.09148253319470.0385174668052999
547.037.12001136965726-0.0900113696572626
557.067.053342404699010.00665759530099219
567.117.058273503842570.0517264961574275
577.087.0965859078518-0.0165859078517991
587.137.084301178560570.0456988214394327
5977.11814904841057-0.118149048410566
607.027.03063927271969-0.0106392727196933
616.967.02275905377812-0.0627590537781151
626.986.976275135434490.00372486456551524
637.026.979034040960960.0409659590390437
647.027.009376408797980.0106235912020161
657.067.017245012867390.0427549871326089
667.027.04891246498803-0.0289124649880312
676.947.02749779123644-0.0874977912364425
686.976.962690565215120.00730943478488122
696.976.968104464074710.00189553592528746
706.946.96950843580252-0.0295084358025202
716.936.94765234273359-0.0176523427335891
7276.934577734230040.0654222657699579
736.976.98303422101293-0.0130342210129326
746.976.97338012923232-0.00338012923232522
756.986.97087655975880.00912344024120237
766.926.97763404295293-0.0576340429529267
7776.934946080258190.0650539197418087
786.946.98312974319075-0.0431297431907538
796.976.951184719485510.0188152805144917
806.936.96512068426503-0.0351206842650331
816.926.9391077519267-0.0191077519266951
826.846.92495516155414-0.0849551615541397
836.866.86203119194627-0.00203119194627455
846.866.86052674350598-0.000526743505980143
856.846.86013659896673-0.0201365989667304


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
866.845221969670426.751640532506026.93880340683482
876.845221969670426.728766796460966.96167714287987
886.845221969670426.709700276378416.98074366296243
896.845221969670426.69300353669266.99744040264824
906.845221969670426.677965360462557.01247857887828
916.845221969670426.664171989529027.02627194981182
926.845221969670426.651357539475787.03908639986506
936.845221969670426.63933914066287.05110479867804
946.845221969670426.627984631108037.06245930823281
956.845221969670426.617194815034927.07324912430591
966.845221969670426.606892984365137.08355095497571
976.845221969670426.597018369329617.09342557001123
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212356983igag30s9h7a8l2f/1vnm61212356565.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212356983igag30s9h7a8l2f/1vnm61212356565.ps (open in new window)


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212356983igag30s9h7a8l2f/3y9vs1212356565.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jun/01/t1212356983igag30s9h7a8l2f/3y9vs1212356565.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; 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