[Robast-commits] r329 - branches/robast-0.7/pkg/ROptEst/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 21 14:17:09 CEST 2009


Author: stamats
Date: 2009-07-21 14:17:02 +0200 (Tue, 21 Jul 2009)
New Revision: 329

Modified:
   branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R
   branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asGRisk.R
Log:
made Risk slot slightly more consistent (no longer double asMSE) in case there is no convergence.

Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R	2009-07-21 09:19:50 UTC (rev 328)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R	2009-07-21 12:17:02 UTC (rev 329)
@@ -196,7 +196,7 @@
                                    neighbortype = class(neighbor)), 
                      asCov = Cov,
                      trAsCov = list(value = trAsCov, normtype = normtype),
-                     asMSE = list(value = r^2 * b^2 + trAsCov, 
+                     asMSE = list(value = asMSE, 
                                   r = r,
                                   at = neighbor))
         return(list(A = A, a = a, b = b, d = d, risk = Risk, info = info, 

Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asGRisk.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asGRisk.R	2009-07-21 09:19:50 UTC (rev 328)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asGRisk.R	2009-07-21 12:17:02 UTC (rev 329)
@@ -231,19 +231,21 @@
                              "=> the minimum asymptotic bias (lower case) solution is returned\n",
                              "If 'no' => Try again with modified starting values ",
                              "'z.start' and 'A.start'\n")
-                             res <- getInfRobIC(L2deriv = L2deriv, 
-                                        risk =  asBias(biastype = biastype(risk),
-                                                       normtype = normtype(risk)), 
-                                    neighbor = neighbor, Distr = Distr, DistrSymm = DistrSymm,
-                                    L2derivSymm = L2derivSymm, L2derivDistrSymm = L2derivDistrSymm,
-                                    z.start = z.start, A.start = A.start, trafo = trafo, 
-                                    maxiter = maxiter, tol = tol, warn = warn, Finfo = Finfo,
-                                    verbose = verbose)
-                             normtype(risk) <- res$normtype
-                             Risk <- getAsRisk(risk = risk, L2deriv = L2deriv, neighbor = neighbor, 
-                                  biastype = biastype, clip = NULL,   
-                                  cent = res$a, stand = res$A, trafo = trafo)
-                res$risk <- c(Risk, res$risk)
+                res <- getInfRobIC(L2deriv = L2deriv, 
+                                   risk =  asBias(biastype = biastype(risk),
+                                                  normtype = normtype(risk)), 
+                                   neighbor = neighbor, Distr = Distr, DistrSymm = DistrSymm,
+                                   L2derivSymm = L2derivSymm, L2derivDistrSymm = L2derivDistrSymm,
+                                   z.start = z.start, A.start = A.start, trafo = trafo, 
+                                   maxiter = maxiter, tol = tol, warn = warn, Finfo = Finfo,
+                                   verbose = verbose)
+                normtype(risk) <- res$normtype
+                if(!is(risk, "asMSE")){
+                    Risk <- getAsRisk(risk = risk, L2deriv = L2deriv, neighbor = neighbor, 
+                                      biastype = biastype, clip = NULL,   
+                                      cent = res$a, stand = res$A, trafo = trafo)
+                    res$risk <- c(Risk, res$risk)
+                }
                 return(res)
             }
             clip(w) <- b



More information about the Robast-commits mailing list