[Robast-commits] r618 - in branches/robast-0.9/pkg/ROptEst: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 23 23:11:21 CET 2013


Author: ruckdeschel
Date: 2013-02-23 23:11:21 +0100 (Sat, 23 Feb 2013)
New Revision: 618

Modified:
   branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asGRisk.R
   branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asHampel.R
   branches/robast-0.9/pkg/ROptEst/R/getInfV.R
   branches/robast-0.9/pkg/ROptEst/R/getRiskIC.R
   branches/robast-0.9/pkg/ROptEst/R/getStartIC.R
   branches/robast-0.9/pkg/ROptEst/R/internal.roptest.R
   branches/robast-0.9/pkg/ROptEst/R/optIC.R
   branches/robast-0.9/pkg/ROptEst/R/roptest.new.R
   branches/robast-0.9/pkg/ROptEst/man/getInfRobIC.Rd
   branches/robast-0.9/pkg/ROptEst/man/getStartIC-methods.Rd
   branches/robast-0.9/pkg/ROptEst/man/inputGenerator.Rd
   branches/robast-0.9/pkg/ROptEst/man/optIC.Rd
   branches/robast-0.9/pkg/ROptEst/man/roptest.Rd
Log:
ROptEst: Some more efforts to allow for delayed evaluations; 
+ getInfRobIC_asGRisk getInfRobIC_asHampel now get argument .withEvalAsVar and, accordingly only produce calls to generate asyVariances or evaluate them as well
+ similarly getStartIC for signature L2ParamFamily,asGRisk gains argument withEvalAsVar
+ generating function genkStepCtrl for control arguments for kStepEstimator gains argument withEvalAsVar 
+ optIC gains argument .withEvalAsVar
+ roptest gains argument withEvalAsVar
+ getInfV now always returns a matrix
+ getRiskIC is careful and first evaluates covariance objects
+++ optIC already contains stubs to use moveL2Fam2RefParam, moveICBackFromRefParam
   (still some checking necessary before using this really...)




Modified: branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asGRisk.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asGRisk.R	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asGRisk.R	2013-02-23 22:11:21 UTC (rev 618)
@@ -197,7 +197,7 @@
              z.start, A.start, upper = NULL, lower = NULL,
              OptOrIter = "iterate",
              maxiter, tol, warn, verbose = NULL, withPICcheck = TRUE,
-             ...){
+             ..., .withEvalAsVar = TRUE){
 
         if(missing(verbose)|| is.null(verbose))
            verbose <- getRobAStBaseOption("all.verbose")
@@ -320,19 +320,7 @@
             risk <- erg$risk
             iter <- erg$iter
             prec <- prec.In <- iter.In <- NULL
-            Cov <- getInfV(L2deriv = L2deriv, neighbor = neighbor,
-                              biastype = biastype, Distr = Distr,
-                              V.comp = A.comp, cent = a,
-                              stand = A, w = w)
 
-            if(!is(risk, "asMSE")){
-                   Risk <- getAsRisk(risk = risk, L2deriv = L2deriv, neighbor = neighbor,
-                                     biastype = biastype, normtype = normtype, 
-                                     clip = b, cent = a, stand = A,
-                                     trafo = trafo, FI = FI0)
-            }else{
-                   Risk <- sum(diag(std%*%Cov)) + radius^2 * b^2
-            }
         }else{
             repeat{
                 iter <- iter + 1
@@ -442,37 +430,54 @@
           }
 
 
-        ### determine Covariance of pIC
-          Cov <- getInfV(L2deriv = L2deriv, neighbor = neighbor,
-                       biastype = biastype, Distr = Distr,
-                       V.comp = A.comp, cent = a,
-                       stand = A, w = w)
-          if(verbose && withPICcheck) print(list(Cov=Cov,A=A,a=a,w=w))
-          if(!is(risk, "asMSE")){
-              Risk <- getAsRisk(risk = risk, L2deriv = L2deriv, neighbor = neighbor,
-                                biastype = biastype, normtype = normtype, 
-                                clip = b, cent = a, stand = A,
-                                trafo = trafo, FI = FI0)
-          }else{
-              Risk <- NULL
-          }
+          if(verbose && withPICcheck) print(list(A=A,a=a,w=w))
         }
 
