[Robast-commits] r1124 - branches/robast-1.2/pkg/ROptEstOld/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Aug 11 16:46:52 CEST 2018


Author: ruckdeschel
Date: 2018-08-11 16:46:52 +0200 (Sat, 11 Aug 2018)
New Revision: 1124

Modified:
   branches/robast-1.2/pkg/ROptEstOld/R/getInfRobIC_asCov.R
   branches/robast-1.2/pkg/ROptEstOld/R/getInfRobIC_asHampel.R
   branches/robast-1.2/pkg/ROptEstOld/R/getInfStand.R
   branches/robast-1.2/pkg/ROptEstOld/R/infoPlot.R
   branches/robast-1.2/pkg/ROptEstOld/R/leastFavorableRadius.R
   branches/robast-1.2/pkg/ROptEstOld/R/optIC.R
   branches/robast-1.2/pkg/ROptEstOld/R/optRisk.R
   branches/robast-1.2/pkg/ROptEstOld/R/radiusMinimaxIC.R
Log:
[ROptEstOld] branch 1.2 
+ now specified that we want to use distr::solve



Modified: branches/robast-1.2/pkg/ROptEstOld/R/getInfRobIC_asCov.R
===================================================================
--- branches/robast-1.2/pkg/ROptEstOld/R/getInfRobIC_asCov.R	2018-08-11 14:45:33 UTC (rev 1123)
+++ branches/robast-1.2/pkg/ROptEstOld/R/getInfRobIC_asCov.R	2018-08-11 14:46:52 UTC (rev 1124)
@@ -6,7 +6,7 @@
                                    neighbor = "ContNeighborhood"),
     function(L2deriv, risk, neighbor, Finfo, trafo){
             info <- c("optimal IC in sense of Cramer-Rao bound")
-            A <- trafo %*% solve(Finfo)
+            A <- trafo %*% distr::solve(Finfo)
             b <- abs(as.vector(A))*max(abs(q.l(L2deriv)(1)),abs(q.l(L2deriv)(0)))
             Risk <- list(asCov = A %*% t(trafo), asBias = b)
 
@@ -17,7 +17,7 @@
                                    neighbor = "TotalVarNeighborhood"),
     function(L2deriv, risk, neighbor, Finfo, trafo){
             info <- c("optimal IC in sense of Cramer-Rao bound")
-            A <- trafo %*% solve(Finfo)
+            A <- trafo %*% distr::solve(Finfo)
             b <- abs(as.vector(A))*(q.l(L2deriv)(1)-q.l(L2deriv)(0))
             Risk <- list(asCov = A %*% t(trafo), asBias = b)
 
@@ -28,7 +28,7 @@
                                    neighbor = "ContNeighborhood"),
     function(L2deriv, risk, neighbor, Distr, Finfo, trafo){
             info <- c("optimal IC in sense of Cramer-Rao bound")
-            A <- trafo %*% solve(Finfo)
+            A <- trafo %*% distr::solve(Finfo)
             IC <- A %*% L2deriv
             if(is(Distr, "UnivariateDistribution")){
                 lower <- ifelse(is.finite(q.l(Distr)(0)), q.l(Distr)(1e-8), q.l(Distr)(0))

Modified: branches/robast-1.2/pkg/ROptEstOld/R/getInfRobIC_asHampel.R
===================================================================
--- branches/robast-1.2/pkg/ROptEstOld/R/getInfRobIC_asHampel.R	2018-08-11 14:45:33 UTC (rev 1123)
+++ branches/robast-1.2/pkg/ROptEstOld/R/getInfRobIC_asHampel.R	2018-08-11 14:46:52 UTC (rev 1124)
@@ -69,7 +69,7 @@
         if(is.null(z.start)) z.start <- numeric(ncol(trafo))
         if(is.null(A.start)) A.start <- trafo
 
-        ClassIC <- trafo %*% solve(Finfo) %*% L2deriv
+        ClassIC <- trafo %*% distr::solve(Finfo) %*% L2deriv
         lower <- q.l(Distr)(getdistrOption("TruncQuantile"))
         upper <- q.l(Distr)(1-getdistrOption("TruncQuantile"))
         x <- seq(from = lower, to = upper, by = 0.01)

Modified: branches/robast-1.2/pkg/ROptEstOld/R/getInfStand.R
===================================================================
--- branches/robast-1.2/pkg/ROptEstOld/R/getInfStand.R	2018-08-11 14:45:33 UTC (rev 1123)
+++ branches/robast-1.2/pkg/ROptEstOld/R/getInfStand.R	2018-08-11 14:46:52 UTC (rev 1124)
@@ -46,5 +46,5 @@
 
         erg[col(erg) < row(erg)] <- erg[col(erg) > row(erg)]
 
-        return(trafo %*% solve(erg))
+        return(trafo %*% distr::solve(erg))
     })

