[Robast-commits] r423 - branches/robast-0.8/pkg/ROptEst/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 6 14:48:05 CEST 2010


Author: ruckdeschel
Date: 2010-09-06 14:48:04 +0200 (Mon, 06 Sep 2010)
New Revision: 423

Modified:
   branches/robast-0.8/pkg/ROptEst/R/getInfRobIC_asGRisk.R
   branches/robast-0.8/pkg/ROptEst/R/getMaxIneff.R
Log:
ROptEst: + fixed a little bug in getMaxIneff.R
 + lower and upper interval bounds for search in clipping height in getInfRobIC_asGRisk.R 
   are now selected differently for univariate L2-deriv according to whether risk is asMSE() or not

Modified: branches/robast-0.8/pkg/ROptEst/R/getInfRobIC_asGRisk.R
===================================================================
--- branches/robast-0.8/pkg/ROptEst/R/getInfRobIC_asGRisk.R	2010-09-03 13:51:16 UTC (rev 422)
+++ branches/robast-0.8/pkg/ROptEst/R/getInfRobIC_asGRisk.R	2010-09-06 12:48:04 UTC (rev 423)
@@ -66,21 +66,26 @@
             z.old <- z
             c0.old <- c0
             ## new
-            L1n <- getL1normL2deriv(L2deriv = L2deriv, cent = z)
-            lower0 <-  L1n/(1 + radius^2)
+            if(is(risk,"asMSE")){
+               L1n <- getL1normL2deriv(L2deriv = L2deriv, cent = z)
+               lower0 <-  L1n/(1 + radius^2)
 #            if(is(neighbor,"TotalVarNeighborhood")) {
 #                   lower0 <- (L1n-z)/(1 + radius^2)/2}
-            upper0 <- max(L1n/radius,
-                 sqrt( as.numeric( Finfo + z^2 )/(( 1 + radius^2)^2 - 1) ))
-            if (is.null(lower))
+               upper0 <- max(L1n/radius,
+                   sqrt( as.numeric( Finfo + z^2 )/(( 1 + radius^2)^2 - 1) ))
+               if (is.null(lower))
                   lower <- .Machine$double.eps^0.75
-            else {if(iter>1) lower <- min(lower0,2*lower)}
-            if (is.null(upper))#|(iter == 1))
-                  upper <- getUp(L2deriv)
-            else {if(iter>1) upper <- max(0.5*upper,3*upper0)}
+               else {if(iter>1) lower <- min(lower0,2*lower)}
+               if (is.null(upper))#|(iter == 1))
+                   upper <- getUp(L2deriv)
+               else {if(iter>1) upper <- max(0.5*upper,3*upper0)}
 ##            print(c(lower,upper))
             #lower <- 0; upper <- 100
             ##
+            }else{
+              if(is.null(lower)) lower <- 10^-9
+              if(is.null(upper)) upper <- 40
+            }
             c0 <- try(uniroot(getInfClip, 
                   ## new
                         lower = lower, upper = upper,

Modified: branches/robast-0.8/pkg/ROptEst/R/getMaxIneff.R
===================================================================
--- branches/robast-0.8/pkg/ROptEst/R/getMaxIneff.R	2010-09-03 13:51:16 UTC (rev 422)
+++ branches/robast-0.8/pkg/ROptEst/R/getMaxIneff.R	2010-09-06 12:48:04 UTC (rev 423)
@@ -62,7 +62,8 @@
                             DistrSymm = L2Fam at distrSymm, L2derivSymm = L2derivSymm,
                             L2derivDistrSymm = L2derivDistrSymm, 
                             trafo = trafo, z.start = z.start, A.start = A.start, 
-                            maxiter = maxiter, tol = tol, warn = warn,
+                            maxiter = maxiter, tol = tol, warn = warn, 
+                            Finfo = Finfo,
                             verbose = verbose)$risk$asBias$value^2
               }else{
                 stop("not yet implemented")



More information about the Robast-commits mailing list