[Robast-commits] r431 - in branches/robast-0.8/pkg/RobAStBase: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 24 15:15:51 CET 2010


Author: ruckdeschel
Date: 2010-11-24 15:15:50 +0100 (Wed, 24 Nov 2010)
New Revision: 431

Modified:
   branches/robast-0.8/pkg/RobAStBase/R/qqplot.R
   branches/robast-0.8/pkg/RobAStBase/man/qqplot.Rd
Log:
[RobAStBase] qqplot for RobModel now produces outlier adjusted CIs

Modified: branches/robast-0.8/pkg/RobAStBase/R/qqplot.R
===================================================================
--- branches/robast-0.8/pkg/RobAStBase/R/qqplot.R	2010-10-20 13:04:32 UTC (rev 430)
+++ branches/robast-0.8/pkg/RobAStBase/R/qqplot.R	2010-11-24 14:15:50 UTC (rev 431)
@@ -33,9 +33,18 @@
        r <- radius(neighbor(y))
        n <- floor((1-r)*n)
     }
+    if(is.null(mcl$alpha.CI))
+       mcl$alpha.CI <- .95
+    cor <- radius(neighbor(y))
+    mcl$legend.alpha <- eval(mcl$alpha.CI)
+    mcl$alpha.CI <- min(eval(mcl$alpha.CI)+cor,1)
+
+
     mcl$n <- n
     mcl$y <- y at center
+    mcl$legend.pref <- paste(mcl$legend.pref,"outlier-adjusted",sep="")
 
+
     xD <- fct(distance)(x)
     x.cex <- 3/(1+log(1+xD))
     mcl$cex.pch <- x.cex
@@ -58,6 +67,14 @@
     mcl <- as.list(mc)[-1]
     if(is.null(mcl$distance)) distance <- NormType()
 
+    if(is.null(mcl$alpha.CI))
+       mcl$alpha.CI <- .95
+    cor <- radius(neighbor(y))/sqrt(n)
+    mcl$legend.alpha <- eval(mcl$alpha.CI)
+    mcl$alpha.CI <- min(eval(mcl$alpha.CI)+cor,1)
+
+
+
     if(is.null(mcl$n.CI)) mcl$n.CI <- n
     if(n.adj){
        r <- radius(neighbor(y))
@@ -65,7 +82,8 @@
     }
     mcl$n <- n
     mcl$y <- y at center
-
+    mcl$legend.pref <- paste(mcl$legend.pref,"outlier-adjusted",sep="")
+    
     FI <- PosSemDefSymmMatrix(FisherInfo(y at center))
     L2D <- as(diag(nrow(FI)) %*% L2deriv(y at center), "EuclRandVariable")
     L2Dx <- evalRandVar(L2D,matrix(x))[,,1]

Modified: branches/robast-0.8/pkg/RobAStBase/man/qqplot.Rd
===================================================================
--- branches/robast-0.8/pkg/RobAStBase/man/qqplot.Rd	2010-10-20 13:04:32 UTC (rev 430)
+++ branches/robast-0.8/pkg/RobAStBase/man/qqplot.Rd	2010-11-24 14:15:50 UTC (rev 431)
@@ -128,6 +128,7 @@
                     neighbor = ContNeighborhood(radius = 0.4))
 x <- r(Norm(15,sqrt(30)))(20)
 qqplot(x, RobM)
+qqplot(x, RobM, alpha.CI=0.9)
 ## further examples for ANY,kStepEstimator-method
 ## in example to roptest() in package ROptEst
 }



More information about the Robast-commits mailing list