Home » date » 2010 » Jun » 06 »

Opgave 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, 06 Jun 2010 20:20:36 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jun/06/t1275855682rt08dzo768rka1j.htm/, Retrieved Sun, 06 Jun 2010 22:21:22 +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/2010/Jun/06/t1275855682rt08dzo768rka1j.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0,9383 0,9217 0,9095 0,8920 0,8742 0,8607 0,8607 0,9005 0,9111 0,9059 0,8883 0,8924 0,8833 0,8700 0,8758 0,8858 0,9170 0,9554 0,9922 0,9778 0,9808 0,9811 1,0014 1,0183 1,0622 1,0773 1,0807 1,0848 1,1582 1,1663 1,1372 1,1139 1,1222 1,1692 1,1702 1,2286 1,2613 1,2646 1,2262 1,1985 1,2007 1,2138 1,2266 1,2176 1,2218 1,2490 1,2991 1,3408 1,3119 1,3014 1,3201 1,2938 1,2694 1,2165 1,2037 1,2292 1,2256 1,2015 1,1786 1,1856 1,2103 1,1938 1,2020 1,2271 1,2770 1,2650 1,2684 1,2811 1,2727 1,2611 1,2881 1,3213 1,2999 1,3074 1,3242 1,3516 1,3511 1,3419 1,3716 1,3622 1,3896 1,4227 1,4684 1,4570 1,4718 1,4748 1,5527 1,5751 1,5557 1,5553 1,5770 1,4975 1,4370 1,3322 1,2732 1,3449 1,3239 1,2785 1,3050 1,3190 1,3650 1,4016 1,4088 1,4268 1,4562 1,4816 1,4914 1,4614
 
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.9999383030001
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
20.92170.9383-0.0166000000000001
30.90950.921701024170198-0.0122010241701983
40.8920.909500752766587-0.0175007527665869
50.87420.892001079743942-0.0178010797439417
60.86070.874201098273215-0.0135010982732151
70.86070.860700832977259-8.32977258835577e-07
80.90050.8607000000513920.0397999999486077
90.91110.9004975444594070.0106024555405929
100.90590.911099345860302-0.00519934586030157
110.88830.905900320784041-0.0176003207840411
120.89240.888301085886990.00409891411301033
130.88330.892399747109296-0.0090997471092964
140.870.883300561427096-0.0133005614270965
150.87580.8700008206047370.00579917939526298
160.88580.875799642208030.0100003577919706
170.9170.8857993830079260.0312006169920737
180.95540.9169980750155370.0384019249844634
190.99220.9553976307164380.0368023692835618
200.97780.992197729404226-0.014397729404226
210.98080.977800888296710.00299911170329037
220.98110.9807998149638060.000300185036194445
231.00140.9810999814794840.0203000185205162
241.01831.001398747549760.0169012524502405
251.06221.018298957243430.0439010427565707
261.07731.062197291437370.0151027085626305
271.08071.077299068208190.00340093179180867
281.08481.080699790172710.00410020982728843
291.15821.084799747029350.0734002529706452
301.16631.15819547142460.00810452857540023
311.13721.16629949997490-0.0290994999749012
321.11391.13720179535185-0.0233017953518471
331.12221.113901437650870.00829856234913473
341.16921.12219948800360.0470005119964003
351.17021.169197100209420.00100289979058377
361.22861.170199938124090.0584000618759082
371.26131.228596396891390.0327036031086119
381.26461.261297982285800.00330201771419758
391.22621.26459979627541-0.0383997962754135
401.19851.22620236915223-0.0277023691522269
411.20071.198501709153070.00219829084693335
421.21381.200699864372050.0131001356279501
431.22661.213799191760930.0128008082390665
441.21761.22659921022854-0.00899921022853523
451.22181.217600555224270.00419944477572742
461.2491.221799740906860.0272002590931439
471.29911.248998321825620.0501016781743824
481.34081.299096908876770.0417030911232334
491.31191.34079742704439-0.0288974270443911
501.30141.31190178288455-0.0105017828845537
511.32011.301400647928500.0186993520715026
521.29381.32009884630608-0.0262988463060772
531.26941.29380162255992-0.0244016225599180
541.21651.26940150550690-0.0529015055069049
551.20371.21650326386418-0.0128032638641800
561.22921.203700789922970.0254992100770308
571.22561.22919842677524-0.00359842677523847
581.20151.22560022201214-0.0241002220121365
591.17861.20150148691140-0.0229014869113950
601.18561.178601412953040.00699858704696421
611.21031.185599568208180.0247004317918242
621.19381.21029847605746-0.0164984760574622
631.2021.193801017906480.00819898209352443
641.22711.201999494147400.0251005058525975
651.2771.227098451374090.0499015486259069
661.2651.27699692122416-0.0119969212241595
671.26841.265000740174050.00339925982595246
681.28111.268399790275870.0127002097241331
691.27271.28109921643516-0.00839921643516184
701.26111.27270051820646-0.0116005182064554
711.28811.261100715717170.0269992842828293
721.32131.288098334225160.0332016657748395
731.29991.32129795155683-0.0213979515568299
741.30741.299901320189420.00749867981058472
751.32421.307399537353950.0168004626460476
761.35161.324198963461860.0274010365381421
771.35111.35159830943825-0.000498309438251354
781.34191.35110003074420-0.00920003074419729
791.37161.341900567614300.0296994323857038
801.36221.37159816763412-0.00939816763412304
811.38961.362200579838750.0273994201612522
821.42271.389598309537980.0331016904620232
831.46841.422697957725010.045702042274993
841.4571.46839718032110-0.0113971803211022
851.47181.457000703171830.0147992968281667
861.47481.471799086927790.00300091307221506
871.55271.474799814852670.0779001851473333
881.57511.552695193792280.0224048062077151
891.55571.57509861769067-0.0193986176906735
901.55531.55570119683651-0.000401196836513851
911.5771.555300024752640.0216999752473588
921.49751.57699866117663-0.0794986611766293
931.4371.49750490482889-0.0605049048288906
941.33221.43700373297111-0.104803732971107
951.27321.33220646607590-0.0590064660759024
961.34491.273203640521930.0716963594780684
971.32391.34489557654972-0.0209955765497163
981.27851.32390129536408-0.0454012953640843
991.3051.278502801123720.0264971988762845
1001.3191.304998365202320.0140016347976764
1011.3651.318999136141140.0460008638588607
1021.40161.364997161884710.0366028381152927
1031.40881.40159774171470.00720225828529952
1041.42681.408799555642270.0180004443577286
1051.45621.426798889426590.0294011105734135
1061.48161.456198186039680.0254018139603163
1071.49141.481598432784290.00980156721571346
1081.46141.49139939527271-0.0299993952727085


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1091.461401850872691.402196972612221.52060672913316
1101.461401850872691.377676091931991.54512760981338
1111.461401850872691.358860211474081.56394349027129
1121.461401850872691.342997573454551.57980612829083
1131.461401850872691.329022252704121.59378144904125
1141.461401850872691.316387564984611.60641613676077
1151.461401850872691.304768750245821.61803495149956
1161.461401850872691.293954207376741.62884949436864
1171.461401850872691.283796956760211.63900674498517
1181.461401850872691.274189982891351.64861371885403
1191.461401850872691.265052497389101.65775120435627
1201.461401850872691.256321735518271.66648196622710
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275855682rt08dzo768rka1j/1yxt01275855632.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275855682rt08dzo768rka1j/1yxt01275855632.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275855682rt08dzo768rka1j/296al1275855632.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275855682rt08dzo768rka1j/296al1275855632.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275855682rt08dzo768rka1j/396al1275855632.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275855682rt08dzo768rka1j/396al1275855632.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=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
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