[Robast-commits] r1106 - in branches/robast-1.2/pkg: ROptEst/R ROptEst/inst RobAStBase/inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 6 20:37:21 CEST 2018


Author: ruckdeschel
Date: 2018-08-06 20:37:21 +0200 (Mon, 06 Aug 2018)
New Revision: 1106

Modified:
   branches/robast-1.2/pkg/ROptEst/R/getModifyIC.R
   branches/robast-1.2/pkg/ROptEst/R/getStartIClcsc.R
   branches/robast-1.2/pkg/ROptEst/inst/NEWS
   branches/robast-1.2/pkg/RobAStBase/inst/NEWS
Log:
[ROptEst] branch 1.2
+ slot function modifyIC of the different IC classes gains
  an argument withMakeIC to be able to adjust this to a
  higher granularity


Modified: branches/robast-1.2/pkg/ROptEst/R/getModifyIC.R
===================================================================
--- branches/robast-1.2/pkg/ROptEst/R/getModifyIC.R	2018-08-06 18:30:48 UTC (rev 1105)
+++ branches/robast-1.2/pkg/ROptEst/R/getModifyIC.R	2018-08-06 18:37:21 UTC (rev 1106)
@@ -10,11 +10,14 @@
         dots <- mcl[["..."]]
         dots$verbose <- NULL
         dots$warn <- FALSE
-        modIC <- function(L2Fam, IC){}
+        modIC <- function(L2Fam, IC, withMakeIC){}
         body(modIC) <- substitute({ verbose <- getRobAStBaseOption("all.verbose")
                                     infMod <- InfRobModel(L2Fam, nghb)
-                                    do.call(optIC, args = c(list(infMod, risk=R),
-                                                            dots0)) },
+                                    IC.0 <- do.call(optIC, args = c(list(infMod, risk=R),
+                                                            dots0))
+                                    if(withMakeIC) IC.0 <- makeIC(IC.0, L2Fam)
+                                    return(IC.0)
+                                    },
                                   list(nghb = neighbor, R = risk,
                                        dots0 = eval(dots, envir=parent.frame(2))))
         return(modIC)
@@ -23,7 +26,7 @@
 setMethod("getModifyIC", signature(L2FamIC = "L2LocationFamily", 
                                    neighbor = "UncondNeighborhood", risk = "asGRisk"),
     function(L2FamIC, neighbor, risk, ...){
-        modIC <- function(L2Fam, IC){
+        modIC <- function(L2Fam, IC, withMakeIC){
             D <- distribution(eval(CallL2Fam(IC)))
             if(is(L2Fam, "L2LocationFamily") && is(distribution(L2Fam), class(D))){
                 CallL2Fam(IC) <- fam.call(L2Fam)
@@ -111,7 +114,7 @@
     function(L2FamIC, neighbor, risk, ..., modifyICwarn = NULL){
         if(missing(modifyICwarn)|| is.null(modifyICwarn))
            modifyICwarn <- getRobAStBaseOption("modifyICwarn")
-        modIC <- function(L2Fam, IC){
+        modIC <- function(L2Fam, IC, withMakeIC){
             ICL2Fam <- eval(CallL2Fam(IC))
             if(is(L2Fam, "L2ScaleFamily") && is(distribution(L2Fam), class(distribution(ICL2Fam)))){
                 res <- scaleUpdateIC(sdneu = main(L2Fam),
@@ -136,7 +139,7 @@
         if(missing(modifyICwarn)|| is.null(modifyICwarn))
            modifyICwarn <- getRobAStBaseOption("modifyICwarn")
 
-        modIC <- function(L2Fam, IC){
+        modIC <- function(L2Fam, IC, withMakeIC){
             ICL2Fam <- eval(CallL2Fam(IC))
             if(is(L2Fam, "L2LocationScaleFamily") && is(distribution(L2Fam),
                           class(distribution(ICL2Fam)))){

Modified: branches/robast-1.2/pkg/ROptEst/R/getStartIClcsc.R
===================================================================
--- branches/robast-1.2/pkg/ROptEst/R/getStartIClcsc.R	2018-08-06 18:30:48 UTC (rev 1105)
+++ branches/robast-1.2/pkg/ROptEst/R/getStartIClcsc.R	2018-08-06 18:37:21 UTC (rev 1106)
@@ -25,20 +25,17 @@
     if(length(nsng)){
        if(gridn %in% nsng){
           LMref <- famg[[gridn]]
-          .modifyIC0 <- function(L2Fam, IC){
+          .modifyIC0 <- function(L2Fam, IC, withMakeIC){
                     para <- param(L2Fam)
                     return(intfct(para, LMref, L2Fam, type(risk)))
           }
-          attr(.modifyIC0,"hasMakeICin.modifyIC") <- TRUE
 
-          .modifyIC <- function(L2Fam,IC){
-               psi.0 <- .modifyIC0(L2Fam,IC)
-               psi.0 at modifyIC <- .modifyIC
+          .modifyIC <- function(L2Fam,IC, withMakeIC){
+               psi.0 <- .modifyIC0(L2Fam,IC, withMakeIC)
+               psi.0 at modifyIC <- .modifyIC0
                return(psi.0)
           }
 
-          attr(.modifyIC,"hasMakeICin.modifyIC") <- TRUE
-
           IC0 <- intfct(param1, LMref, model, type(risk))
           IC0 at modifyIC <- .modifyIC
           return(IC0)

Modified: branches/robast-1.2/pkg/ROptEst/inst/NEWS
===================================================================
--- branches/robast-1.2/pkg/ROptEst/inst/NEWS	2018-08-06 18:30:48 UTC (rev 1105)
+++ branches/robast-1.2/pkg/ROptEst/inst/NEWS	2018-08-06 18:37:21 UTC (rev 1106)
@@ -8,6 +8,26 @@
  information)
 
 #######################################
+version 1.2
+#######################################
+
+user-visible CHANGES:
++ slot function modifyIC of the different IC classes gains
+  an argument withMakeIC to be able to adjust this to a
+  higher granularity
++ require more recent versions in DESCRIPTION
+
+under the hood
+
++ L2LocationFamily, L2LocationScaleFamily, and L2LocationScaleFamily gain methods for interpolRisk
+  ~> speed up is prepared (only need to store the reference LMs in sysdata.rda) 
+  => due to affine equivariance, we only have to store one set of LM's 
++ comparePlot has a try catch now for MBRE
++ some buglets in getStartIC 
++ some tedious debugging in getStartIClcsc.R
++ clarified if clauses in roptest.new (and removed .with.checkEstClassForParamFamily from dots to be sure)
+
+#######################################
 version 1.1
 #######################################
 

Modified: branches/robast-1.2/pkg/RobAStBase/inst/NEWS
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/inst/NEWS	2018-08-06 18:30:48 UTC (rev 1105)
+++ branches/robast-1.2/pkg/RobAStBase/inst/NEWS	2018-08-06 18:37:21 UTC (rev 1106)
@@ -20,6 +20,7 @@
 + new S4 (estimator) class "MCALEstimate" containing both 
   "MCEstimate" and "ALEstimate" to make accessible pIC-methods
   to CvMMDEstimators...
++ some unnecessary coercions (with informatino loss) in show methods
 + new .checkEstClassForParamFamily method to force (expost)
       casting to MCALEstimate (with pIC)
 + to speed up things slot pIC is filled with a promise only 



More information about the Robast-commits mailing list