[Robast-commits] r380 - in branches/robast-0.7/pkg: ROptEst/man RobAStBase/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 6 02:22:39 CEST 2009


Author: ruckdeschel
Date: 2009-10-06 02:22:39 +0200 (Tue, 06 Oct 2009)
New Revision: 380

Modified:
   branches/robast-0.7/pkg/ROptEst/man/roptest.Rd
   branches/robast-0.7/pkg/RobAStBase/R/qqplot.R
Log:
+RobAStBase: fixed an error in qqplot - method -- w.fct was not vectorized
+ROptEst: integrated QQ plots for example roptest 


Modified: branches/robast-0.7/pkg/ROptEst/man/roptest.Rd
===================================================================
--- branches/robast-0.7/pkg/ROptEst/man/roptest.Rd	2009-10-05 22:03:59 UTC (rev 379)
+++ branches/robast-0.7/pkg/ROptEst/man/roptest.Rd	2009-10-06 00:22:39 UTC (rev 380)
@@ -161,6 +161,8 @@
 ## neglecting bias
 confint(robest1)
 plot(pIC(robest1))
+qqplot(x, robest1, cex.pch=1.5, exp.cex2.pch = -.25,
+       exp.fadcol.pch = .55, jit.fac=.9)
 
 ## compute optimally robust estimator (unknown contamination)
 robest2 <- roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.2, steps = 3)
@@ -201,7 +203,9 @@
 estimate(robest)
 confint(robest, symmetricBias())
 plot(pIC(robest))
-
+qqplot(x, robest, cex.pch=1.5, exp.cex2.pch = -.25,
+       exp.fadcol.pch = .55, jit.fac=.9)
+ 
 ## total variation neighborhoods (unknown deviation)
 robest1 <- roptest(x, PoisFamily(), eps.upper = 0.05, 
                   neighbor = TotalVarNeighborhood(), steps = 3)
@@ -233,6 +237,12 @@
 ## plot of relative and absolute information; cf. Kohl (2005)
 infoPlot(pIC(robest))
 
+qqplot(chem, robest, cex.pch=1.5, exp.cex2.pch = -.25,
+       exp.fadcol.pch = .55, withLab = TRUE, which.Order=1:4,
+       exp.cex2.lbl = .12,exp.fadcol.lbl = .45,
+       nosym.pCI = TRUE, adj.lbl=c(1.7,.2),
+       exact.pCI = FALSE)
+
 ## finite-sample correction
 if(require(RobLox)){
     n <- length(chem)

Modified: branches/robast-0.7/pkg/RobAStBase/R/qqplot.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/qqplot.R	2009-10-05 22:03:59 UTC (rev 379)
+++ branches/robast-0.7/pkg/RobAStBase/R/qqplot.R	2009-10-06 00:22:39 UTC (rev 380)
@@ -95,8 +95,8 @@
     mcl$y <- L2Fam
 
     if(is(IC,"HampIC")){
-      w.fct <- weight(weight(IC))
-      wx <- sapply(x,w.fct)
+      w.fct <- function(x) sapply(x, weight(weight(IC)))
+      wx <- w.fct(x)
       mcl$order.traf <- function(x) 1/w.fct(x)
 
       cex.lbl <- if(is.null(mcl$cex.lbl))  par("cex")  else eval(mcl$cex.lbl)



More information about the Robast-commits mailing list