Home » date » 2011 » May » 19 »

Opgave 10 Eigen reeks

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Thu, 19 May 2011 14:47:31 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/19/t1305816251pwmovhiymncxehy.htm/, Retrieved Thu, 19 May 2011 16:44:13 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0,8833 0,87 0,8758 0,8858 0,917 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,249 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,202 1,2271 1,277 1,265 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,457 1,4718 1,4748 1,5527 1,575 1,5557 1,5553 1,577 1,4975 1,4369 1,3322 1,2732 1,3449 1,3239 1,2785 1,305 1,319 1,365 1,4016 1,4088 1,4268 1,4562 1,4816 1,4914 1,4614 1,4272
 
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'Gwilym Jenkins' @ www.wessa.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.026516277171168
gamma0.0783163830565602


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
131.06220.956419204059830.10578079594017
141.07731.08369586570174-0.00639586570173889
151.08071.08707627115404-0.00637627115404249
161.08481.08884052951414-0.00404052951413636
171.15821.16099172304695-0.00279172304695452
181.16631.16809269694486-0.00179269694485651
191.13721.17951599462912-0.0423159946291161
201.11391.12312726532009-0.00922726532009022
211.12221.1158992592620.0063007407380029
221.16921.122012164783120.0471878352168769
231.17021.18875091050084-0.0185509105008419
241.22861.185363176082890.0432368239171099
251.26131.27591798902321-0.0146179890232103
261.26461.28254704104125-0.0179470410412526
271.22621.2738211523266-0.0476211523266008
281.19851.23269174998563-0.0341917499856312
291.20071.27224344539938-0.071543445399378
301.21381.206321379571390.0074786204286117
311.22661.222990518076860.00360948192313537
321.21761.209719561433320.00788043856668397
331.22181.217245187993250.0045548120067529
341.2491.219211797984210.0297882020157862
351.29911.26568917020530.033410829794704
361.34081.312779267695320.028020732304683
371.31191.38623060653298-0.0743306065329805
381.30141.32967630223452-0.0282763022345176
391.32011.306876519967090.0132234800329083
401.29381.32446049076214-0.0306604907621448
411.26941.36550582202423-0.096105822024225
421.21651.27233245340967-0.0558324534096681
431.20371.22132281793324-0.0176228179332441
441.22921.181888859741720.0473111402582775
451.22561.224960041716760.000639958283238373
461.20151.21902284436131-0.0175228443613111
471.17861.2129457037634-0.0343457037633998
481.18561.185239150229440.000360849770562943
491.21031.2232570519553-0.0129570519553039
501.19381.221930145841-0.0281301458410022
511.2021.193134239097020.00886576090298252
521.22711.200102659403790.0269973405962129
531.2771.29407686170325-0.0170768617032542
541.2651.27729904690512-0.012299046905117
551.26841.268343755301775.62446982270703e-05
561.28111.245578580035110.0355214199648859
571.27271.27553714251908-0.00283714251908296
581.26111.26470774539501-0.00360774539500586
591.28811.271499581418150.0166004185818502
601.32131.295043929385090.0262560706149104
611.29991.35994847596427-0.0600484759642737
621.30741.31127288059857-0.00387288059856528
631.32421.307120186223160.0170798137768366
641.35161.322906412632630.028693587367365
651.35111.41922559308164-0.0681255930816362
661.34191.35069415597303-0.00879415597303357
671.37161.34463180102910.0269681989709003
681.36221.348880230601150.0133197693988476
691.38961.356150087965050.033449912034945
701.42271.382082888437260.0406171115627423
711.46841.434747403025350.0336525969746515
721.4571.47744391128092-0.0204439112809238
731.47181.49651014819627-0.0247101481962699
741.47481.48497159372442-0.0101715937244231
751.55271.476151880925950.0765481190740454
761.5751.554614985401590.0203850145984137
771.55571.64561385343215-0.0899138534321493
781.55531.55770467277302-0.00240467277301515
791.5771.560611743136590.0163882568634068
801.49751.55657963203127-0.0590796320312688
811.43691.49182972679982-0.0549297267998237
821.33221.4274190282724-0.0952190282723961
831.27321.33868167412676-0.0654816741267565
841.34491.274049510572650.0708504894273543
851.32391.37863653512135-0.0547365351213476
861.27851.33050179265135-0.0520017926513472
871.3051.272172898704010.0328271012959929
881.3191.298076684554030.0209233154459696
891.3651.38078982631907-0.0157898263190688
901.40161.360146138907910.041453861092092
911.40881.401216174311770.00758382568822569
921.42681.382450602469070.0443493975309255
931.45621.417943250053050.0382567499469544
941.48161.446003509971640.0355964900283601
951.49141.490834896367550.000565103632446551
961.46141.49675404747877-0.0353540474787679
971.42721.49682492309003-0.0696249230900319


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
981.435095395998021.357704615799071.51248617619698
991.431440791996041.320533143398241.54234844059385
1001.42631952132741.288689788609061.56394925404574
1011.489356583992091.328353274564171.65035989342
1021.486168646656781.303824752247331.66851254106622
1031.48635154265481.284034820092981.68866826521662
1041.460367771986151.239056296456631.68167924751567
1051.450700667984171.211122169153111.69027916681524
1061.438679397315531.181390178173951.69596861645711
1071.445145626646891.170578973338221.71971227995555
1081.447716022644911.156213717465161.73921832782465
1091.481294751976261.173128554787971.78946094916455
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305816251pwmovhiymncxehy/1oc4t1305816448.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305816251pwmovhiymncxehy/1oc4t1305816448.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305816251pwmovhiymncxehy/2liik1305816448.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305816251pwmovhiymncxehy/2liik1305816448.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305816251pwmovhiymncxehy/3x9t41305816448.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305816251pwmovhiymncxehy/3x9t41305816448.ps (open in new window)


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