[Robast-commits] r887 - in pkg/RobAStBase: R man tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 1 17:48:08 CEST 2016


Author: ruckdeschel
Date: 2016-09-01 17:48:08 +0200 (Thu, 01 Sep 2016)
New Revision: 887

Added:
   pkg/RobAStBase/R/getFiRisk.R
   pkg/RobAStBase/R/plotUtils.R
Removed:
   pkg/RobAStBase/tests/doRUnit.R
Modified:
   pkg/RobAStBase/R/00internal.R
   pkg/RobAStBase/R/AllGeneric.R
   pkg/RobAStBase/R/AllPlot.R
   pkg/RobAStBase/R/comparePlot.R
   pkg/RobAStBase/R/infoPlot.R
   pkg/RobAStBase/R/interpolRisks.R
   pkg/RobAStBase/man/0RobAStBase-package.Rd
   pkg/RobAStBase/man/comparePlot.Rd
   pkg/RobAStBase/man/getRiskFctBV-methods.Rd
   pkg/RobAStBase/man/infoPlot.Rd
   pkg/RobAStBase/man/internals_ddPlot.Rd
   pkg/RobAStBase/man/outlyingPlotIC.Rd
   pkg/RobAStBase/man/plot-methods.Rd
   pkg/RobAStBase/man/qqplot.Rd
Log:
trunk RobAStBase pre-release

Modified: pkg/RobAStBase/R/00internal.R
===================================================================
--- pkg/RobAStBase/R/00internal.R	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/R/00internal.R	2016-09-01 15:48:08 UTC (rev 887)
@@ -52,6 +52,15 @@
     return(wI)
 }
 
+if(!isGeneric(".checkEstClassForParamFamily")){
+   setGeneric(".checkEstClassForParamFamily", function(PFam, estimator)
+               standardGeneric(".checkEstClassForParamFamily"))
+}
+setMethod(".checkEstClassForParamFamily",
+              signature=signature(PFam="ANY",estimator="ANY"),
+              function(PFam, estimator) estimator)
+
+
 #------------------------------------------------------------------------------
 ### for distrXXX pre 2.5
 #------------------------------------------------------------------------------

Modified: pkg/RobAStBase/R/AllGeneric.R
===================================================================
--- pkg/RobAStBase/R/AllGeneric.R	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/R/AllGeneric.R	2016-09-01 15:48:08 UTC (rev 887)
@@ -240,3 +240,7 @@
     setGeneric("rescaleFunction", function(L2Fam, ...)
                standardGeneric("rescaleFunction"))
 }
+if(!isGeneric("getFiRisk")){
+    setGeneric("getFiRisk", 
+        function(risk, Distr, neighbor, ...) standardGeneric("getFiRisk"))
+}

