Home » date » 2009 » Jun » 07 »

Opdracht 10 oefening 2

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 07 Jun 2009 10:45:35 -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/07/t1244393185g0uq1v1qn2kr4ig.htm/, Retrieved Sun, 07 Jun 2009 18:46:29 +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/07/t1244393185g0uq1v1qn2kr4ig.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:
Thomas Cammaert
 
Dataseries X:
» Textbox « » Textfile « » CSV «
8.9722 8.8284 8.7446 8.7519 8.6337 8.7272 8.6330 8.5865 8.5968 8.5114 8.3884 8.2671 8.2410 8.3177 8.4070 8.3917 8.4145 8.5245 8.6289 8.6622 8.9055 8.9770 9.1264 9.1120 9.0576 9.2106 9.2637 9.3107 9.6744 9.5780 9.4166 9.4359 9.2275 9.1828 9.0594 9.1358 9.2208 9.1137 9.2689 9.2489 9.1679 9.1051 9.0818 9.0961 9.1733 9.1455 9.2265 9.1541 9.1559 9.1182 9.1856 9.2378 9.0682 9.0105 8.9939 9.0228 9.1368 9.1763 9.2346 9.1653 9.1277 9.1430 9.1962 9.1861 9.0920 9.0620 8.9981 8.9819 9.0476 9.0852 9.0884 9.1670 9.1931 9.2628 9.4276 9.3398 9.3342 9.4223 9.5614 9.4316 9.3111 9.3414 9.4017 9.3346 9.3310 9.2349 9.2170 9.2098 9.2665 9.2533 9.1008 9.0377 9.0795 9.1896 9.2992 9.2372 9.2061 9.3290 9.1842 9.3231 9.2835 9.1735 9.2889 9.4319 9.4314 9.3642 9.4020 9.3699 9.3106 9.3739 9.4566 9.3984 9.5637 9.8506
 
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'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.00424858042342793
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
138.2418.38257243589744-0.141572435897436
148.31778.312217923714750.00548207628524544
158.4078.38850788142340.0184921185765941
168.39178.357040613343050.0346593866569531
178.41458.362100366534680.0523996334653187
188.52458.456518823924950.0679811760750475
198.62898.63212431408545-0.00322431408545398
208.66228.632393948661080.029806051338916
218.90558.70622058206730.199279417932695
228.9778.848396403367790.128603596632209
239.12648.87790945275750.248490547242508
249.1129.023502684831910.0884973151680892
259.05769.09571617279266-0.0381161727926607
269.21069.132354233167120.0782457668328789
279.26379.28525333326697-0.0215533332669668
289.31079.217415928863860.0932840711361411
299.67449.28502475374230.389375246257698
309.5789.72177487912425-0.143774879124253
319.41669.6900807066541-0.273480706654091
329.43599.423402135210950.0124978647890490
339.22759.48315523339463-0.255655233394631
349.18289.171698228241550.0111017717584527
359.05949.08451206167837-0.0251120616783744
369.13588.956142871064730.179657128935268
379.22089.119543658825660.101256341174343
389.11379.29617385453452-0.182473854534521
399.26899.187865266355020.0810347336449784
409.24899.222563715604670.0263362843953274
419.16799.22288810742698-0.0549881074269774
429.10519.21305031936357-0.107950319363574
439.08189.21510835041669-0.133308350416693
449.09619.087125312502160.00897468749783492
459.17339.141863442183780.0314365578162228
469.14559.117226169594560.0282738304054408
479.22659.047012959903580.179487040096417
489.15419.12391302502840.0301869749716062
499.15599.13787877681930.018021223180698
509.11829.23095534143532-0.112755341435316
519.18569.19234295796572-0.00674295796572011
529.23789.138868476633180.0989315233668187
539.06829.21170129516661-0.143501295166613
549.01059.11288745170656-0.102387451706564
558.99399.12006911705031-0.126169117050308
569.02288.99881641074290.0239835892570994
579.13689.06821830695070.0685816930492944
589.17639.080538848455860.0957611515441368
599.23469.07791236407630.156687635923694
609.16539.132015564098880.033284435901118
619.12779.14909447570166-0.0213944757016584
629.1439.20260357955103-0.059603579551025
639.19629.21721701561644-0.0210170156164438
649.18619.1494818898020.0366181101979954
659.0929.15974996478813-0.0677499647881294
669.0629.13675795694738-0.0747579569473782
678.99819.17175700842166-0.173657008421662
688.98199.00300254598863-0.0211025459886276
699.04769.027112890124860.0204871098751429
709.08528.990929097925470.0942709020745323
719.08848.986396282101190.102003717898810
729.1678.985167153100170.181832846899832
739.19319.150777184573850.0423228154261537
749.26289.26825699645893-0.00545699645892839
759.42769.337500478637270.0900995213627311
769.33989.38183744036656-0.0420374403665598
779.33429.314071340920360.020128659079635
789.42239.379952692480610.0423473075193872
799.56149.5335492750890.0278507249110085
809.43169.56865093446696-0.137050934466963
819.31119.47866866254977-0.167568662549774
829.34149.255485900277150.0859140997228494
839.40179.2436175799060.158082420094003
849.33469.29972670578130.0348732942187073
859.3319.319012367776410.011987632223585
869.23499.406663298196-0.171763298196003
879.2179.30940021467649-0.0924002146764877
889.20989.170261811599960.0395381884000354
899.26659.183442292773170.0830577072268284
909.25339.31189100345545-0.0585910034554473
919.10089.36375874153184-0.262958741531843
929.03779.10602487350374-0.0683248735037374
939.07959.08303458978374-0.00353458978373666
949.18969.022848739461440.166751260538559
959.29929.091123862269220.208076137730785
969.23729.196745390474560.0404546095254421
979.20619.22115476513663-0.0150547651366271
989.3299.281190803756190.0478091962438114
999.18429.40386059163808-0.219660591638075
1009.32319.137281512615310.185818487384687
1019.28359.29718347740312-0.0136834774031218
1029.17359.32892117538224-0.155421175382235
1039.28899.283577522685790.00532247731420910
1049.43199.294883468992040.137016531007957
1059.43149.47886559474337-0.0474655947433735
1069.36429.37619310001343-0.0119931000134255
1079.4029.266408813030160.135591186969840
1089.36999.29992238309270.0699776169072948
1099.31069.35435718862598-0.0437571886259764
1109.37399.386071282691-0.0121712826909981
1119.45669.44888623868430.00771376131570456
1129.39849.41077317788628-0.0123731778862801
1139.56379.372733109444930.190966890555067
1149.85069.6102402809710.240359719028998


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1159.963478135234529.7350301425419610.1919261279271
1169.972239603802379.6484783233658210.2960008842389
11710.02140107237029.6240340781649210.4187680665755
1189.968591707604749.5087788613981910.4284045538113
1199.873249009505929.3580740614366710.3884239575752
1209.77304381140719.2075046590239110.3385829637903
1219.75907611330839.1469342548581610.3712179717584
1229.836308415209489.1805215007826910.4920953296363
1239.913107383777339.2160759040520910.6101388635026
1249.869060519011859.1327801656815210.6053408723422
1259.845226154246369.0713876787878210.6190646297049
1269.892787622814219.0828453718005610.7027298738279
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244393185g0uq1v1qn2kr4ig/1v1eg1244393132.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244393185g0uq1v1qn2kr4ig/1v1eg1244393132.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244393185g0uq1v1qn2kr4ig/2hpwj1244393132.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244393185g0uq1v1qn2kr4ig/2hpwj1244393132.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244393185g0uq1v1qn2kr4ig/3xm6y1244393132.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244393185g0uq1v1qn2kr4ig/3xm6y1244393132.ps (open in new window)


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