[Robast-commits] r142 - branches/robast-0.6/pkg/RobAStBase/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 4 12:36:32 CEST 2008


Author: stamats
Date: 2008-08-04 12:36:32 +0200 (Mon, 04 Aug 2008)
New Revision: 142

Modified:
   branches/robast-0.6/pkg/RobAStBase/R/AllShow.R
   branches/robast-0.6/pkg/RobAStBase/R/kStepEstimator.R
   branches/robast-0.6/pkg/RobAStBase/R/locMEstimator.R
   branches/robast-0.6/pkg/RobAStBase/R/oneStepEstimator.R
Log:
minor changes; 
open problem: how to save the original call to some S4-method and not ".local(....)"???

Modified: branches/robast-0.6/pkg/RobAStBase/R/AllShow.R
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/R/AllShow.R	2008-08-04 08:44:08 UTC (rev 141)
+++ branches/robast-0.6/pkg/RobAStBase/R/AllShow.R	2008-08-04 10:36:32 UTC (rev 142)
@@ -100,9 +100,9 @@
             cat("asymptotic bias:\n")
             print(asbias(object), quote = FALSE)
         }
-        if(getdistrModOption("show.details") == "maximal"){
+        if(getdistrModOption("show.details") == "maximal" && !is.null(pIC(object))){
             cat("(partial) influence curve:\n")
-            print(pIC(object), quote = FALSE)
+            show(pIC(object))
         }
     })
 setMethod("show", "kStepEstimate", 

Modified: branches/robast-0.6/pkg/RobAStBase/R/kStepEstimator.R
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/R/kStepEstimator.R	2008-08-04 08:44:08 UTC (rev 141)
+++ branches/robast-0.6/pkg/RobAStBase/R/kStepEstimator.R	2008-08-04 10:36:32 UTC (rev 142)
@@ -6,6 +6,7 @@
                                       start = "numeric"),
     function(x, IC, start, steps = 1L, useLast = getRobAStBaseOption("kStepUseLast")){
         es.call <- match.call()
+        es.call[[1]] <- as.name("kStepEstimator")
         if(!is.integer(steps))
           steps <- as.integer(steps)
         if(steps < 1)
@@ -31,16 +32,16 @@
                 main(newParam) <- res
                 newL2Fam <- modifyModel(L2Fam, newParam)
                 IC <- modifyIC(IC)(newL2Fam, IC)
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = TRUE"))
             }else{
                 if(useLast && is(modifyIC(IC), "NULL")){
                     warning("'useLast = TRUE' only possible if slot 'modifyIC' of 'IC'
                              is filled with some function!")
-                    Infos <- rbind(Infos, c("oneStepEstimator", 
+                    Infos <- rbind(Infos, c("kStepEstimator", 
                                             "slot 'modifyIC' of 'IC' was not filled!"))
                 }
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = FALSE"))
             }
             if("asCov" %in% names(Risks(IC)))
@@ -86,10 +87,10 @@
                 main(newParam) <- res
                 newL2Fam <- modifyModel(newL2Fam, newParam)
                 IC <- modifyIC(IC)(newL2Fam, IC)
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = TRUE"))
             }else{
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = FALSE"))
             }
             if("asCov" %in% names(Risks(IC)))
@@ -125,6 +126,7 @@
                                       start = "numeric"),
     function(x, IC, start, steps = 1, useLast = getRobAStBaseOption("kStepUseLast")){
         es.call <- match.call()
+        es.call[[1]] <- as.name("kStepEstimator")
         if(!is.integer(steps))
           steps <- as.integer(steps)
         if(steps < 1)
@@ -152,16 +154,16 @@
                 main(newParam) <- res
                 newL2Fam <- modifyModel(L2Fam, newParam)
                 IC <- modifyIC(IC)(newL2Fam, IC)
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = TRUE"))
             }else{
                 if(useLast && is(modifyIC(IC), "NULL")){
                     warning("'useLast = TRUE' only possible if slot 'modifyIC' of 'IC'
                              is filled with some function!")
-                    Infos <- rbind(Infos, c("oneStepEstimator", 
+                    Infos <- rbind(Infos, c("kStepEstimator", 
                                             "slot 'modifyIC' of 'IC' was not filled!"))
                 }
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = FALSE"))
             }
             if("asCov" %in% names(Risks(IC)))
@@ -207,10 +209,10 @@
                 main(newParam) <- res
                 newL2Fam <- modifyModel(newL2Fam, newParam)
                 IC <- modifyIC(IC)(newL2Fam, IC)
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = TRUE"))
             }else{
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = FALSE"))
             }
             if("asCov" %in% names(Risks(IC)))
@@ -245,6 +247,7 @@
                                       start = "Estimate"),
     function(x, IC, start, steps = 1, useLast = getRobAStBaseOption("kStepUseLast")){
         es.call <- match.call()
+        es.call[[1]] <- as.name("kStepEstimator")
         if(!is.integer(steps))
           steps <- as.integer(steps)
         if(steps < 1)
@@ -271,16 +274,16 @@
                 main(newParam) <- res
                 newL2Fam <- modifyModel(L2Fam, newParam)
                 IC <- modifyIC(IC)(newL2Fam, IC)
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = TRUE"))
             }else{
                 if(useLast && is(modifyIC(IC), "NULL")){
                     warning("'useLast = TRUE' only possible if slot 'modifyIC' of 'IC'
                              is filled with some function!")
-                    Infos <- rbind(Infos, c("oneStepEstimator", 
+                    Infos <- rbind(Infos, c("kStepEstimator", 
                                             "slot 'modifyIC' of 'IC' was not filled!"))
                 }
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = FALSE"))
             }
             if("asCov" %in% names(Risks(IC)))
@@ -326,10 +329,10 @@
                 main(newParam) <- res
                 newL2Fam <- modifyModel(newL2Fam, newParam)
                 IC <- modifyIC(IC)(newL2Fam, IC)
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = TRUE"))
             }else{
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = FALSE"))
             }
             if("asCov" %in% names(Risks(IC)))
@@ -364,6 +367,7 @@
                                       start = "Estimate"),
     function(x, IC, start, steps = 1, useLast = getRobAStBaseOption("kStepUseLast")){
         es.call <- match.call()
+        es.call[[1]] <- as.name("kStepEstimator")
         if(!is.integer(steps))
           steps <- as.integer(steps)
         if(steps < 1)
@@ -392,16 +396,16 @@
                 main(newParam) <- res
                 newL2Fam <- modifyModel(L2Fam, newParam)
                 IC <- modifyIC(IC)(newL2Fam, IC)
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = TRUE"))
             }else{
                 if(useLast && is(modifyIC(IC), "NULL")){
                     warning("'useLast = TRUE' only possible if slot 'modifyIC' of 'IC'
                              is filled with some function!")
-                    Infos <- rbind(Infos, c("oneStepEstimator", 
+                    Infos <- rbind(Infos, c("kStepEstimator", 
                                             "slot 'modifyIC' of 'IC' was not filled!"))
                 }
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = FALSE"))
             }
             if("asCov" %in% names(Risks(IC)))
@@ -447,10 +451,10 @@
                 main(newParam) <- res
                 newL2Fam <- modifyModel(newL2Fam, newParam)
                 IC <- modifyIC(IC)(newL2Fam, IC)
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = TRUE"))
             }else{
-                Infos <- rbind(Infos, c("oneStepEstimator", 
+                Infos <- rbind(Infos, c("kStepEstimator", 
                                         "computation of IC, asvar and asbias via useLast = FALSE"))
             }
             if("asCov" %in% names(Risks(IC)))

Modified: branches/robast-0.6/pkg/RobAStBase/R/locMEstimator.R
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/R/locMEstimator.R	2008-08-04 08:44:08 UTC (rev 141)
+++ branches/robast-0.6/pkg/RobAStBase/R/locMEstimator.R	2008-08-04 10:36:32 UTC (rev 142)
@@ -4,6 +4,7 @@
 setMethod("locMEstimator", signature(x = "numeric", IC = "InfluenceCurve"),
     function(x, IC, eps = .Machine$double.eps^0.5){
         es.call <- match.call()
+        es.call[[1]] <- as.name("locMEstimator")
         if(numberOfMaps(IC at Curve) > 1)
             stop("number of Maps of 'IC' has to be 1")
 

Modified: branches/robast-0.6/pkg/RobAStBase/R/oneStepEstimator.R
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/R/oneStepEstimator.R	2008-08-04 08:44:08 UTC (rev 141)
+++ branches/robast-0.6/pkg/RobAStBase/R/oneStepEstimator.R	2008-08-04 10:36:32 UTC (rev 142)
@@ -6,6 +6,7 @@
                                         start = "numeric"),
     function(x, IC, start, useLast = getRobAStBaseOption("kStepUseLast")){
         es.call <- match.call()
+        es.call[[1]] <- as.name("oneStepEstimator")
         nrvalues <- dimension(IC at Curve)
         if(is.list(start)) start <- unlist(start)
         if(nrvalues != length(start))
@@ -74,6 +75,7 @@
                                         start = "numeric"),
     function(x, IC, start, useLast = getRobAStBaseOption("kStepUseLast")){
         es.call <- match.call()
+        es.call[[1]] <- as.name("oneStepEstimator")
         nrvalues <- dimension(IC at Curve)
         if(is.list(start)) start <- unlist(start)
         if(nrvalues != length(start))
@@ -144,6 +146,7 @@
                                         start = "Estimate"),
     function(x, IC, start, useLast = getRobAStBaseOption("kStepUseLast")){
         es.call <- match.call()
+        es.call[[1]] <- as.name("oneStepEstimator")
         nrvalues <- dimension(IC at Curve)
         start0 <- estimate(start)
         if(is.list(start0)) start0 <- unlist(start0)
@@ -213,6 +216,7 @@
                                         start = "Estimate"),
     function(x, IC, start, useLast = getRobAStBaseOption("kStepUseLast")){
         es.call <- match.call()
+        es.call[[1]] <- as.name("oneStepEstimator")
         nrvalues <- dimension(IC at Curve)
         start0 <- estimate(start)
         if(is.list(start0)) start0 <- unlist(start0)



More information about the Robast-commits mailing list