Home » date » 2009 » Jun » 05 »

opgave10oef2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 05 Jun 2009 02:16:34 -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/05/t1244189877vry99gsnzl0opwi.htm/, Retrieved Fri, 05 Jun 2009 10:17:57 +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/05/t1244189877vry99gsnzl0opwi.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 «
0,8832 0,8707 0,8766 0,8860 0,9170 0,9561 0,9935 0,9781 0,9806 0,9812 1,0013 1,0194 1,0622 1,0785 1,0797 1,0862 1,1556 1,1674 1,1365 1,1155 1,1267 1,1714 1,1710 1,2298 1,2638 1,2640 1,2261 1,1989 1,2000 1,2146 1,2266 1,2191 1,2224 1,2507 1,2997 1,3406 1,3123 1,3013 1,3185 1,2943 1,2697 1,2155 1,2041 1,2295 1,2234 1,2022 1,0000 1,1861 1,2126 1,1940 1,2028 1,2273 1,2767 1,2661 1,2681 1,2810 1,2722 1,2617 1,2888 1,3205 1,2993 1,3080 1,3246 1,3513 1,3518 1,3421 1,3726 1,3626 1,3910 1,4233 1,4683 1,4559 1,4728 1,4759 1,5520 1,5754 1,5554 1,5562 1,5759 1,4955 1,4342 1,3266 1,2744 1,3511 1,3244 1,2797 1,3050 1,3203
 
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
alpha0.983881209935916
beta0
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
30.87660.87070.00590000000000002
40.8860.8765048991386220.00949510086137806
50.9170.8858469504625780.0311530495374219
60.95610.916497850534650.0396021494653497
70.99350.9554616612666820.0380383387333185
80.97810.992886868003571-0.0147868680035712
90.98060.9783383464210550.00226165357894514
100.98120.9805635448807630.000636455119236601
111.00130.9811897411135480.0201102588864523
121.01941.000975846958870.0184241530411251
131.06221.019103024945020.0430969750549783
141.07851.061505328906690.0169946710933082
151.07971.078226066464440.00147393353556136
161.08621.079676241974770.00652375802522798
171.15561.086094844913960.0695051550860375
181.16741.154479660996800.0129203390032036
191.13651.16719173976805-0.0306917397680504
201.11551.13699471371002-0.0214947137100228
211.12671.115846468777780.0108535312222207
221.17141.126525054208780.044874945791225
231.1711.170676670169650.000323329830345997
241.22981.170994788314340.0588052116856568
251.26381.228852131138160.0349478688618352
261.2641.263236682638630.00076331736137103
271.22611.2639876962477-0.0378876962476999
281.19891.22671070382183-0.0278107038218283
291.21.199348274896440.000651725103561374
301.21461.199989494979880.0146105050201237
311.22661.214364496336850.0122355036631496
321.21911.22640277848513-0.00730277848512517
331.22241.219217711953290.00318228804671361
341.25071.222348705367050.0283512946329485
351.29971.250243011433770.0494569885662337
361.34061.29890281318410.0416971868159008
371.31231.33992789179945-0.0276278917994517
381.30131.31274532818783-0.0114453281878286
391.31851.301484484842270.0170155151577260
401.29431.31822573048334-0.0239257304833405
411.26971.29468565382679-0.0249856538267907
421.21551.27010273850865-0.054602738508648
431.20411.21638013007894-0.0122801300789450
441.22951.204297940838700.0252020591612980
451.22341.22909377329920-0.0056937732991964
461.20221.22349177673648-0.0212917767364824
4711.20254319767931-0.202543197679307
481.18611.00326475128230.182835248717699
491.21261.183152917009600.0294470829903952
501.1941.21212534865128-0.018125348651278
511.20281.194292158689750.00850784131025195
521.22731.202662863892020.0246371361079785
531.27671.226902879175300.0497971208247046
541.26611.27589733066363-0.00979733066363075
551.26811.266257921116160.00184207888384447
561.2811.268070307917190.0129296920828101
571.27221.28079158900772-0.00859158900772394
581.26171.27233848601953-0.0106384860195323
591.28881.261871479522750.0269285204772514
601.32051.288365944831690.0321340551683094
611.29931.31998203791083-0.0206820379108343
621.3081.299633369427180.00836663057281806
631.32461.307865140038250.0167348599617470
641.35131.324330254305520.0269697456944753
651.35181.350865280331070.000934719668930883
661.34211.35178493344989-0.00968493344988763
671.37261.342256109409060.0303438905909366
681.36261.37211089319784-0.00951089319783716
691.3911.362753304090780.028246695909222
701.42331.390544697438640.0327553025613647
711.46831.422772024154530.0455279758454721
721.45591.46756614411530-0.0116661441153041
731.47281.456088044127850.0167119558721482
741.47591.472530623491740.00336937650826319
751.5521.475845689727420.0761543102725837
761.57541.550772484660240.0246275153397588
771.55541.57500303425044-0.0196030342504385
781.55621.555715977193700.000484022806298334
791.57591.5561921981380.0197078018620009
801.49551.57558233407916-0.0800823340791619
811.43421.49679083033086-0.062590830330864
821.32661.43520888845404-0.108608888454040
831.27441.32835064387208-0.0539506438720843
841.35111.275269619102400.0758303808976037
851.32441.34987770600983-0.0254777060098319
861.27971.32481066979449-0.045110669794487
871.3051.280427129416070.0245728705839323
881.32031.304603915057790.0156960849422143


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
891.320046998101991.234530427259611.40556356894436
901.320046998101991.200079036957361.44001495924662
911.320046998101991.173515296706831.46657869949715
921.320046998101991.151077274996581.4890167212074
931.320046998101991.131287905237881.50880609096609
941.320046998101991.113384899614051.52670909658993
951.320046998101991.096913740240231.54318025596374
961.320046998101991.081577548116121.55851644808785
971.320046998101991.067169742523081.57292425368090
981.320046998101991.053539710768831.58655428543515
991.320046998101991.040573632619261.59952036358471
1001.320046998101991.028183006100921.61191099010306
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189877vry99gsnzl0opwi/1pyo51244189788.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189877vry99gsnzl0opwi/1pyo51244189788.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189877vry99gsnzl0opwi/2e8c01244189788.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189877vry99gsnzl0opwi/2e8c01244189788.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189877vry99gsnzl0opwi/3000m1244189788.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189877vry99gsnzl0opwi/3000m1244189788.ps (open in new window)


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