Modified: branches/robast-1.2/pkg/ROptEstOld/R/infoPlot.R
===================================================================
--- branches/robast-1.2/pkg/ROptEstOld/R/infoPlot.R	2018-08-11 14:45:33 UTC (rev 1123)
+++ branches/robast-1.2/pkg/ROptEstOld/R/infoPlot.R	2018-08-11 14:46:52 UTC (rev 1124)
@@ -22,7 +22,7 @@
 
             trafo <- L2Fam at param@trafo
             dims <- nrow(trafo)
-            classIC <- as(trafo %*% solve(L2Fam at FisherInfo) %*% L2Fam at L2deriv, "EuclRandVariable")
+            classIC <- as(trafo %*% distr::solve(L2Fam at FisherInfo) %*% L2Fam at L2deriv, "EuclRandVariable")
             absInfoClass <- classIC %*% classIC
             absInfoClass <- sapply(x.vec, absInfoClass at Map[[1]])
             IC1 <- as(diag(dims) %*% object at Curve, "EuclRandVariable")

Modified: branches/robast-1.2/pkg/ROptEstOld/R/leastFavorableRadius.R
===================================================================
--- branches/robast-1.2/pkg/ROptEstOld/R/leastFavorableRadius.R	2018-08-11 14:45:33 UTC (rev 1123)
+++ branches/robast-1.2/pkg/ROptEstOld/R/leastFavorableRadius.R	2018-08-11 14:46:52 UTC (rev 1124)
@@ -109,7 +109,7 @@
                     trafo <- L2Fam at param@trafo
                     if(identical(all.equal(loRad, 0), TRUE)){
                         loRad <- 0
-                        loRisk <- sum(diag(solve(L2Fam at FisherInfo)))
+                        loRisk <- sum(diag(distr::solve(L2Fam at FisherInfo)))
                     }else{
                         neighbor at radius <- loRad
                         resLo <- getInfRobIC(L2deriv = L2deriv, neighbor = neighbor, risk = risk, 

Modified: branches/robast-1.2/pkg/ROptEstOld/R/optIC.R
===================================================================
--- branches/robast-1.2/pkg/ROptEstOld/R/optIC.R	2018-08-11 14:45:33 UTC (rev 1123)
+++ branches/robast-1.2/pkg/ROptEstOld/R/optIC.R	2018-08-11 14:46:52 UTC (rev 1124)
@@ -3,8 +3,8 @@
 ###############################################################################
 setMethod("optIC", signature(model = "L2ParamFamily", risk = "asCov"),
     function(model, risk){
-        Curve <- as((model at param@trafo %*% solve(model at FisherInfo)) %*% model at L2deriv, "EuclRandVariable")
-        asCov <- model at param@trafo %*% solve(model at FisherInfo) %*% t(model at param@trafo)
+        Curve <- as((model at param@trafo %*% distr::solve(model at FisherInfo)) %*% model at L2deriv, "EuclRandVariable")
+        asCov <- model at param@trafo %*% distr::solve(model at FisherInfo) %*% t(model at param@trafo)
 
         return(IC(
             name = paste("Classical optimal influence curve for", model at name), 

Modified: branches/robast-1.2/pkg/ROptEstOld/R/optRisk.R
===================================================================
--- branches/robast-1.2/pkg/ROptEstOld/R/optRisk.R	2018-08-11 14:45:33 UTC (rev 1123)
+++ branches/robast-1.2/pkg/ROptEstOld/R/optRisk.R	2018-08-11 14:46:52 UTC (rev 1124)
@@ -3,7 +3,7 @@
 ###############################################################################
 setMethod("optRisk", signature(model = "L2ParamFamily", risk = "asCov"),
     function(model, risk){
-        return(list(asCov = solve(model at FisherInfo)))
+        return(list(asCov = distr::solve(model at FisherInfo)))
     })
 
 ###############################################################################

Modified: branches/robast-1.2/pkg/ROptEstOld/R/radiusMinimaxIC.R
===================================================================
--- branches/robast-1.2/pkg/ROptEstOld/R/radiusMinimaxIC.R	2018-08-11 14:45:33 UTC (rev 1123)
+++ branches/robast-1.2/pkg/ROptEstOld/R/radiusMinimaxIC.R	2018-08-11 14:46:52 UTC (rev 1124)
@@ -105,7 +105,7 @@
 
                 if(identical(all.equal(loRad, 0), TRUE)){
                     loRad <- 0
-                    loRisk <- sum(diag(solve(L2Fam at FisherInfo)))
+                    loRisk <- sum(diag(distr::solve(L2Fam at FisherInfo)))
                 }else{
                     neighbor at radius <- loRad
                     resLo <- getInfRobIC(L2deriv = L2deriv, neighbor = neighbor, risk = risk, 



More information about the Robast-commits mailing list