Modified: pkg/RobAStBase/R/AllPlot.R
===================================================================
--- pkg/RobAStBase/R/AllPlot.R	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/R/AllPlot.R	2016-09-01 15:48:08 UTC (rev 887)
@@ -143,7 +143,7 @@
                 lty <- "solid"
             }else{
                 if(!is.null(x.vec)){
-                   if(is(distr, "DiscreteDistribution"))
+                   if(is(e1, "DiscreteDistribution"))
                       x.vec <- intersect(x.vec,support(e1))
                 }else{
                    if(is(e1, "DiscreteDistribution")) x.vec <- support(e1)

Modified: pkg/RobAStBase/R/comparePlot.R
===================================================================
--- pkg/RobAStBase/R/comparePlot.R	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/R/comparePlot.R	2016-09-01 15:48:08 UTC (rev 887)
@@ -291,8 +291,8 @@
             absInfoEval <- function(x,IC){
                   QF <- ID
                   if(is(IC,"ContIC") & dims>1 ){
-                     if (is(normtype(object),"QFNorm"))
-                          QF <- QuadForm(normtype(object))
+                     if (is(normtype(IC),"QFNorm"))
+                          QF <- QuadForm(normtype(IC))
                   }
                   absInfo.f <- t(IC) %*% QF %*% IC
                   return(sapply(x, absInfo.f at Map[[1]]))
@@ -386,8 +386,8 @@
 
             finiteEndpoints <- rep(FALSE,4)
             if(scaleX){
-               finiteEndpoints[1] <- is.finite(scaleX.inv(min(x.vec1, xlim[1],na.rm=TRUE)))
-               finiteEndpoints[2] <- is.finite(scaleX.inv(max(x.vec1, xlim[2],na.rm=TRUE)))
+               finiteEndpoints[1] <- is.finite(scaleX.inv(min(x.vec, xlim[1],na.rm=TRUE)))
+               finiteEndpoints[2] <- is.finite(scaleX.inv(max(x.vec, xlim[2],na.rm=TRUE)))
             }
             if(scaleY){
                finiteEndpoints[3] <- is.finite(scaleY.inv[[i]](min(ym, ylim[1,i],na.rm=TRUE)))

Added: pkg/RobAStBase/R/getFiRisk.R
===================================================================
--- pkg/RobAStBase/R/getFiRisk.R	                        (rev 0)
+++ pkg/RobAStBase/R/getFiRisk.R	2016-09-01 15:48:08 UTC (rev 887)
@@ -0,0 +1,196 @@
+###############################################################################
+## finite-sample under-/overshoot risk
+###############################################################################
+
+# cdf of truncated normal distribution
+ptnorm <- function(x, mu, A, B){
+    ((A <= x)*(x <= B)*(pnorm(x-mu)-pnorm(A-mu))/(pnorm(B-mu)-pnorm(A-mu))
+    + (x > B))
+}
+
+# n-fold convolution for truncated normal distributions
+conv.tnorm <- function(z, A, B, mu, n, m){
+    if(n == 1) return(ptnorm(z, mu = mu, A = A, B = B))
+    if(z <= n*A) return(0)
+    if(z >= n*B) return(1)
+    
+    M <- 2^m
+    h <- (B-A)/M
+    x <- seq(from = A, to = B, by = h)
+    p1 <- ptnorm(x, mu = mu, A = A, B = B)
+    p1 <- p1[2:(M + 1)] - p1[1:M]
+
+    ## FFT
+    pn <- c(p1, numeric((n-1)*M))
+
+    ## convolution theorem for DFTs
+    pn <- Re(fft(fft(pn)^n, inverse = TRUE)) / (n*M)
+    pn <- (abs(pn) >= .Machine$double.eps)*pn
+    i.max <- n*M-(n-2)
+    pn <- c(0,pn[1:i.max])
+    pn <- cumsum(pn)
+
+    ## cdf with continuity correction h/2
+    x <- c(n*A,seq(from = n*A+n/2*h, to = n*B-n/2*h, by=h),n*B)
+    pnfun1 <- approxfun(x = x+0.5*h, y = pn, yleft = 0, yright = pn[i.max+1])
+    pnfun2 <- function(x) pnfun1(x) / pn[i.max+1]
+
+    return(pnfun2(z))
+}
+
+
+setMethod("getFiRisk", signature(risk = "fiUnOvShoot",
+                                 Distr = "Norm",
+                                 neighbor = "ContNeighborhood"),
+    function(risk, Distr, neighbor, clip, stand, sampleSize, Algo, cont){
+        eps <- neighbor at radius
+        tau <- risk at width
+        n <- sampleSize
+        m <- getdistrOption("DefaultNrFFTGridPointsExponent")
+        
+        if(Algo == "B"){
+            if(cont == "left"){
+                delta1 <- (1-eps)*(pnorm(-clip+tau) + pnorm(-clip-tau)) + eps
+                K1 <- dbinom(0:n, size = n, prob = delta1)
+                P1 <- (1-eps)*pnorm(-clip-tau) + eps
+                p1 <- P1/delta1
+
+                summe1 <- numeric(n+1)
+                summe1[1] <- 1 - conv.tnorm(z = 0, A = -clip, B = clip, mu = -tau, n = n, m = m)
+                summe1[n+1] <- (1 - 0.5*(pbinom(q = n/2, size = n, prob = p1) 
+                                + pbinom(q = n/2-0.1, size = n, prob = p1)))
+                for(k in 1:(n-1)){
+                    j <- 0:k
+                    z <- clip*(k-2*j)
+                    P1.ste <- sapply(z, conv.tnorm, A = -clip, B = clip, mu = -tau, n = n-k, m = m)
+                    summe1[k+1] <- sum((1-P1.ste)*dbinom(j, size = k, prob = p1))
+                }
+                erg <- sum(summe1*K1)
+            }else{
+                delta2 <- (1-eps)*(pnorm(-clip+tau) + pnorm(-clip-tau)) + eps
+                K2 <- dbinom(0:n, size = n, prob = delta2)
+                P2 <- (1-eps)*pnorm(-clip+tau)
+                p2 <- P2/delta2
+
+                summe2 <- numeric(n+1)
+                summe2[1] <- conv.tnorm(z = 0, A = -clip, B = clip, mu = tau, n = n, m = m)
+                summe2[n+1] <- 0.5*(pbinom(q = n/2, size = n, prob = p2) 
+                                    + pbinom(q = n/2-0.1, size = n, prob = p2))
+                for(k in 1:(n-1)){
+                    j <- 0:k
+                    z <- clip*(k-2*j)
+                    P2.ste <- sapply(z, conv.tnorm, A = -clip, B = clip, mu = tau, n = n-k, m = m)
+                    summe2[k+1] <- sum(P2.ste*dbinom(j, size=k, prob=p2))
+               }
+                erg <- sum(summe2*K2)
+            }
+        }else{
+            M <- 2^m
+            h <- 2*clip/M
+            x <- seq(from = -clip, to = clip, by = h)
+
+            if(cont == "right"){
+                p1 <- pnorm(x+tau)
+                p1 <- (1-eps)*(p1[2:(M + 1)] - p1[1:M])
+                p1[1] <- p1[1] + (1-eps)*pnorm(-clip+tau)
+                p1[M] <- p1[M] + (1-eps)*pnorm(-clip-tau) + eps
+            }else{
+                p1 <- pnorm(x-tau)
+                p1 <- (1-eps)*(p1[2:(M + 1)] - p1[1:M])
+                p1[1] <- p1[1] + (1-eps)*pnorm(-clip-tau) + eps
+                p1[M] <- p1[M] + (1-eps)*pnorm(-clip+tau)
+            }
+        
+            ## FFT
+            pn <- c(p1, numeric((n-1)*M))
+
+            ## convolution theorem for DFTs
+            pn <- Re(fft(fft(pn)^n, inverse = TRUE)) / (n*M)
+            pn <- (abs(pn) >= .Machine$double.eps)*pn
+            pn <- cumsum(pn)
+
+            k <- n*(M-1)/2
+            erg <- ifelse(n%%2 == 0, (pn[k]+pn[k+1])/2, pn[k+1])
+            if(cont == "right") erg <- 1 - erg
+        }
+
+        return(list(fiUnOvShoot = erg))
+    })
+
+setMethod("getFiRisk", signature(risk = "fiUnOvShoot",
+                                 Distr = "Norm",
+                                 neighbor = "TotalVarNeighborhood"),
+    function(risk, Distr, neighbor, clip, stand, sampleSize, Algo, cont){
+        delta <- neighbor at radius
+        tau <- risk at width
+        n <- sampleSize
+        m <- getdistrOption("DefaultNrFFTGridPointsExponent")
+
+        if(Algo == "B"){
+            if(cont == "left"){
+                delta1 <- min(pnorm(-clip-tau)+delta, 1) + 1 - min(pnorm(clip-tau)+delta, 1)
+                K1 <- dbinom(0:n, size = n, prob = delta1)
+                P1 <- min(pnorm(-clip-tau) + delta, 1)
+                p1 <- min(P1/delta1, 1)
+
+                summe1 <- numeric(n+1)
+                summe1[1] <- 1 - conv.tnorm(z = 0, A = -clip, B = clip, mu = -tau, n = n, m = m)
+                for(k in 1:(n-1)){
+                    j <- 0:k
+                    z <- clip*(k-2*j)
+                    P1.ste <- sapply(z, conv.tnorm, A = -clip, B = clip, mu = -tau, n = n-k, m = m)
+                    summe1[k+1] <- sum((1-P1.ste)*dbinom(j, size = k, prob = p1))
+                }
+                summe1[n+1] <- 1 - 0.5*(pbinom(q = n/2, size = n, prob = p1)
+                                        + pbinom(q = n/2-0.1, size = n, prob = p1))
+                erg <- sum(summe1*K1)
+            }else{
+                delta2 <- max(0, pnorm(-clip+tau)-delta) + 1 - max(0, pnorm(clip+tau)-delta)
+                K2 <- dbinom(0:n, size = n, prob = delta2)
+                P2 <- max(0, pnorm(-clip+tau) - delta)
+                p2 <- P2/delta2
+
+                summe2 <- numeric(n+1)
+                summe2[1] <- conv.tnorm(z = 0, A = -clip, B = clip, mu = tau, n = n, m = m)
+                for(k in 1:(n-1)){
+                    j <- 0:k
+                    z <- clip*(k-2*j)
+                    P2.ste <- sapply(z, conv.tnorm, A = -clip, B = clip, mu = tau, n = n-k, m = m)
+                    summe2[k+1] <- sum(P2.ste*dbinom(j, size = k, prob = p2))
+                }
+                summe2[n+1] <- 0.5*(pbinom(q = n/2, size = n, prob = p2) 
+                                    + pbinom(q = n/2-0.1, size = n, prob = p2))
+                erg <- sum(summe2*K2)
+            }
+        }else{
+            M <- 2^m
+            h <- 2*clip/M
+            x <- seq(from = -clip, to = clip, by = h)
+
+            if(cont == "right"){
+                p1 <- pnorm(x+tau)
+                p1 <- p1[2:(M + 1)] - p1[1:M]
+                p1[1] <- p1[1] + pnorm(-clip+tau) - delta
+                p1[M] <- p1[M] + pnorm(-clip-tau) + delta
+            }else{
+                p1 <- pnorm(x-tau)
+                p1 <- p1[2:(M + 1)] - p1[1:M]
+                p1[1] <- p1[1] + pnorm(-clip-tau) + delta
+                p1[M] <- p1[M] + pnorm(-clip+tau) - delta
+            }
+
+            ## FFT
+            pn <- c(p1, numeric((n-1)*M))
+
+            ## convolution theorem for DFTs
+            pn <- Re(fft(fft(pn)^n, inverse = TRUE)) / (n*M)
+            pn <- (abs(pn) >= .Machine$double.eps)*pn
+            pn <- cumsum(pn)
+    
+            k <- n*(M-1)/2
+            erg <- ifelse(n%%2 == 0, (pn[k]+pn[k+1])/2, pn[k+1])
+            if(cont == "right") erg <- 1-erg
+        }
+
+        return(list(fiUnOvShoot = erg))
+    })

Modified: pkg/RobAStBase/R/infoPlot.R
===================================================================
--- pkg/RobAStBase/R/infoPlot.R	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/R/infoPlot.R	2016-09-01 15:48:08 UTC (rev 887)
@@ -129,9 +129,9 @@
                    if(is(distr, "DiscreteDistribution"))
                       x.vec <- intersect(x.vec,support(distr))
                 }else{
-                   if(is(e1, "DiscreteDistribution")) x.vec <- support(distr)
+                   if(is(distr, "DiscreteDistribution")) x.vec <- support(distr)
                    else{
-                      x.vec <- r(e1)(1000)
+                      x.vec <- r(distr)(1000)
                       x.vec <- sort(unique(x.vec))
                    }
                 }
@@ -587,8 +587,8 @@
                       finiteEndpoints[2] <- is.finite(scaleX.inv(max(resc$X, xlim[2],na.rm=TRUE)))
                     }
                     if(scaleY){
-                       finiteEndpoints[3] <- is.finite(scaleY.inv[[i+in1to.draw]](min(yvec1, ylim[1,i+in1to.draw],na.rm=TRUE)))
-                       finiteEndpoints[4] <- is.finite(scaleY.inv[[i+in1to.draw]](max(yvec1, ylim[2,i+in1to.draw],na.rm=TRUE)))
+                       finiteEndpoints[3] <- is.finite(scaleY.inv[[i+in1to.draw]](min(y.vec1, ylim[1,i+in1to.draw],na.rm=TRUE)))
+                       finiteEndpoints[4] <- is.finite(scaleY.inv[[i+in1to.draw]](max(y.vec1, ylim[2,i+in1to.draw],na.rm=TRUE)))
                     }
 
                     .plotRescaledAxis(scaleX0, scaleX.fct, scaleX.inv,

Modified: pkg/RobAStBase/R/interpolRisks.R
===================================================================
--- pkg/RobAStBase/R/interpolRisks.R	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/R/interpolRisks.R	2016-09-01 15:48:08 UTC (rev 887)
@@ -5,3 +5,5 @@
 setMethod("samplesize","interpolRisk", function(object)object at samplesize)
 setReplaceMethod("samplesize","interpolRisk", function(object, value){
        object at samplesize <- value; object})
+setMethod("biastype","interpolRisk", function(object) symmetricBias())
+setMethod("normtype","interpolRisk", function(object) NormType())

Added: pkg/RobAStBase/R/plotUtils.R
===================================================================
--- pkg/RobAStBase/R/plotUtils.R	                        (rev 0)
+++ pkg/RobAStBase/R/plotUtils.R	2016-09-01 15:48:08 UTC (rev 887)
@@ -0,0 +1,10 @@
+ .cexscale <- function(y, y1=y, maxcex=4,mincex=0.05,cex, fun=NULL){
+         if(is.null(fun)) fun <- function(x) log(1+abs(x))
+         ly <- fun(y)
+         ly1 <- fun(unique(c(y,y1)))
+         my <- min(ly1,na.rm=TRUE)
+         My <- max(ly1,na.rm=TRUE)
+         ly0 <- (ly-my)/My
+         ly1 <- ly0*(maxcex-mincex)+mincex
+         return(cex*ly1)
+ }

Modified: pkg/RobAStBase/man/0RobAStBase-package.Rd
===================================================================
--- pkg/RobAStBase/man/0RobAStBase-package.Rd	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/man/0RobAStBase-package.Rd	2016-09-01 15:48:08 UTC (rev 887)
@@ -12,14 +12,15 @@
 \tabular{ll}{
 Package: \tab RobAStBase \cr
 Version: \tab 1.0 \cr
-Date: \tab 2015-05-03 \cr
-Depends: \tab R(>= 2.14.0), methods, rrcov, distr(>= 2.5.2), distrEx(>= 2.5), distrMod(>= 2.5.2), RandVar(>= 0.9.2)\cr
+Date: \tab 2016-09-01 \cr
+Depends: \tab R(>= 2.14.0), methods, rrcov, distr(>= 2.5.2), distrEx(>= 2.5), distrMod(>= 2.5.2),
+RandVar(>= 0.9.2) \cr
 Suggests: \tab ROptEst, RUnit (>= 0.4.26)\cr
 Imports: \tab startupmsg\cr
 ByteCompile: \tab yes \cr
 License: \tab LGPL-3 \cr
 URL: \tab http://robast.r-forge.r-project.org/\cr
-SVNRevision: \tab 694 \cr
+SVNRevision: \tab 874 \cr
 }
 }
 \author{

Modified: pkg/RobAStBase/man/comparePlot.Rd
===================================================================
--- pkg/RobAStBase/man/comparePlot.Rd	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/man/comparePlot.Rd	2016-09-01 15:48:08 UTC (rev 887)
@@ -10,28 +10,25 @@
 }
 \usage{
 comparePlot(obj1, obj2, ... )
-\S4method{comparePlot}{IC,IC}(obj1, obj2, obj3 = NULL, obj4 = NULL, 
-             data = NULL, ..., withSweave = getdistrOption("withSweave"),
-             forceSameModel = FALSE,
-             main = FALSE, inner = TRUE, sub = FALSE, 
-             col = par("col"), lwd = par("lwd"), lty, 
-             col.inner = par("col.main"), cex.inner = 0.8, 
-             bmar = par("mar")[1], tmar = par("mar")[3],
-             with.automatic.grid = TRUE,
-             with.legend = FALSE, legend = NULL, legend.bg = "white",
-             legend.location = "bottomright", legend.cex = 0.8,
-             withMBR = FALSE, MBRB = NA, MBR.fac = 2, col.MBR = par("col"),
-             lty.MBR = "dashed", lwd.MBR = 0.8,
-             x.vec = NULL, scaleX = FALSE, scaleX.fct, scaleX.inv,
-             scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv=qnorm,
-             scaleN = 9, x.ticks = NULL, y.ticks = NULL,
-             mfColRow = TRUE, to.draw.arg = NULL,
-             cex.pts = 1, cex.pts.fun = NULL, col.pts = par("col"),
-             pch.pts = 1, jit.fac = 1, jit.tol = .Machine$double.eps, with.lab = FALSE,
-             lab.pts = NULL, lab.font = NULL, alpha.trsp = NA,
-             which.lbs = NULL, which.Order  = NULL, return.Order = FALSE,
-             draw.nonlbl = TRUE, cex.nonlbl=0.3, pch.nonlbl=".",
-             withSubst = TRUE)
+\S4method{comparePlot}{IC,IC}(obj1, obj2, obj3 = NULL, obj4 = NULL, data = NULL,
+                 ..., withSweave = getdistrOption("withSweave"),
+                 forceSameModel = FALSE, main = FALSE, inner = TRUE,
+                 sub = FALSE, col = par("col"), lwd = par("lwd"), lty,
+                 col.inner = par("col.main"), cex.inner = 0.8, bmar =
+                 par("mar")[1], tmar = par("mar")[3],
+                 with.automatic.grid = TRUE, with.legend = FALSE,
+                 legend = NULL, legend.bg = "white", legend.location =
+                 "bottomright", legend.cex = 0.8, withMBR = FALSE, MBRB
+                 = NA, MBR.fac = 2, col.MBR = par("col"), lty.MBR =
+                 "dashed", lwd.MBR = 0.8, x.vec = NULL, scaleX = FALSE,
+                 scaleX.fct, scaleX.inv, scaleY = FALSE, scaleY.fct =
+                 pnorm, scaleY.inv = qnorm, scaleN = 9, x.ticks = NULL,
+                 y.ticks = NULL, mfColRow = TRUE, to.draw.arg = NULL,
+                 cex.pts = 1, cex.pts.fun = NULL, col.pts = par("col"),
+                 pch.pts = 1, jitter.fac = 1, with.lab = FALSE, lab.pts
+                 = NULL, lab.font = NULL, alpha.trsp = NA, which.lbs =
+                 NULL, which.Order = NULL, return.Order = FALSE,
+                 withSubst = TRUE)
 }
 \arguments{
   \item{obj1}{ object of class \code{"InfluenceCurve"} }
@@ -138,21 +135,37 @@
                          }
   \item{withSubst}{logical; if \code{TRUE} (default) pattern substitution for
         titles and lables is used; otherwise no substitution is used. }
-  \item{cex.pts}{size of the points of the \code{data} argument plotted}
+  \item{col.pts}{color of the points of the \code{data} argument plotted; (may 
+     be a vector of length \code{nIC}, \code{nIC} the number of plotted pICs, 
+     i.e., one value for each pIC in arguments \code{obj1}, \code{obj2}, and, 
+     if available, \code{obj3} and \code{obj4}, or it can be a matrix 
+     \code{n} by \code{nIC}, \code{n} the number of observations prior to any 
+     selection, in which case it assigns observation-specific colors to the 
+     observations; in this case this  overrides settings in the respective 
+     \code{col.nonlbl} argument.}
+  \item{pch.pts}{symbol of the points of the \code{data} argument plotted
+                 (may be a vector of length \code{nIC} or a matrix, see \code{col.pts}).}
+  \item{cex.pts}{size of the points of the \code{data} argument plotted
+                 (may be a vector of length \code{nIC} or a matrix, see \code{col.pts}).}
   \item{cex.pts.fun}{rescaling function for the size of the points to be plotted;
         either \code{NULL} (default), then \code{log(1+abs(x))} is used for each of
         the rescalings, or a function which is then used for each of the
         rescalings, or a list of functions; if it is a function or a list of
         functions, if necessary it is recylced to length \code{nIC * dim}
-        where \code{nIC} is the number of pICs and \code{dim} is the number of
-        dimensions of the pICs to be plotted; in the index of this list,
-        \code{nIC} is incremented first; then \code{dim}.}
-  \item{col.pts}{color of the points of the \code{data} argument plotted}
-  \item{pch.pts}{symbol of the points of the \code{data} argument plotted}
-  \item{with.lab}{logical; shall labels be plotted to the observations?}
-  \item{lab.pts}{character or NULL; labels to be plotted to the observations; if \code{NULL}
-                 observation indices;}
-  \item{lab.font}{font to be used for labels}
+        where \code{dim} is the number of dimensions of the pICs to be plotted; 
+        in the index of this list, \code{nIC} is incremented first; 
+        then \code{dim}.}
+
+  \item{with.lab}{logical; shall labels be plotted to the observations?
+                 (May be a vector of length \code{nIC}, see \code{col.pts}
+                 -- but not a matrix).}
+  \item{lab.pts}{character or NULL; labels to be plotted to the observations; 
+                 can be a vector of length \code{n}, \code{n} the number of 
+                 all observations prior to any selection with \code{which.lbs},
+                 \code{which.Order}; if \code{lab.pts} is \code{NULL}, 
+                 observation indices are used.}
+  \item{lab.font}{font to be used for labels (may be a vector of length 
+                  \code{nIC}, see \code{with.lab}).}
   \item{alpha.trsp}{alpha transparency to be added ex post to colors
         \code{col.pch} and \code{col.lbl}; if one-dim and NA all colors are
         left unchanged. Otherwise, with usual recycling rules \code{alpha.trsp}
@@ -161,12 +174,11 @@
         while for the remaining ones, the alpha channel in rgb space is set
         to the respective coordinate value of \code{alpha.trsp}. The non-NA
         entries must be integers in [0,255] (0 invisible, 255 opaque).}
-  \item{jit.fac}{jittering factor used in case of a \code{DiscreteDistribution}
-                    for plotting points of the \code{data} argument in a jittered fashion.}
-  \item{jit.tol}{threshold for jittering: if distance between points is smaller
-               than \code{jit.tol}, points are considered replicates.}
+  \item{jitter.fac}{jittering factor used in case of a \code{DiscreteDistribution}
+                    for plotting points of the \code{data} argument in a jittered 
+                    fashion (may be a vector of length 2, see \code{with.lab}).}
   \item{which.lbs}{either an integer vector with the indices of the observations
-          to be plotted into graph or \code{NULL} --- then no observation is excluded}
+          to be plotted into graph or \code{NULL} --- then no observation is excluded.}
   \item{which.Order}{for each of the given ICs, we order the observations (descending)
            according to the norm given by the corresponding \code{normtype(object)};
            then \code{which.Order} either is an integer vector with the indices of the \emph{ordered}
@@ -180,11 +192,14 @@
     reduction by argument \code{which.lbs}, and ordering is according to the norm given by
            \code{normtype(object)});
    othervise we return \code{invisible()} as usual.}
