[Robast-commits] r743 - branches/robast-1.0/pkg/RobExtremes/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 3 17:04:54 CEST 2014


Author: ruckdeschel
Date: 2014-04-03 17:04:49 +0200 (Thu, 03 Apr 2014)
New Revision: 743

Modified:
   branches/robast-1.0/pkg/RobExtremes/R/Functionals.R
Log:
RobExtremes: bug in (population) variance of GEV xi=0 discovered

Modified: branches/robast-1.0/pkg/RobExtremes/R/Functionals.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/R/Functionals.R	2014-04-03 11:46:37 UTC (rev 742)
+++ branches/robast-1.0/pkg/RobExtremes/R/Functionals.R	2014-04-03 15:04:49 UTC (rev 743)
@@ -55,7 +55,7 @@
         return(var(as(x,"AbscontDistribution"),...))
     else{ xi <- shape(x); sigma <- scale(x)
         if(xi>=1/2) return(NA)
-        if(xi==0) return(pi^2/6)
+        if(xi==0) return(sigma^2*pi^2/6)
         if((xi!=0)&&(xi<1/2))return(sigma^2*(gamma(1-2*xi)-gamma(1-xi)^2)/xi^2)
     }})
 ### http://en.wikipedia.org/wiki/Generalized_extreme_value_distribution



More information about the Robast-commits mailing list