+        Cov <- substitute(do.call(getInfV, args = list(L2deriv = L2deriv0,
+                          neighbor = neighbor0, biastype = biastype0,
+                          Distr = Distr0, V.comp = A.comp0, cent = a0,
+                          stand = A0, w = w0)), list(L2deriv0 = L2deriv,
+                          neighbor0 = neighbor, biastype0 = biastype,
+                          Distr0 = Distr, A.comp0 = A.comp, a0 = a,
+                          A0 = A, w0 = w))
 
+        rifct <- function(std0, Cov0, rad0, b0){
+                     sum(diag(std0%*%eval(Cov0))) + rad0^2 * b0^2}
+
+        asMSE.0 <- substitute(do.call(ri.fct, args=list(std0=std1, Cov0=Cov1,
+                                    rad0 = rad1, b0=b1)), list(std1=std,
+                                    Cov1=Cov, rad1=radius, b1=b))
+        if(!is(risk, "asMSE")){
+               Risk <- substitute(do.call(getAsRisk, args =list(risk = risk0,
+                          L2deriv = L2deriv0, neighbor = neighbor0,
+                          biastype = biastype0, normtype = normtype0,
+                          clip = b0, cent = a0, stand = A0,
+                          trafo = trafo0, FI = FI000)), list(risk0=risk,
+                          L2deriv0=L2deriv, neighbor0 = neighbor,
+                          biastype0 = biastype, normtype0 = normtype,
+                          b0 = b, a0 = a, A0 = A,
+                          trafo0 = trafo, FI000 = FI0))
+        }else{ Risk <- asMSE.0
+        }
+
         ### add some further informations for the pIC-slots info and risk
         info <- paste("optimally robust IC for", sQuote(class(risk)[1]))
 
-        trAsCov <- sum(diag(std%*%Cov))
+        trAsCov.fct <- function(std0, Cov0) sum(diag(std0%*%eval(Cov0)))
+        trAsCov <- substitute(do.call(tr.fct, args=list(std0=std1, Cov0=Cov1)),
+                              list(std1=std, Cov1=Cov))
         Risk <- c(Risk, list(asCov = Cov,
                      asBias = list(value = b, biastype = biastype,
                                    normtype = normtype,
                                    neighbortype = class(neighbor)),
                      trAsCov = list(value = trAsCov,
                                    normtype = normtype),
-                     asMSE = list(value = trAsCov + radius^2*b^2,
+                     asMSE = list(value = asMSE.0,
                                   r = radius,
                                   at = neighbor)))
 
+        if(.withEvalAsVar) Risk <- .evalListRec(Risk)
+
         if(verbose && withPICcheck)
            .checkPIC(L2deriv = L2deriv, neighbor = neighbor,
                      Distr = Distr, trafo = trafo, z = z, A = A, w = w,
@@ -484,6 +489,8 @@
                     iter.In = iter.In, prec.In = prec.In))
     })
 