-  \item{draw.nonlbl}{logical; should non-labelled observations be drawn?}
-  \item{cex.nonlbl}{character expansion(s) for non-labelled observations}
-  \item{pch.nonlbl}{plotting symbol(s) for non-labelled observations}
   \item{\dots}{further arguments to be passed to \code{plot}}
 }
+\value{
+  The function returns invisibly a list of elements containing the information 
+  needed to compute the respective diagnostic plot.
+   The return value allows to recover all information used to produce the plot
+   for later use in enhanced graphics (e.g. with ggplot).   
+}
 \details{
 Any parameters of \code{plot.default} may be passed on to this particular
 \code{plot} method. 

Modified: pkg/RobAStBase/man/getRiskFctBV-methods.Rd
===================================================================
--- pkg/RobAStBase/man/getRiskFctBV-methods.Rd	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/man/getRiskFctBV-methods.Rd	2016-09-01 15:48:08 UTC (rev 887)
@@ -4,6 +4,7 @@
 \alias{getRiskFctBV-methods}
 \alias{getRiskFctBV,asGRisk,ANY-method}
 \alias{getRiskFctBV,asMSE,ANY-method}
+\alias{getRiskFctBV,interpolRisk,ANY-method}
 \alias{getRiskFctBV,asSemivar,onesidedBias-method}
 \alias{getRiskFctBV,asSemivar,asymmetricBias-method}
 \title{Methods for Function getRiskFctBV  in Package `RobAStBase'}

Modified: pkg/RobAStBase/man/infoPlot.Rd
===================================================================
--- pkg/RobAStBase/man/infoPlot.Rd	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/man/infoPlot.Rd	2016-09-01 15:48:08 UTC (rev 887)
@@ -9,28 +9,20 @@
 }
 \usage{
 infoPlot(object,  ...)
-\S4method{infoPlot}{IC}(object, data = NULL, ...,
-             withSweave = getdistrOption("withSweave"),
-             col = par("col"), lwd = par("lwd"), lty, 
-             colI = grey(0.5), lwdI = 0.7*par("lwd"), ltyI = "dotted",
-             main = FALSE, inner = TRUE, sub = FALSE, 
-             col.inner = par("col.main"), cex.inner = 0.8, 
-             bmar = par("mar")[1], tmar = par("mar")[3],
-             with.automatic.grid = TRUE,
-             with.legend = TRUE, legend = NULL, legend.bg = "white",
-             legend.location = "bottomright", legend.cex = 0.8,
-             x.vec = NULL, scaleX = FALSE, scaleX.fct, scaleX.inv,
-             scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv=qnorm,
-             scaleN = 9, x.ticks = NULL, y.ticks = NULL,
-             mfColRow = TRUE, to.draw.arg = NULL,
-             cex.pts = 1, cex.pts.fun = NULL, col.pts = par("col"),
-             pch.pts = 1, jit.fac = 1, jit.tol = .Machine$double.eps, with.lab = FALSE,
-             lab.pts = NULL, lab.font = NULL, alpha.trsp = NA,
-             which.lbs = NULL, which.Order  = NULL, return.Order = FALSE,
-             draw.nonlbl = TRUE, cex.nonlbl=0.3, pch.nonlbl=".",
-             ylab.abs = "absolute information", 
-             ylab.rel= "relative information",
-             withSubst = TRUE)
+\S4method{infoPlot}{IC}(object, data = NULL, ..., 
+withSweave = getdistrOption("withSweave"), col = par("col"), lwd = par("lwd"), 
+lty, colI = grey(0.5), lwdI = 0.7 * par("lwd"), ltyI = "dotted", main = FALSE, 
+inner = TRUE, sub = FALSE, col.inner = par("col.main"), cex.inner = 0.8, 
+bmar = par("mar")[1], tmar = par("mar")[3], with.automatic.grid = TRUE, 
+with.legend = TRUE, legend = NULL, legend.bg = "white",
+ legend.location = "bottomright", legend.cex = 0.8, x.vec = NULL, 
+ scaleX = FALSE, scaleX.fct, scaleX.inv,scaleY = FALSE, scaleY.fct = pnorm, 
+ scaleY.inv = qnorm, scaleN = 9, x.ticks = NULL, y.ticks = NULL,
+ mfColRow = TRUE, to.draw.arg = NULL, cex.pts = 1, cex.pts.fun = NULL, 
+ col.pts = par("col"), pch.pts = 1, jitter.fac = 1, with.lab = FALSE, 
+ lab.pts = NULL, lab.font = NULL, alpha.trsp = NA, which.lbs = NULL,
+ which.Order = NULL, return.Order = FALSE, ylab.abs = "absolute information", 
+ ylab.rel = "relative information", withSubst = TRUE)
 }
 \arguments{
   \item{object}{object of class \code{"InfluenceCurve"} }
@@ -134,7 +126,16 @@
                          }
   \item{withSubst}{logical; if \code{TRUE} (default) pattern substitution for
         titles and lables is used; otherwise no substitution is used. }
-  \item{cex.pts}{size of the points of the \code{data} argument plotted}
+  \item{col.pts}{color of the points of the \code{data} argument plotted; (may 
+     be a vector of length 2, one value for the classical IC, one for the IC
+     in argument \code{object}, or it can be a matrix \code{n} by 2, \code{n} the  
+     number of observations prior to any selection, in which case it assigns 
+     observation-specific colors to the observations; in this case this 
+     overrides settings in the respective \code{col.nonlbl} argument.}
+  \item{pch.pts}{symbol of the points of the \code{data} argument plotted
+                 (may be a vector of length 2 or a matrix, see \code{col.pts}).}
+  \item{cex.pts}{size of the points of the \code{data} argument plotted
+                 (may be a vector of length 2 or a matrix, see \code{col.pts}).}
   \item{cex.pts.fun}{rescaling function for the size of the points to be plotted;
         either \code{NULL} (default), then \code{log(1+abs(x))} is used for each of
         the rescalings, or a function which is then used for each of the
@@ -145,24 +146,27 @@
         dimensions of the pICs to be plotted; in the index of this list,
         the index for classical vs. \code{IC} is incremented first;
         then \code{dim}.}
-  \item{col.pts}{color of the points of the \code{data} argument plotted}
-  \item{pch.pts}{symbol of the points of the \code{data} argument plotted}
-  \item{with.lab}{logical; shall labels be plotted to the observations?}
-  \item{lab.pts}{character or NULL; labels to be plotted to the observations; if \code{NULL}
-                 observation indices;}
-  \item{lab.font}{font to be used for labels}
+  \item{with.lab}{logical; shall labels be plotted to the observations?
+                  (may be a vector of length 2, see \code{col.pts} -- 
+                   but not a matrix)}
+  \item{lab.pts}{character or NULL; labels to be plotted to the observations; 
+                 can be a vector of length \code{n}, \code{n} the number of 
+                 all observations prior to any selection with \code{which.lbs},
+                 \code{which.Order}; if \code{lab.pts} is \code{NULL}, 
+                 observation indices are used.}
+  \item{lab.font}{font to be used for labels; (may be a vector of length 2, 
+                  see \code{with.lab}).}
   \item{alpha.trsp}{alpha transparency to be added ex post to colors
-        \code{col.pch} and \code{col.lbl}; if one-dim and NA all colors are
+        \code{col.pch} and \code{col.nonlbl}; if one-dim and NA all colors are
         left unchanged. Otherwise, with usual recycling rules \code{alpha.trsp}
-        gets shorted/prolongated to length the data-symbols to be plotted.
-        Coordinates of this vector \code{alpha.trsp} with NA are left unchanged,
+        gets shorted/prolongated to length the number of panel data-symbols to 
+        be plotted. Coordinates of this vector \code{alpha.trsp} with NA are left unchanged,
         while for the remaining ones, the alpha channel in rgb space is set
         to the respective coordinate value of \code{alpha.trsp}. The non-NA
         entries must be integers in [0,255] (0 invisible, 255 opaque).}
-  \item{jit.fac}{jittering factor used in case of a \code{DiscreteDistribution}
-                    for plotting points of the \code{data} argument in a jittered fashion.}
-  \item{jit.tol}{threshold for jittering: if distance between points is smaller
-               than \code{jit.tol}, points are considered replicates.}
+  \item{jitter.fac}{jittering factor used in case of a \code{DiscreteDistribution}
+                    for plotting points of the \code{data} argument in a jittered fashion
+                  (may be a vector of length 2, see \code{with.lab}).}
   \item{which.lbs}{either an integer vector with the indices of the observations
           to be plotted into graph or \code{NULL} --- then no observation is excluded}
   \item{which.Order}{we order the observations (descending) according to the norm given by
@@ -178,13 +182,16 @@
     reduction by argument \code{which.lbs}, and ordering is according to the norm given by
            \code{normtype(object)});
    otherwise we return \code{invisible()} as usual.}
-  \item{draw.nonlbl}{logical; should non-labelled observations be drawn?}
-  \item{cex.nonlbl}{character expansion(s) for non-labelled observations}
-  \item{pch.nonlbl}{plotting symbol(s) for non-labelled observations}
   \item{ylab.abs}{character; label to be used for y-axis in absolute information panel} 
   \item{ylab.rel}{character; label to be used for y-axis in relative information panel} 
   \item{\dots}{further parameters for \code{plot}}
 }
+\value{
+  The function returns invisibly a list of elements containing the information 
+  needed to compute the respective diagnostic plot.
+   The return value allows to recover all information used to produce the plot
+   for later use in enhanced graphics (e.g. with ggplot).   
+}
 \details{
   Absolute information is defined as the square of the length
   of an IC. The relative information is defined as the 

Modified: pkg/RobAStBase/man/internals_ddPlot.Rd
===================================================================
--- pkg/RobAStBase/man/internals_ddPlot.Rd	2016-09-01 14:13:04 UTC (rev 886)
+++ pkg/RobAStBase/man/internals_ddPlot.Rd	2016-09-01 15:48:08 UTC (rev 887)
@@ -8,22 +8,19 @@
 This function is an internally used helper function for \code{\link{ddPlot}} in package \pkg{RobAStBase}.}
 
 \usage{
-.ddPlot.MatNtNtCoCo(data, ...,  dist.x = NormType(), dist.y  = NormType(),
-       cutoff.x = cutoff(norm = dist.x, cutoff.quantile  = cutoff.quantile.x),
-       cutoff.y = cutoff(norm = dist.y, cutoff.quantile  = cutoff.quantile.y),
-       cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
-       transform.x, transform.y = transform.x,
-       id.n, cex.pts = 1,lab.pts, jit.pts = 0, alpha.trsp = NA, adj =0, cex.idn,
-       col.idn, lty.cutoff,
-       lwd.cutoff, col.cutoff = "red", text.abline = TRUE,
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/robast -r 887


More information about the Robast-commits mailing list