[Robast-commits] r426 - in branches/robast-0.8/pkg: ROptEst/R RobAStBase/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Sep 18 16:30:05 CEST 2010


Author: ruckdeschel
Date: 2010-09-18 16:30:04 +0200 (Sat, 18 Sep 2010)
New Revision: 426

Modified:
   branches/robast-0.8/pkg/ROptEst/R/getInfRobIC_asBias.R
   branches/robast-0.8/pkg/ROptEst/R/getInfV.R
   branches/robast-0.8/pkg/RobAStBase/R/getRiskIC.R
Log:
ROptEst/RobAStBase: fixed two bugs in calculation of risks: trAsCov and asCov (for total variation)

Modified: branches/robast-0.8/pkg/ROptEst/R/getInfRobIC_asBias.R
===================================================================
--- branches/robast-0.8/pkg/ROptEst/R/getInfRobIC_asBias.R	2010-09-06 17:24:26 UTC (rev 425)
+++ branches/robast-0.8/pkg/ROptEst/R/getInfRobIC_asBias.R	2010-09-18 14:30:04 UTC (rev 426)
@@ -168,7 +168,7 @@
             a <- -b*(p0-ws0)/(1-ws0)
 
         info <- c("minimum asymptotic bias (lower case) solution")
-        asCov <- a^2*(p0-ws0) + (zi*a+b)^2*(1-p0)
+        asCov <- b^2/(1-ws0)*(1-p0)*(p0-ws0) #a^2*(p0-ws0) + (zi*a+b)^2*(1-p0)
         Risk <- list(asBias = list(value = b, biastype = biastype, 
                                        normtype = NormType(), 
                                        neighbortype = class(neighbor)), 

Modified: branches/robast-0.8/pkg/ROptEst/R/getInfV.R
===================================================================
--- branches/robast-0.8/pkg/ROptEst/R/getInfV.R	2010-09-06 17:24:26 UTC (rev 425)
+++ branches/robast-0.8/pkg/ROptEst/R/getInfV.R	2010-09-18 14:30:04 UTC (rev 426)
@@ -20,7 +20,7 @@
                                   biastype = "BiasType"),
     function(L2deriv, neighbor, biastype, clip, cent, stand){
         c1 <- cent
-        c2 <- clip+clip
+        c2 <- cent+clip
         return(stand^2*(m2df(L2deriv, c2) - m2df(L2deriv, c1)
                 + c2^2 * (p(L2deriv)(c2, lower.tail = FALSE))
                 + c1^2* p(L2deriv)(c1)

Modified: branches/robast-0.8/pkg/RobAStBase/R/getRiskIC.R
===================================================================
--- branches/robast-0.8/pkg/RobAStBase/R/getRiskIC.R	2010-09-06 17:24:26 UTC (rev 425)
+++ branches/robast-0.8/pkg/RobAStBase/R/getRiskIC.R	2010-09-18 14:30:04 UTC (rev 426)
@@ -52,7 +52,7 @@
             stop("dimension of 'Domain' of 'Curve' != dimension of 'img' of 'distribution' of 'L2Fam'")
 
         trCov <- getRiskIC(IC, risk = asCov(), L2Fam = L2Fam)$asCov
-        trCov$value <- sum(diag(trCov$value))
+        trCov$value <- sum(diag(as.matrix(trCov$value)))
 
         prec <- checkIC(IC, L2Fam, out = FALSE)
         if(prec > tol)



More information about the Robast-commits mailing list