+### helper function to recursively evaluate list
+.evalListRec <- RobAStBase:::.evalListRec
 
 ### helper function to return the upper case solution if r=0
 .getUpperSol <- function(L2deriv, radius, risk, neighbor, biastype,

Modified: branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asHampel.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asHampel.R	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/R/getInfRobIC_asHampel.R	2013-02-23 22:11:21 UTC (rev 618)
@@ -148,7 +148,8 @@
              L2derivDistrSymm, Finfo, trafo, onesetLM = FALSE,
              z.start, A.start, upper = NULL, lower = NULL,
              OptOrIter = "iterate", maxiter, tol, warn,
-             verbose = NULL, checkBounds = TRUE, ...){
+             verbose = NULL, checkBounds = TRUE, ...,
+             .withEvalAsVar = TRUE){
 
         if(missing(verbose)|| is.null(verbose))
            verbose <- getRobAStBaseOption("all.verbose")
@@ -274,28 +275,41 @@
 
 
         ### determine Covariance of pIC
-        Cov <- as.matrix(getInfV(L2deriv = L2deriv, neighbor = neighbor,
-                       biastype = biastype, Distr = Distr,
-                       V.comp = A.comp, cent = a,
-                       stand = A, w = w))
+        Cov <- substitute(do.call(getInfV, args = list(L2deriv = L2deriv0,
+                          neighbor = neighbor0, biastype = biastype0,
+                          Distr = Distr0, V.comp = A.comp0, cent = a0,
+                          stand = A0, w = w0)), list(L2deriv0 = L2deriv,
+                          neighbor0 = neighbor, biastype0 = biastype,
+                          Distr0 = Distr, A.comp0 = A.comp, a0 = a,
+                          A0 = A, w0 = w))
 
-        #getAsRisk(risk = asCov(), L2deriv = L2deriv, neighbor = neighbor,
-        #          biastype = biastype, Distr = Distr, clip = b, cent = a,
-        #          stand = A)$asCov
+        rifct <- function(std0, Cov0, rad0, b0){
+                     sum(diag(std0%*%eval(Cov0))) + rad0^2 * b0^2}
 
+        asMSE.0 <- substitute(do.call(ri.fct, args=list(std0=std1, Cov0=Cov1,
+                                    rad0 = rad1, b0=b1)), list(std1=std,
+                                    Cov1=Cov, rad1=neighbor at radius, b1=b))
+
+
         ### add some further informations for the pIC-slots info and risk
         info <- paste("optimally robust IC for 'asHampel' with bound =", round(b,3))
-        trAsCov <- sum(diag(std %*% Cov)); r <- neighbor at radius
+
+        trAsCov.fct <- function(std0, Cov0) sum(diag(std0%*%eval(Cov0)))
+        trAsCov <- substitute(do.call(tr.fct, args=list(std0=std1, Cov0=Cov1)),
+                              list(std1=std, Cov1=Cov))
+        r <- neighbor at radius
         Risk <- list(trAsCov = list(value = trAsCov,
                                     normtype = normtype),
                      asCov = Cov,
                      asBias = list(value = b, biastype = biastype,
                                    normtype = normtype,
                                    neighbortype = class(neighbor)),
-                     asMSE = list(value = trAsCov + r^2*b^2,
+                     asMSE = list(value = asMSE.0,
                                   r = r,
                                   at = neighbor))
 
+        if(.withEvalAsVar) Risk <- .evalListRec(Risk)
+
         if(verbose)
            .checkPIC(L2deriv = L2deriv, neighbor = neighbor,
                      Distr = Distr, trafo = trafo, z = z, A = A, w = w,

Modified: branches/robast-0.9/pkg/ROptEst/R/getInfV.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/getInfV.R	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/R/getInfV.R	2013-02-23 22:11:21 UTC (rev 618)
@@ -55,7 +55,7 @@
 
         erg[col(erg) < row(erg)] <- erg[col(erg) > row(erg)]
 
-        return(stand %*% erg %*% t(stand))
+        return(as.matrix(stand %*% erg %*% t(stand)))
     })
 setMethod("getInfV", signature(L2deriv = "RealRandVariable",
                                    neighbor = "TotalVarNeighborhood",

Modified: branches/robast-0.9/pkg/ROptEst/R/getRiskIC.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/getRiskIC.R	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/R/getRiskIC.R	2013-02-23 22:11:21 UTC (rev 618)
@@ -15,7 +15,7 @@
                                  neighbor = "missing",
                                  L2Fam = "L2ParamFamily"),
     function(IC, risk, L2Fam){
-        Cov <- IC at Risks[["asCov"]]
+        Cov <- eval(IC at Risks[["asCov"]])
         if(is.null(Cov)){
            if(numberOfMaps(L2Fam at L2deriv)==1){ ## L2derivDim <- L2Fam at L2deriv
               L2deriv <- L2Fam at L2derivDistr[[1]]
@@ -38,7 +38,7 @@
                                  neighbor = "missing",
                                  L2Fam = "L2ParamFamily"),
     function(IC, risk, L2Fam){
-        Cov <- IC at Risks[["asCov"]]
+        Cov <- eval(IC at Risks[["asCov"]])
         if (is.null(Cov)){
             L2deriv <- L2Fam at L2derivDistr[[1]]
             A <- as.vector(IC at stand)

Modified: branches/robast-0.9/pkg/ROptEst/R/getStartIC.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/getStartIC.R	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/R/getStartIC.R	2013-02-23 22:11:21 UTC (rev 618)
@@ -2,7 +2,7 @@
            function(model, risk, ...) stop("not yet implemented"))
 
 setMethod("getStartIC",signature(model = "L2ParamFamily", risk = "asGRisk"),
-           function(model, risk, ..., ..debug=FALSE){
+           function(model, risk, ..., withEvalAsVar = TRUE, ..debug=FALSE){
     mc <- match.call(expand.dots=FALSE, call = sys.call(sys.parent(1)))
     dots <- as.list(mc$"...")
     if("fsCor" %in% names(dots)){
@@ -31,6 +31,7 @@
     dots.optic <- .fix.in.defaults(dots, sm.optic)
     dots.optic$model <- NULL
     dots.optic$risk <- NULL
+    dots.optic$.withEvalAsVar <- withEvalAsVar
 
     if(is.null(eps[["e"]])){
         dots.rmx$loRad <- eps$sqn * eps$lower

Modified: branches/robast-0.9/pkg/ROptEst/R/internal.roptest.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/internal.roptest.R	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/R/internal.roptest.R	2013-02-23 22:11:21 UTC (rev 618)
@@ -214,7 +214,8 @@
                     IC.UpdateInKer = getRobAStBaseOption("IC.UpdateInKer"),
                     withICList = getRobAStBaseOption("withICList"),
                     withPICList = getRobAStBaseOption("withPICList"),
-                    scalename = "scale", withLogScale = TRUE){
+                    scalename = "scale", withLogScale = TRUE,
+                    withEvalAsVar = NULL){
   es.call <- match.call()
   es.list <- as.list(es.call[-1])
   es.list <- .fix.in.defaults(es.list,genkStepCtrl)

Modified: branches/robast-0.9/pkg/ROptEst/R/optIC.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/optIC.R	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/R/optIC.R	2013-02-23 22:11:21 UTC (rev 618)
@@ -5,12 +5,15 @@
     function(model, risk, z.start = NULL, A.start = NULL, upper = 1e4,
              lower = 1e-4, OptOrIter = "iterate",
              maxiter = 50, tol = .Machine$double.eps^0.4,
-             warn = TRUE, noLow = FALSE, verbose = NULL, ...){
+             warn = TRUE, noLow = FALSE, verbose = NULL, ...,
+             .withEvalAsVar = TRUE){
         if(missing(verbose)|| is.null(verbose))
            verbose <- getRobAStBaseOption("all.verbose")
         L2derivDim <- numberOfMaps(model at center@L2deriv)
         ow <- options("warn")
         on.exit(options(ow))
+        #L2Fam <- model at center
+        #model at center <- moveL2Fam2RefParam(L2Fam)
         if(L2derivDim == 1){
             options(warn = -1)
             res <- getInfRobIC(L2deriv = model at center@L2derivDistr[[1]],
@@ -23,7 +26,7 @@
             res <- c(res, modifyIC = getModifyIC(L2FamIC = model at center, 
                                                  neighbor = model at neighbor, 
                                                  risk = risk))
-            return(generateIC(model at neighbor, model at center, res))
+            IC.o <- generateIC(model at neighbor, model at center, res)
         }else{
             if(is(model at center@distribution, "UnivariateDistribution")){
                 if((length(model at center@L2deriv) == 1) & is(model at center@L2deriv[[1]], "RealRandVariable")){
@@ -53,18 +56,20 @@
                             trafo = trafo(model at center@param), z.start = z.start, A.start = A.start, 
                             upper = upper, lower = lower, OptOrIter = OptOrIter,
                             maxiter = maxiter, tol = tol, warn = warn,
-                            verbose = verbose, ...)
+                            verbose = verbose, ...,.withEvalAsVar = .withEvalAsVar)
                 options(ow)
                 res$info <- c("optIC", res$info)
                 res <- c(res, modifyIC = getModifyIC(L2FamIC = model at center, 
                                                      neighbor = model at neighbor, 
                                                      risk = risk, verbose = verbose,
                                                      ...))
-                return(generateIC(model at neighbor, model at center, res))
+                IC.o <- generateIC(model at neighbor, model at center, res)
             }else{
                 stop("not yet implemented")
             }
         }
+        #IC.o <- moveICBackFromRefParam(IC.o,L2Fam)
+        return(IC.o)
     })
 
 ###############################################################################

Modified: branches/robast-0.9/pkg/ROptEst/R/roptest.new.R
===================================================================
--- branches/robast-0.9/pkg/ROptEst/R/roptest.new.R	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/R/roptest.new.R	2013-02-23 22:11:21 UTC (rev 618)
@@ -13,7 +13,8 @@
                     withPICList = getRobAStBaseOption("withPICList"),
                     na.rm = TRUE, initial.est.ArgList, ...,
                     withLogScale = TRUE,..withCheck=FALSE,
-                    withTimings = FALSE, withMDE = NULL){
+                    withTimings = FALSE, withMDE = NULL,
+                    withEvalAsVar = NULL){
     es.call <- match.call()
     es.call0 <- match.call(expand.dots=FALSE)
     mwt <- !is.null(es.call$withTimings)
@@ -84,6 +85,16 @@
     nbCtrl    <- .fix.in.defaults(nbCtrl, gennbCtrl)
     startCtrl <- .fix.in.defaults(startCtrl, genstartCtrl)
     kStepCtrl <- .fix.in.defaults(kStepCtrl, genkStepCtrl)
+
+    if(missing(L2Fam))
+        stop("'L2Fam' is missing with no default")
+    if(!is(L2Fam, "L2ParamFamily"))
+        stop("'L2Fam' must be of class 'L2ParamFamily'.")
+
+    withEvalAsVar <- kStepCtrl$withEvalAsVar
+    if(is.null(withEvalAsVar)) withEvalAsVar <- L2Fam at .withEvalAsVar
+
+
     es.list <- as.list(es.call0[-1])
     es.list <- c(es.list,nbCtrl)
     es.list$nbCtrl <- NULL
@@ -92,12 +103,6 @@
     if(missing(verbose)|| is.null(verbose))
            es.list$verbose <- getRobAStBaseOption("all.verbose")
 
-    if(missing(L2Fam))
-        stop("'L2Fam' is missing with no default")
-    if(!is(L2Fam, "L2ParamFamily"))
-        stop("'L2Fam' must be of class 'L2ParamFamily'.")
-
-
     res.x <- .pretreat(x,na.rm)
     x <- res.x$x
     completecases <- res.x$completecases
@@ -193,8 +198,10 @@
     es.list0$steps <- NULL
     es.list0$eps.lower <- NULL
     es.list0$eps.upper <- NULL
+    es.list0$withEvalAsVar <- NULL
     es.list0$na.rm <- NULL
     es.list0$fsCor <- eval(es.list0$fsCor)
+
     if(debug) {cat("\n\n\n::::\n\n")
     argList <- c(list(model=L2Fam,risk=risk,neighbor=neighbor),
                                              es.list0)
@@ -204,10 +211,13 @@
     if(!debug){
       sy.getStartIC <-  system.time({
        ICstart <- do.call(getStartIC, args=c(list(model=L2FamStart,risk=risk,
-                              neighbor=neighbor),es.list0))
+                              neighbor=neighbor, withEvalAsVar = withEvalAsVar),
+                              es.list0))
      })
      if (withTimings) print(sy.getStartIC)
      }
+
+
       if(debug){
          ICstart <- "BUL"
          argList <- list(x, IC = ICstart, start = initial.est, steps = steps,
@@ -218,7 +228,8 @@
                             withPICList = kStepCtrl$withPICList,
                             na.rm = na.rm,
                             scalename = kStepCtrl$scalename,
-                            withLogScale = kStepCtrl$withLogScale)
+                            withLogScale = kStepCtrl$withLogScale,
+                            withEvalAsVar = withEvalAsVar)
          print(argList) }
       sy.kStep <- system.time({
          res <- kStepEstimator(x, IC = ICstart, start = initial.est, steps = steps,
@@ -229,7 +240,8 @@
                             withPICList = kStepCtrl$withPICList,
                             na.rm = na.rm,
                             scalename = kStepCtrl$scalename,
-                            withLogScale = kStepCtrl$withLogScale)
+                            withLogScale = kStepCtrl$withLogScale,
+                            withEvalAsVar = withEvalAsVar)
                             })
        if (withTimings) print(sy.kStep)
 

Modified: branches/robast-0.9/pkg/ROptEst/man/getInfRobIC.Rd
===================================================================
--- branches/robast-0.9/pkg/ROptEst/man/getInfRobIC.Rd	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/man/getInfRobIC.Rd	2013-02-23 22:11:21 UTC (rev 618)
@@ -52,7 +52,8 @@
                        L2derivDistrSymm, Finfo, trafo, onesetLM = FALSE,
                        z.start, A.start, upper = NULL, lower=NULL,
                        OptOrIter = "iterate", maxiter, tol, warn,
-                       verbose = NULL, checkBounds = TRUE, ...)
+                       verbose = NULL, checkBounds = TRUE, ...,
+                       .withEvalAsVar = TRUE)
 
 \S4method{getInfRobIC}{UnivariateDistribution,asAnscombe,UncondNeighborhood}(
                        L2deriv, risk, neighbor, symm, Finfo, trafo, upper = NULL,
@@ -75,7 +76,8 @@
                        neighbor,  Distr, DistrSymm, L2derivSymm,
                        L2derivDistrSymm, Finfo, trafo, onesetLM = FALSE, z.start,
                        A.start, upper = NULL, lower = NULL, OptOrIter = "iterate",
-                       maxiter, tol, warn, verbose = NULL, withPICcheck = TRUE, ...)
+                       maxiter, tol, warn, verbose = NULL, withPICcheck = TRUE,
+                       ..., .withEvalAsVar = TRUE)
 
 \S4method{getInfRobIC}{UnivariateDistribution,asUnOvShoot,UncondNeighborhood}(
                        L2deriv, risk, neighbor, symm, Finfo, trafo,
@@ -121,6 +123,10 @@
   \item{withPICcheck}{logical: at the end of the algorithm, shall we check
   how accurately this is a pIC; this will only be done if
   \code{withPICcheck && verbose}.}
+  \item{.withEvalAsVar}{logical (of length 1):
+     if \code{TRUE}, risks based on covariances are to be
+     evaluated (default), otherwise just a call is returned.}
+
 }
 %\details{}
 \value{The optimally robust IC is computed.}

Modified: branches/robast-0.9/pkg/ROptEst/man/getStartIC-methods.Rd
===================================================================
--- branches/robast-0.9/pkg/ROptEst/man/getStartIC-methods.Rd	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/man/getStartIC-methods.Rd	2013-02-23 22:11:21 UTC (rev 618)
@@ -15,7 +15,8 @@
 
 \usage{getStartIC(model, risk, ...)
 \S4method{getStartIC}{ANY,ANY}(model, risk, ...)
-\S4method{getStartIC}{L2ParamFamily,asGRisk}(model, risk, ..., ..debug=FALSE)
+\S4method{getStartIC}{L2ParamFamily,asGRisk}(model, risk, ...,
+                      withEvalAsVar = TRUE,..debug=FALSE)
 \S4method{getStartIC}{L2ParamFamily,asBias}(model, risk, ..., ..debug=FALSE)
 \S4method{getStartIC}{L2ParamFamily,asCov}(model, risk, ..., ..debug=FALSE)
 \S4method{getStartIC}{L2ParamFamily,trAsCov}(model, risk, ..., ..debug=FALSE)
@@ -25,6 +26,9 @@
   \item{model}{normtype of class \code{NormType}}
   \item{risk}{normtype of class \code{NormType}}
   \item{\dots}{ further arguments to be passed to specific methods.}
+  \item{withEvalAsVar}{logical (of length 1):
+     if \code{TRUE}, risks based on covariances are to be
+     evaluated (default), otherwise just a call is returned.}
   \item{..debug}{logical; if \code{TRUE} information for debugging is issued.}
 }
 \section{Methods}{\describe{

Modified: branches/robast-0.9/pkg/ROptEst/man/inputGenerator.Rd
===================================================================
--- branches/robast-0.9/pkg/ROptEst/man/inputGenerator.Rd	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/man/inputGenerator.Rd	2013-02-23 22:11:21 UTC (rev 618)
@@ -13,7 +13,8 @@
                     IC.UpdateInKer = getRobAStBaseOption("IC.UpdateInKer"),
                     withICList = getRobAStBaseOption("withICList"),
                     withPICList = getRobAStBaseOption("withPICList"),
-                    scalename = "scale", withLogScale = TRUE)
+                    scalename = "scale", withLogScale = TRUE,
+                    withEvalAsVar = NULL)
 genstartCtrl(initial.est = NULL, initial.est.ArgList = NULL,
                         startPar = NULL, distance = CvMDist, withMDE = NULL)
 gennbCtrl(neighbor = ContNeighborhood(), eps, eps.lower, eps.upper)
@@ -35,6 +36,11 @@
   \item{withLogScale}{logical; shall a scale component (if existing and found
    with name \code{scalename}) be computed on log-scale and backtransformed
    afterwards? This avoids crossing 0.}
+  \item{withEvalAsVar}{logical or \code{NULL}: if \code{TRUE} (default), tells R
+  to evaluate the asymptotic variance or if \code{FALSE} just to produces a call
+  to do so. If \code{withEvalAsVar} is \code{NULL} (default),  the content
+       of slot \code{.withEvalAsVar} in the L2 family is used instead to take
+       this decision.}
 
   \item{initial.est}{ initial estimate for unknown parameter. If missing
         minimum distance estimator is computed. }

Modified: branches/robast-0.9/pkg/ROptEst/man/optIC.Rd
===================================================================
--- branches/robast-0.9/pkg/ROptEst/man/optIC.Rd	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/man/optIC.Rd	2013-02-23 22:11:21 UTC (rev 618)
@@ -16,7 +16,8 @@
                                      upper = 1e4, lower = 1e-4,
                                      OptOrIter = "iterate", maxiter = 50,
                                      tol = .Machine$double.eps^0.4, warn = TRUE, 
-                                     noLow = FALSE, verbose = NULL, ...)
+                                     noLow = FALSE, verbose = NULL, ...,
+                                     .withEvalAsVar = TRUE)
 
 \S4method{optIC}{InfRobModel,asUnOvShoot}(model, risk, upper = 1e4,
                                           lower = 1e-4, maxiter = 50,
@@ -52,6 +53,9 @@
   we use only one (inner) iteration, if matched to \code{"doubleiterate"}
   we use up to \code{Maxiter} (inner) iterations.}
   \item{verbose}{ logical: if \code{TRUE}, some messages are printed }
+  \item{.withEvalAsVar}{logical (of length 1):
+     if \code{TRUE}, risks based on covariances are to be
+     evaluated (default), otherwise just a call is returned.}
 }
 \details{ In case of the finite-sample risk \code{"fiUnOvShoot"} one can choose
   between two algorithms for the computation of this risk where the least favorable

Modified: branches/robast-0.9/pkg/ROptEst/man/roptest.Rd
===================================================================
--- branches/robast-0.9/pkg/ROptEst/man/roptest.Rd	2013-02-23 21:54:42 UTC (rev 617)
+++ branches/robast-0.9/pkg/ROptEst/man/roptest.Rd	2013-02-23 22:11:21 UTC (rev 618)
@@ -18,7 +18,7 @@
         withPICList = getRobAStBaseOption("withPICList"),
         na.rm = TRUE, initial.est.ArgList, ...,
         withLogScale = TRUE, ..withCheck = FALSE, withTimings = FALSE,
-        withMDE = NULL)
+        withMDE = NULL, withEvalAsVar = NULL)
 roptest.old(x, L2Fam, eps, eps.lower, eps.upper, fsCor = 1, initial.est,
         neighbor = ContNeighborhood(), risk = asMSE(), steps = 1L,
         distance = CvMDist, startPar = NULL, verbose = NULL,
@@ -89,11 +89,16 @@
    timings for the three steps evaluating the starting value, finding
    the starting influence curve, and evaluating the k-step estimator is
    issued.}
-  \item{withMDE}{ logical or NULL: Shall a minimum distance estimator be used as
+  \item{withMDE}{ logical or \code{NULL}: Shall a minimum distance estimator be used as
        starting estimator---in addition to the function given in slot
-       \code{startPar} of the L2 family? If \code{NULL} (default) the content
+       \code{startPar} of the L2 family? If \code{NULL} (default), the content
        of slot \code{.withMDE} in the L2 family is used instead to take
        this decision.}
+  \item{withEvalAsVar}{logical or \code{NULL}: if \code{TRUE} (default), tells R
+  to evaluate the asymptotic variance or if \code{FALSE} just to produces a call
+  to do so. If \code{withEvalAsVar} is \code{NULL} (default),  the content
+       of slot \code{.withEvalAsVar} in the L2 family is used instead to take
+       this decision.}
 }
 \details{
   Computes the optimally robust estimator for a given L2 differentiable



More information about the Robast-commits mailing list