[Robast-commits] r218 - in branches/robast-0.7/pkg: ROptEst ROptEst/R ROptEst/chm ROptEst/inst/scripts ROptEst/man ROptRegTS ROptRegTS/R RandVar RandVar/R RandVar/chm RandVar/inst/doc RandVar/man RobAStBase RobAStBase/R RobAStBase/chm RobAStBase/man RobLox RobLox/R RobLox/chm RobRex RobRex/inst/scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 25 11:41:15 CET 2008
Author: ruckdeschel
Date: 2008-11-25 11:41:15 +0100 (Tue, 25 Nov 2008)
New Revision: 218
Added:
branches/robast-0.7/pkg/ROptEst/R/cniperCont.R
branches/robast-0.7/pkg/ROptEst/chm/getModifyIC.html
branches/robast-0.7/pkg/ROptEst/chm/roptest.html
branches/robast-0.7/pkg/ROptEst/man/0ROptEst-package.Rd
branches/robast-0.7/pkg/ROptEst/man/cniperCont.Rd
branches/robast-0.7/pkg/RandVar/man/0RandVar-package.Rd
branches/robast-0.7/pkg/RobAStBase/R/cutoff-class.R
branches/robast-0.7/pkg/RobAStBase/R/ddPlot.R
branches/robast-0.7/pkg/RobAStBase/R/ddPlot_utils.R
branches/robast-0.7/pkg/RobAStBase/R/outlyingPlot.R
branches/robast-0.7/pkg/RobAStBase/chm/0RobAStBase-package.html
branches/robast-0.7/pkg/RobAStBase/chm/ALEstimate-class.html
branches/robast-0.7/pkg/RobAStBase/chm/MEstimate-class.html
branches/robast-0.7/pkg/RobAStBase/chm/RobAStBaseOptions.html
branches/robast-0.7/pkg/RobAStBase/chm/cutoff-class.html
branches/robast-0.7/pkg/RobAStBase/chm/cutoff.html
branches/robast-0.7/pkg/RobAStBase/chm/ddPlot-methods.html
branches/robast-0.7/pkg/RobAStBase/chm/internals_ddPlot.html
branches/robast-0.7/pkg/RobAStBase/chm/kStepEstimate-class.html
branches/robast-0.7/pkg/RobAStBase/chm/kStepEstimator.html
branches/robast-0.7/pkg/RobAStBase/chm/outlyingPlotIC.html
branches/robast-0.7/pkg/RobAStBase/chm/plot-methods.html
branches/robast-0.7/pkg/RobAStBase/man/0RobAStBase-package.Rd
branches/robast-0.7/pkg/RobAStBase/man/cutoff-class.Rd
branches/robast-0.7/pkg/RobAStBase/man/cutoff.Rd
branches/robast-0.7/pkg/RobAStBase/man/ddPlot-methods.Rd
branches/robast-0.7/pkg/RobAStBase/man/internals_ddPlot.Rd
branches/robast-0.7/pkg/RobAStBase/man/outlyingPlotIC.Rd
Modified:
branches/robast-0.7/pkg/ROptEst/DESCRIPTION
branches/robast-0.7/pkg/ROptEst/NAMESPACE
branches/robast-0.7/pkg/ROptEst/R/AllGeneric.R
branches/robast-0.7/pkg/ROptEst/R/getAsRisk.R
branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R
branches/robast-0.7/pkg/ROptEst/R/getModifyIC.R
branches/robast-0.7/pkg/ROptEst/R/getRiskIC.R
branches/robast-0.7/pkg/ROptEst/R/leastFavorableRadius.R
branches/robast-0.7/pkg/ROptEst/R/lowerCaseRadius.R
branches/robast-0.7/pkg/ROptEst/R/optIC.R
branches/robast-0.7/pkg/ROptEst/R/optRisk.R
branches/robast-0.7/pkg/ROptEst/R/radiusMinimaxIC.R
branches/robast-0.7/pkg/ROptEst/R/roptest.R
branches/robast-0.7/pkg/ROptEst/chm/00Index.html
branches/robast-0.7/pkg/ROptEst/chm/ROptEst.chm
branches/robast-0.7/pkg/ROptEst/chm/ROptEst.hhp
branches/robast-0.7/pkg/ROptEst/chm/ROptEst.toc
branches/robast-0.7/pkg/ROptEst/inst/scripts/BinomialModel.R
branches/robast-0.7/pkg/ROptEst/inst/scripts/ExponentialScaleModel.R
branches/robast-0.7/pkg/ROptEst/inst/scripts/GammaModel.R
branches/robast-0.7/pkg/ROptEst/inst/scripts/GumbelLocationModel.R
branches/robast-0.7/pkg/ROptEst/inst/scripts/LognormalAndNormalModel.R
branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalScaleModel.R
branches/robast-0.7/pkg/ROptEst/inst/scripts/PoissonModel.R
branches/robast-0.7/pkg/ROptEst/inst/scripts/UnderOverShootRisk.R
branches/robast-0.7/pkg/ROptEst/man/roptest.Rd
branches/robast-0.7/pkg/ROptRegTS/DESCRIPTION
branches/robast-0.7/pkg/ROptRegTS/R/leastFavorableRadius.R
branches/robast-0.7/pkg/ROptRegTS/R/optIC.R
branches/robast-0.7/pkg/ROptRegTS/R/radiusMinimaxIC.R
branches/robast-0.7/pkg/RandVar/DESCRIPTION
branches/robast-0.7/pkg/RandVar/R/util.R
branches/robast-0.7/pkg/RandVar/chm/00Index.html
branches/robast-0.7/pkg/RandVar/chm/RandVar.chm
branches/robast-0.7/pkg/RandVar/chm/RandVar.hhp
branches/robast-0.7/pkg/RandVar/chm/RandVar.toc
branches/robast-0.7/pkg/RandVar/inst/doc/RandVar.Rnw
branches/robast-0.7/pkg/RandVar/inst/doc/RandVar.pdf
branches/robast-0.7/pkg/RobAStBase/DESCRIPTION
branches/robast-0.7/pkg/RobAStBase/NAMESPACE
branches/robast-0.7/pkg/RobAStBase/R/AllClass.R
branches/robast-0.7/pkg/RobAStBase/R/AllGeneric.R
branches/robast-0.7/pkg/RobAStBase/R/AllPlot.R
branches/robast-0.7/pkg/RobAStBase/R/bALEstimate.R
branches/robast-0.7/pkg/RobAStBase/R/comparePlot.R
branches/robast-0.7/pkg/RobAStBase/R/infoPlot.R
branches/robast-0.7/pkg/RobAStBase/R/kStepEstimator.R
branches/robast-0.7/pkg/RobAStBase/R/oneStepEstimator.R
branches/robast-0.7/pkg/RobAStBase/R/utils.R
branches/robast-0.7/pkg/RobAStBase/chm/00Index.html
branches/robast-0.7/pkg/RobAStBase/chm/IC-class.html
branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.chm
branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.hhp
branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.toc
branches/robast-0.7/pkg/RobAStBase/chm/comparePlot.html
branches/robast-0.7/pkg/RobAStBase/chm/infoPlot.html
branches/robast-0.7/pkg/RobAStBase/man/ALEstimate-class.Rd
branches/robast-0.7/pkg/RobAStBase/man/IC-class.Rd
branches/robast-0.7/pkg/RobLox/DESCRIPTION
branches/robast-0.7/pkg/RobLox/R/rlsOptIC_AL.R
branches/robast-0.7/pkg/RobLox/R/roblox.R
branches/robast-0.7/pkg/RobLox/R/rsOptIC.R
branches/robast-0.7/pkg/RobLox/chm/00Index.html
branches/robast-0.7/pkg/RobLox/chm/RobLox.chm
branches/robast-0.7/pkg/RobRex/DESCRIPTION
branches/robast-0.7/pkg/RobRex/inst/scripts/example.R
Log:
merged trunc into branch robast-0.7
Modified: branches/robast-0.7/pkg/ROptEst/DESCRIPTION
===================================================================
--- branches/robast-0.7/pkg/ROptEst/DESCRIPTION 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/DESCRIPTION 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,11 +1,13 @@
Package: ROptEst
-Version: 0.7.0
-Date: 2008-10-06
+Version: 0.7
+Date: 2008-11-25
Title: Optimally robust estimation
-Description: Optimally robust estimation using S4 classes and methods
-Depends: R(>= 2.4.0), methods, distr(>= 2.0), distrEx(>= 2.0), distrMod(>= 2.0), RandVar(>= 0.6.2), RobAStBase
+Description: Optimally robust estimation in general smoothly
+ parameterized models using S4 classes and methods.
+Depends: R(>= 2.7.0), methods, distr(>= 2.0), distrEx(>= 2.0),
+ distrMod(>= 2.0), RandVar(>= 0.6.4), RobAStBase
Author: Matthias Kohl, Peter Ruckdeschel
Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
LazyLoad: yes
-License: GPL version 2 or later
+License: LGPL-3
URL: http://robast.r-forge.r-project.org/
Modified: branches/robast-0.7/pkg/ROptEst/NAMESPACE
===================================================================
--- branches/robast-0.7/pkg/ROptEst/NAMESPACE 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/NAMESPACE 2008-11-25 10:41:15 UTC (rev 218)
@@ -23,7 +23,8 @@
"lowerCaseRadius",
"minmaxBias", "getBiasIC",
"getL1normL2deriv",
- "getModifyIC")
+ "getModifyIC",
+ "cniperCont", "cniperPoint", "cniperPointPlot")
exportMethods("updateNorm")
export("getL2normL2deriv")
export("roptest")
Modified: branches/robast-0.7/pkg/ROptEst/R/AllGeneric.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/AllGeneric.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/AllGeneric.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -74,3 +74,12 @@
if(!isGeneric("getModifyIC")){
setGeneric("getModifyIC", function(L2FamIC, neighbor, risk) standardGeneric("getModifyIC"))
}
+if(!isGeneric("cniperCont")){
+ setGeneric("cniperCont", function(IC1, IC2, L2Fam, neighbor, risk, ...) standardGeneric("cniperCont"))
+}
+if(!isGeneric("cniperPoint")){
+ setGeneric("cniperPoint", function(L2Fam, neighbor, risk, ...) standardGeneric("cniperPoint"))
+}
+if(!isGeneric("cniperPointPlot")){
+ setGeneric("cniperPointPlot", function(L2Fam, neighbor, risk, ...) standardGeneric("cniperPointPlot"))
+}
Copied: branches/robast-0.7/pkg/ROptEst/R/cniperCont.R (from rev 217, pkg/ROptEst/R/cniperCont.R)
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/cniperCont.R (rev 0)
+++ branches/robast-0.7/pkg/ROptEst/R/cniperCont.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,70 @@
+setMethod("cniperCont", signature(IC1 = "IC",
+ IC2 = "IC",
+ L2Fam = "L2ParamFamily",
+ neighbor = "ContNeighborhood",
+ risk = "asMSE"),
+ function(IC1, IC2, L2Fam, neighbor, risk, lower, upper, n = 101){
+ R1 <- Risks(IC1)[["trAsCov"]]
+ if(is.null(R1)) R1 <- getRiskIC(IC1, risk = trAsCov(), L2Fam = L2Fam)
+ if(length(R1) > 1) R1 <- R1$value
+
+ R2 <- Risks(IC2)[["trAsCov"]]
+ if(is.null(R2)) R2 <- getRiskIC(IC2, risk = trAsCov(), L2Fam = L2Fam)
+ if(length(R2) > 1) R2 <- R2$value
+
+ r <- neighbor at radius
+
+ fun <- function(x){
+ y1 <- evalIC(IC1, x)
+ y2 <- evalIC(IC2, x)
+ R1 - R2 + r^2*(as.vector(y1 %*% y1) - as.vector(y2 %*% y2))
+ }
+ x <- seq(from = lower, to = upper, length = n)
+ y <- sapply(x, fun)
+ plot(x, y, type = "l", main = "Cniper region plot",
+ xlab = "Dirac point", ylab = "Asymptotic MSE difference (IC1 - IC2)")
+# text(min(x), max(y)/2, "IC2", pos = 4)
+# text(min(x), min(y)/2, "IC1", pos = 4)
+ abline(h = 0)
+ invisible()
+ })
+setMethod("cniperPoint", signature(L2Fam = "L2ParamFamily",
+ neighbor = "ContNeighborhood",
+ risk = "asMSE"),
+ function(L2Fam, neighbor, risk, lower, upper){
+ tr.invF <- sum(diag(solve(FisherInfo(L2Fam))))
+ psi <- optIC(model = L2Fam, risk = asCov())
+ robMod <- InfRobModel(center = L2Fam, neighbor = neighbor)
+ eta <- optIC(model = robMod, risk = asMSE())
+ maxMSE <- Risks(eta)$asMSE
+ Delta <- sqrt(maxMSE - tr.invF)/neighbor at radius
+ fun <- function(x){
+ y <- evalIC(psi, x)
+ sqrt(as.vector(y %*% y)) - Delta
+ }
+ res <- uniroot(fun, lower = lower, upper = upper)$root
+ names(res) <- "cniper point"
+ res
+ })
+setMethod("cniperPointPlot", signature(L2Fam = "L2ParamFamily",
+ neighbor = "ContNeighborhood",
+ risk = "asMSE"),
+ function(L2Fam, neighbor, risk, lower, upper, n = 101){
+ tr.invF <- sum(diag(solve(FisherInfo(L2Fam))))
+ psi <- optIC(model = L2Fam, risk = asCov())
+ robMod <- InfRobModel(center = L2Fam, neighbor = neighbor)
+ eta <- optIC(model = robMod, risk = asMSE())
+ maxMSE <- Risks(eta)$asMSE
+ fun <- function(x){
+ y <- evalIC(psi, x)
+ tr.invF + as.vector(y %*% y)*neighbor at radius^2 - maxMSE
+ }
+ x <- seq(from = lower, to = upper, length = n)
+ y <- sapply(x, fun)
+ plot(x, y, type = "l", main = "Cniper point plot",
+ xlab = "Dirac point", ylab = "Asymptotic MSE difference (classic - robust)")
+# text(min(x), max(y)/2, "Robust", pos = 4)
+# text(min(x), min(y)/2, "Classic", pos = 4)
+ abline(h = 0)
+ invisible()
+ })
Modified: branches/robast-0.7/pkg/ROptEst/R/getAsRisk.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getAsRisk.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/getAsRisk.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -214,6 +214,7 @@
sign <- sign(biastype)
w0 <- options("warn")
+ on.exit(options(w0))
options(warn = -1)
l <- length(support(L2deriv))
Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -276,6 +276,7 @@
{
sign <- sign(biastype)
w0 <- options("warn")
+ on.exit(options(w0))
options(warn = -1)
l <- length(support(L2deriv))
Modified: branches/robast-0.7/pkg/ROptEst/R/getModifyIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getModifyIC.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/getModifyIC.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -123,8 +123,11 @@
b <- sdneu*clip(IC)/sdalt
a <- sdneu*cent(IC)/sdalt
mse <- sum(diag(A))
+ Cov <- sdneu^2*Risks(IC)$asCov/sdalt^2
+
res <- list(A = A, a = sdneu*cent(IC)/sdalt, b = b, d = NULL,
- risk = list(asMSE = mse, asBias = b,
+ risk = list(asCov = Cov,
+ asMSE = mse, asBias = b,
trAsCov = mse - r^2*b^2),
info = Infos(IC), w = w,
normtype = normtype(IC), biastype = biastype(IC),
Modified: branches/robast-0.7/pkg/ROptEst/R/getRiskIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getRiskIC.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/getRiskIC.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -16,7 +16,10 @@
L2Fam = "L2ParamFamily"),
function(IC, risk, L2Fam){
Cov <- IC at Risks[["asCov"]]
- return(list(asCov = list(distribution = .getDistr(L2Fam), value = Cov)))
+ if(is.null(Cov))
+ return(getRiskIC(as(IC, "IC"), risk = risk, L2Fam = L2Fam))
+ else
+ return(list(asCov = list(distribution = .getDistr(L2Fam), value = Cov)))
})
setMethod("getRiskIC", signature(IC = "TotalVarIC",
Modified: branches/robast-0.7/pkg/ROptEst/R/leastFavorableRadius.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/leastFavorableRadius.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/leastFavorableRadius.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -31,6 +31,7 @@
lower <- ifelse(identical(all.equal(loRad, 0), TRUE), 1e-4, loRad)
upper <- ifelse(upRad == Inf, 10, upRad)
ow <- options("warn")
+ on.exit(options(ow))
options(warn = -1)
if(identical(all.equal(loRad, 0), TRUE)){
loRad <- 0
@@ -119,6 +120,7 @@
lower <- ifelse(identical(all.equal(loRad, 0), TRUE), 1e-4, loRad)
upper <- ifelse(upRad == Inf, 10, upRad)
ow <- options("warn")
+ on.exit(options(ow))
options(warn = -1)
trafo <- L2Fam at param@trafo
if(identical(all.equal(loRad, 0), TRUE)){
Modified: branches/robast-0.7/pkg/ROptEst/R/lowerCaseRadius.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/lowerCaseRadius.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/lowerCaseRadius.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -12,6 +12,7 @@
if(!is(D1, "DiscreteDistribution")) stop("not yet implemented")
w0 <- options("warn")
+ on.exit(options(w0))
options(warn = -1)
L2deriv <- L2Fam at L2derivDistr[[1]]
m <- q(L2deriv)(0.5)
@@ -34,10 +35,8 @@
rad <- sqrt(M*Int - (1-wsm) - bet^2*wsm)
names(rad) <- "lower case radius"
- options(w0)
return(rad)
}else{
- options(w0)
rad <- Inf
names(rad) <- "lower case radius"
return(rad)
@@ -47,7 +46,6 @@
rad <- sqrt(M*Int - 1)
names(rad) <- "lower case radius"
- options(w0)
return(rad)
}
})
@@ -63,6 +61,7 @@
L2deriv <- L2Fam at L2derivDistr[[1]]
w0 <- options("warn")
+ on.exit(options(w0))
options(warn = -1)
supp <- support(L2deriv)
gg <- min(abs(supp[supp != 0]))
@@ -101,6 +100,7 @@
sign <- sign(biastype)
w0 <- options("warn")
+ on.exit(options(w0))
options(warn = -1)
L2deriv <- L2Fam at L2derivDistr[[1]]
@@ -130,6 +130,7 @@
sign <- sign(biastype)
w0 <- options("warn")
+ on.exit(options(w0))
options(warn = -1)
l <- length(support(L2deriv))
Modified: branches/robast-0.7/pkg/ROptEst/R/optIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/optIC.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/optIC.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -6,8 +6,9 @@
maxiter = 50, tol = .Machine$double.eps^0.4, warn = TRUE,
noLow = FALSE, verbose = FALSE){
L2derivDim <- numberOfMaps(model at center@L2deriv)
+ ow <- options("warn")
+ on.exit(options(ow))
if(L2derivDim == 1){
- ow <- options("warn")
options(warn = -1)
res <- getInfRobIC(L2deriv = model at center@L2derivDistr[[1]],
neighbor = model at neighbor, risk = risk,
@@ -15,7 +16,6 @@
Finfo = model at center@FisherInfo, trafo = model at center@param at trafo,
upper = upper, maxiter = maxiter, tol = tol, warn = warn,
noLow = noLow, verbose = verbose)
- options(ow)
res$info <- c("optIC", res$info)
res <- c(res, modifyIC = getModifyIC(L2FamIC = model at center,
neighbor = model at neighbor,
@@ -42,7 +42,6 @@
L2derivDistrSymm <- new("DistrSymmList", L2)
}
}
- ow <- options("warn")
options(warn = -1)
res <- getInfRobIC(L2deriv = L2deriv, neighbor = model at neighbor,
risk = risk, Distr = model at center@distribution,
@@ -71,11 +70,12 @@
function(model, risk, upper = 1e4, maxiter = 50,
tol = .Machine$double.eps^0.4, warn = TRUE){
L2derivDistr <- model at center@L2derivDistr[[1]]
+ ow <- options("warn")
+ on.exit(options(ow))
if((length(model at center@L2derivDistr) == 1) & is(L2derivDistr, "UnivariateDistribution")){
if(identical(all.equal(model at neighbor@radius, 0), TRUE)){
return(optIC(model at center, risk = asCov()))
}else{
- ow <- options("warn")
options(warn = -1)
res <- getInfRobIC(L2deriv = L2derivDistr,
neighbor = model at neighbor, risk = risk,
@@ -105,10 +105,11 @@
function(model, risk, sampleSize, upper = 1e4, maxiter = 50,
tol = .Machine$double.eps^0.4, warn = TRUE, Algo = "A",
cont = "left", verbose = FALSE){
+ ow <- options("warn")
+ on.exit(options(ow))
if(!identical(all.equal(sampleSize, trunc(sampleSize)), TRUE))
stop("'sampleSize' has to be an integer > 0")
if(is(model at center@distribution, "UnivariateDistribution")){
- ow <- options("warn")
options(warn = -1)
res <- getFixRobIC(Distr = model at center@distribution,
neighbor = model at neighbor, risk = risk,
Modified: branches/robast-0.7/pkg/ROptEst/R/optRisk.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/optRisk.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/optRisk.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -14,8 +14,9 @@
z.start = NULL, A.start = NULL, upper = 1e4,
maxiter = 50, tol = .Machine$double.eps^0.4, warn = TRUE, noLow = FALSE){
L2derivDim <- numberOfMaps(model at center@L2deriv)
+ ow <- options("warn")
+ on.exit(options(ow))
if(L2derivDim == 1){
- ow <- options("warn")
options(warn = -1)
res <- getInfRobIC(L2deriv = model at center@L2derivDistr[[1]],
neighbor = model at neighbor, risk = risk,
@@ -47,7 +48,6 @@
}
}
- ow <- options("warn")
options(warn = -1)
res <- getInfRobIC(L2deriv = L2deriv, neighbor = model at neighbor,
risk = risk, Distr = model at center@distribution,
@@ -69,10 +69,11 @@
setMethod("optRisk", signature(model = "FixRobModel", risk = "fiUnOvShoot"),
function(model, risk, sampleSize, upper = 1e4, maxiter = 50,
tol = .Machine$double.eps^0.4, warn = TRUE, Algo = "A", cont = "left"){
+ ow <- options("warn")
+ on.exit(options(ow))
if(!identical(all.equal(sampleSize, trunc(sampleSize)), TRUE))
stop("'sampleSize' has to be an integer > 0")
if(is(model at center@distribution, "UnivariateDistribution")){
- ow <- options("warn")
options(warn = -1)
res <- getFixRobIC(Distr = model at center@distribution,
neighbor = model at neighbor, risk = risk,
Modified: branches/robast-0.7/pkg/ROptEst/R/radiusMinimaxIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/radiusMinimaxIC.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/radiusMinimaxIC.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -8,6 +8,8 @@
function(L2Fam, neighbor, risk, loRad, upRad, z.start = NULL,
A.start = NULL, upper = 1e5, maxiter = 50,
tol = .Machine$double.eps^0.4, warn = FALSE, verbose = FALSE){
+ ow <- options("warn")
+ on.exit(options(ow))
if(length(loRad) != 1)
stop("'loRad' is not of length == 1")
if(length(upRad) != 1)
@@ -21,7 +23,6 @@
upRad <- min(upRad,10)
if(L2derivDim == 1){
- ow <- options("warn")
options(warn = -1)
upper.b <- upper
lower <- ifelse(identical(all.equal(loRad, 0), TRUE), 1e-4, loRad)
@@ -122,7 +123,6 @@
normtype(risk) <- normtype}
std <- if(is(normtype,"QFNorm")) QuadForm(normtype) else diag(p)
- ow <- options("warn")
options(warn = -1)
upper.b <- upper
lower <- ifelse(identical(all.equal(loRad, 0), TRUE), 1e-4, loRad)
@@ -191,7 +191,6 @@
Finfo = L2Fam at FisherInfo, trafo = trafo, z.start = z.start,
A.start = A.start, upper = upper.b, maxiter = maxiter,
tol = tol, warn = warn, verbose = verbose)
- options(ow)
res$info <- c("radiusMinimaxIC", paste("radius minimax IC for radius interval [",
round(loRad, 3), ", ", round(upRad, 3), "]", sep=""))
res$info <- rbind(res$info, c("radiusMinimaxIC",
Modified: branches/robast-0.7/pkg/ROptEst/R/roptest.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/roptest.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/R/roptest.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -55,7 +55,7 @@
startPar = startPar, ...)
if(is(initial.est, "Estimate")) initial.est <- estimate(initial.est)
newParam <- param(L2Fam)
- main(newParam) <- initial.est
+ main(newParam)[] <- initial.est
L2FamStart <- modifyModel(L2Fam, newParam)
if(is.matrix(x))
sqrtn <- sqrt(ncol(x))
Modified: branches/robast-0.7/pkg/ROptEst/chm/00Index.html
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/00Index.html 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/chm/00Index.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -10,9 +10,11 @@
<param name="keyword" value=".. contents">
</object>
-<h2>Help pages for package ‘ROptEst’ version 0.6.0</h2>
+<h2>Help pages for package ‘ROptEst’ version 0.6.1</h2>
<p align="center">
+<a href="# "> </a>
+<a href="#C">C</a>
<a href="#G">G</a>
<a href="#L">L</a>
<a href="#M">M</a>
@@ -23,6 +25,36 @@
<table width="100%">
</table>
+<h2><a name=" ">-- --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="0ROptEst-package.html">ROptEst-package</a></td>
+<td>Optimally robust estimation </td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="cniperCont.html">cniperCont</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+<tr><td width="25%"><a href="cniperCont.html">cniperCont,IC,IC,L2ParamFamily,ContNeighborhood,asMSE-method</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+<tr><td width="25%"><a href="cniperCont.html">cniperCont-methods</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+<tr><td width="25%"><a href="cniperCont.html">cniperPoint</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+<tr><td width="25%"><a href="cniperCont.html">cniperPoint,L2ParamFamily,ContNeighborhood,asMSE-method</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+<tr><td width="25%"><a href="cniperCont.html">cniperPoint-methods</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+<tr><td width="25%"><a href="cniperCont.html">cniperPointPlot</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+<tr><td width="25%"><a href="cniperCont.html">cniperPointPlot,L2ParamFamily,ContNeighborhood,asMSE-method</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+<tr><td width="25%"><a href="cniperCont.html">cniperPointPlot-methods</a></td>
+<td>Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. </td></tr>
+</table>
+
<h2><a name="G">-- G --</a></h2>
<table width="100%">
@@ -306,6 +338,8 @@
<td>Generic function for the computation of the radius minimax IC</td></tr>
<tr><td width="25%"><a href="radiusMinimaxIC.html">radiusMinimaxIC-methods</a></td>
<td>Generic function for the computation of the radius minimax IC</td></tr>
+<tr><td width="25%"><a href="0ROptEst-package.html">ROptEst</a></td>
+<td>Optimally robust estimation </td></tr>
<tr><td width="25%"><a href="roptest.html">roptest</a></td>
<td>Optimally robust estimation </td></tr>
</table>
Modified: branches/robast-0.7/pkg/ROptEst/chm/ROptEst.chm
===================================================================
(Binary files differ)
Modified: branches/robast-0.7/pkg/ROptEst/chm/ROptEst.hhp
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/ROptEst.hhp 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/chm/ROptEst.hhp 2008-11-25 10:41:15 UTC (rev 218)
@@ -12,6 +12,8 @@
[FILES]
00Index.html
+0ROptEst-package.html
+cniperCont.html
getAsRisk.html
getBiasIC.html
getFiRisk.html
Modified: branches/robast-0.7/pkg/ROptEst/chm/ROptEst.toc
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/ROptEst.toc 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/chm/ROptEst.toc 2008-11-25 10:41:15 UTC (rev 218)
@@ -10,6 +10,46 @@
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="ROptEst-package">
+<param name="Local" value="0ROptEst-package.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperCont">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperCont,IC,IC,L2ParamFamily,ContNeighborhood,asMSE-method">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperCont-methods">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperPoint">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperPoint,L2ParamFamily,ContNeighborhood,asMSE-method">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperPoint-methods">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperPointPlot">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperPointPlot,L2ParamFamily,ContNeighborhood,asMSE-method">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cniperPointPlot-methods">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="getAsRisk">
<param name="Local" value="getAsRisk.html">
</OBJECT>
@@ -530,6 +570,10 @@
<param name="Local" value="radiusMinimaxIC.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="ROptEst">
+<param name="Local" value="0ROptEst-package.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="roptest">
<param name="Local" value="roptest.html">
</OBJECT>
@@ -627,6 +671,10 @@
<param name="Local" value="getInfStand.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Generic Functions for Computation and Plot of Cniper Contamination and Cniper Points. ">
+<param name="Local" value="cniperCont.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Methods for Function updateNorm in Package `ROptEst' ">
<param name="Local" value="updateNorm-methods.html">
</OBJECT>
Copied: branches/robast-0.7/pkg/ROptEst/chm/getModifyIC.html (from rev 217, pkg/ROptEst/chm/getModifyIC.html)
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/getModifyIC.html (rev 0)
+++ branches/robast-0.7/pkg/ROptEst/chm/getModifyIC.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,118 @@
+<html><head><title>Generic Function for the Computation of Functions for Slot modifyIC</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>getModifyIC(ROptEst)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: getModifyIC">
+<param name="keyword" value="R: getModifyIC-methods">
+<param name="keyword" value="R: getModifyIC,L2ParamFamily,Neighborhood,asRisk-method">
+<param name="keyword" value="R: getModifyIC,L2LocationFamily,UncondNeighborhood,asGRisk-method">
+<param name="keyword" value="R: getModifyIC,L2LocationFamily,UncondNeighborhood,fiUnOvShoot-method">
+<param name="keyword" value="R: getModifyIC,L2ScaleFamily,ContNeighborhood,asGRisk-method">
+<param name="keyword" value="R: getModifyIC,L2ScaleFamily,TotalVarNeighborhood,asGRisk-method">
+<param name="keyword" value="R: getModifyIC,L2LocationScaleFamily,ContNeighborhood,asGRisk-method">
+<param name="keyword" value=" Generic Function for the Computation of Functions for Slot modifyIC">
+</object>
+
+
+<h2>Generic Function for the Computation of Functions for Slot modifyIC</h2>
+
+
+<h3>Description</h3>
+
+<p>
+This function is used by internal computations and is rarely called directly.
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+getModifyIC(L2FamIC, neighbor, risk)
+## S4 method for signature 'L2ParamFamily, Neighborhood,
+## asRisk':
+getModifyIC(L2FamIC, neighbor, risk)
+## S4 method for signature 'L2LocationFamily,
+## UncondNeighborhood, asGRisk':
+getModifyIC(L2FamIC, neighbor, risk)
+## S4 method for signature 'L2LocationFamily,
+## UncondNeighborhood, fiUnOvShoot':
+getModifyIC(L2FamIC, neighbor, risk)
+## S4 method for signature 'L2ScaleFamily,
+## ContNeighborhood, asGRisk':
+getModifyIC(L2FamIC, neighbor, risk)
+## S4 method for signature 'L2ScaleFamily,
+## TotalVarNeighborhood, asGRisk':
+getModifyIC(L2FamIC, neighbor, risk)
+## S4 method for signature 'L2LocationScaleFamily,
+## ContNeighborhood, asGRisk':
+getModifyIC(L2FamIC, neighbor, risk)
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>L2FamIC</code></td>
+<td>
+object of class <code>L2ParamFamily</code>. </td></tr>
+<tr valign="top"><td><code>neighbor</code></td>
+<td>
+object of class <code>"Neighborhood"</code>. </td></tr>
+<tr valign="top"><td><code>risk</code></td>
+<td>
+object of class <code>"RiskType"</code> </td></tr>
+</table>
+
+<h3>Details</h3>
+
+<p>
+This function is used for internal computations.
+</p>
+
+
+<h3>Value</h3>
+
+<p>
+Function for slot <code>modifyIC</code> of <code>IC</code>s</p>
+
+<h3>Author(s)</h3>
+
+<p>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a>
+</p>
+
+
+<h3>References</h3>
+
+<p>
+Rieder, H. (1994) <EM>Robust Asymptotic Statistics</EM>. New York: Springer.
+</p>
+<p>
+Kohl, M. (2005) <EM>Numerical Contributions to the Asymptotic Theory of Robustness</EM>.
+Bayreuth: Dissertation.
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a href="optIC.html">optIC</a></code>, <code><a onclick="findlink('RobAStBase', 'IC-class.html')" style="text-decoration: underline; color: blue; cursor: hand">IC-class</a></code>
+</p>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>ROptEst</em> version 0.6.0 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/ROptEst/chm/roptest.html (from rev 217, pkg/ROptEst/chm/roptest.html)
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/roptest.html (rev 0)
+++ branches/robast-0.7/pkg/ROptEst/chm/roptest.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,305 @@
+<html><head><title>Optimally robust estimation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>roptest(ROptEst)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: roptest">
+<param name="keyword" value=" Optimally robust estimation">
+</object>
+
+
+<h2>Optimally robust estimation</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Function to compute optimally robust estimates for L2-differentiable
+parametric families via k-step construction.
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+roptest(x, L2Fam, eps, eps.lower, eps.upper, initial.est,
+ neighbor = ContNeighborhood(), risk = asMSE(), steps = 1,
+ distance = CvMDist, startPar = NULL, verbose = FALSE,
+ useLast = getRobAStBaseOption("kStepUseLast"), ...)
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>x</code></td>
+<td>
+sample </td></tr>
+<tr valign="top"><td><code>L2Fam</code></td>
+<td>
+object of class <code>"L2ParamFamily"</code> </td></tr>
+<tr valign="top"><td><code>eps</code></td>
+<td>
+positive real (0 < <code>eps</code> <= 0.5): amount of gross errors.
+See details below. </td></tr>
+<tr valign="top"><td><code>eps.lower</code></td>
+<td>
+positive real (0 <= <code>eps.lower</code> <= <code>eps.upper</code>):
+lower bound for the amount of gross errors. See details below. </td></tr>
+<tr valign="top"><td><code>eps.upper</code></td>
+<td>
+positive real (<code>eps.lower</code> <= <code>eps.upper</code> <= 0.5):
+upper bound for the amount of gross errors. See details below. </td></tr>
+<tr valign="top"><td><code>initial.est</code></td>
+<td>
+initial estimate for unknown parameter. If missing
+minimum distance estimator is computed. </td></tr>
+<tr valign="top"><td><code>neighbor</code></td>
+<td>
+object of class <code>"UncondNeighborhood"</code> </td></tr>
+<tr valign="top"><td><code>risk</code></td>
+<td>
+object of class <code>"RiskType"</code> </td></tr>
+<tr valign="top"><td><code>steps</code></td>
+<td>
+positive integer: number of steps used for k-steps construction </td></tr>
+<tr valign="top"><td><code>distance</code></td>
+<td>
+distance function </td></tr>
+<tr valign="top"><td><code>startPar</code></td>
+<td>
+initial information used by <code>optimize</code> resp. <code>optim</code>;
+i.e; if (total) parameter is of length 1, <code>startPar</code> is
+a search interval, else it is an initial parameter value; if <code>NULL</code>
+slot <code>startPar</code> of <code>ParamFamily</code> is used to produce it;
+in the multivariate case, <code>startPar</code> may also be of class <code>Estimate</code>,
+in which case slot <code>untransformed.estimate</code> is used.</td></tr>
+<tr valign="top"><td><code>verbose</code></td>
+<td>
+logical: if <code>TRUE</code>, some messages are printed </td></tr>
+<tr valign="top"><td><code>useLast</code></td>
+<td>
+which parameter estimate (initial estimate or
+k-step estimate) shall be used to fill the slots <code>pIC</code>,
+<code>asvar</code> and <code>asbias</code> of the return value. </td></tr>
+<tr valign="top"><td><code>...</code></td>
+<td>
+further arguments </td></tr>
+</table>
+
+<h3>Details</h3>
+
+<p>
+Computes the optimally robust estimator for a given L2 differentiable
+parametric family. The computation uses a k-step construction with an
+appropriate initial estimate; cf. also <code><a onclick="findlink('RobAStBase', 'kStepEstimator.html')" style="text-decoration: underline; color: blue; cursor: hand">kStepEstimator</a></code>.
+Valid candidates are e.g. Kolmogorov(-Smirnov) or von Mises minimum
+distance estimators (default); cf. Rieder (1994) and Kohl (2005).
+</p>
+<p>
+If the amount of gross errors (contamination) is known, it can be
+specified by <code>eps</code>. The radius of the corresponding infinitesimal
+contamination neighborhood is obtained by multiplying <code>eps</code>
+by the square root of the sample size.
+</p>
+<p>
+If the amount of gross errors (contamination) is unknown, try to find a
+rough estimate for the amount of gross errors, such that it lies
+between <code>eps.lower</code> and <code>eps.upper</code>.
+</p>
+<p>
+In case <code>eps.lower</code> is specified and <code>eps.upper</code> is missing,
+<code>eps.upper</code> is set to 0.5. In case <code>eps.upper</code> is specified and
+<code>eps.lower</code> is missing, <code>eps.lower</code> is set to 0.
+</p>
+<p>
+If neither <code>eps</code> nor <code>eps.lower</code> and/or <code>eps.upper</code> is
+specified, <code>eps.lower</code> and <code>eps.upper</code> are set to 0 and 0.5,
+respectively.
+</p>
+<p>
+If <code>eps</code> is missing, the radius-minimax estimator in sense of
+Rieder et al. (2001, 2008), respectively Section 2.2 of Kohl (2005) is returned.
+</p>
+<p>
+The default value of argument <code>useLast</code> is set by the
+global option <code>kStepUseLast</code> which by default is set to
+<code>FALSE</code>. In case of general models <code>useLast</code>
+remains unchanged during the computations. However, if
+slot <code>CallL2Fam</code> of <code>IC</code> generates an object of
+class <code>"L2GroupParamFamily"</code> the value of <code>useLast</code>
+is changed to <code>TRUE</code>.
+Explicitly setting <code>useLast</code> to <code>TRUE</code> should
+be done with care as in this situation the influence curve
+is re-computed using the value of the one-step estimate
+which may take quite a long time depending on the model.
+</p>
+<p>
+If <code>useLast</code> is set to <code>TRUE</code> the computation of <code>asvar</code>,
+<code>asbias</code> and <code>IC</code> is based on the k-step estimate.
+</p>
+
+
+<h3>Value</h3>
+
+<p>
+Object of class <code>"kStepEstimate"</code>.</p>
+
+<h3>Author(s)</h3>
+
+<p>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a>
+</p>
+
+
+<h3>References</h3>
+
+<p>
+Kohl, M. (2005) <EM>Numerical Contributions to the Asymptotic Theory of Robustness</EM>.
+Bayreuth: Dissertation.
+</p>
+<p>
+Rieder, H. (1994) <EM>Robust Asymptotic Statistics</EM>. New York: Springer.
+</p>
+<p>
+Rieder, H., Kohl, M. and Ruckdeschel, P. (2008) The Costs of not Knowing
+the Radius. Statistical Methods and Applications <EM>17</EM>(1) 13-40.
+</p>
+<p>
+Rieder, H., Kohl, M. and Ruckdeschel, P. (2001) The Costs of not Knowing
+the Radius. Appeared as discussion paper Nr. 81.
+SFB 373 (Quantification and Simulation of Economic Processes),
+Humboldt University, Berlin; also available under
+<a href="www.uni-bayreuth.de/departments/math/org/mathe7/RIEDER/pubs/RR.pdf">www.uni-bayreuth.de/departments/math/org/mathe7/RIEDER/pubs/RR.pdf</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a onclick="findlink('RobLox', 'roblox.html')" style="text-decoration: underline; color: blue; cursor: hand">roblox</a></code>,
+<code><a onclick="findlink('distrMod', 'L2ParamFamily-class.html')" style="text-decoration: underline; color: blue; cursor: hand">L2ParamFamily-class</a></code>
+<code><a onclick="findlink('RobAStBase', 'UncondNeighborhood-class.html')" style="text-decoration: underline; color: blue; cursor: hand">UncondNeighborhood-class</a></code>,
+<code><a onclick="findlink('distrMod', 'RiskType-class.html')" style="text-decoration: underline; color: blue; cursor: hand">RiskType-class</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+#############################
+## 1. Binomial data
+#############################
+## generate a sample of contaminated data
+ind <- rbinom(100, size=1, prob=0.05)
+x <- rbinom(100, size=25, prob=(1-ind)*0.25 + ind*0.9)
+
+## ML-estimate
+MLest <- MLEstimator(x, BinomFamily(size = 25))
+estimate(MLest)
+confint(MLest)
+
+## compute optimally robust estimator (known contamination)
+robest1 <- roptest(x, BinomFamily(size = 25), eps = 0.05, steps = 3)
+estimate(robest1)
+confint(robest1, method = symmetricBias())
+## neglecting bias
+confint(robest1)
+plot(pIC(robest1))
+
+## compute optimally robust estimator (unknown contamination)
+robest2 <- roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.2, steps = 3)
+estimate(robest2)
+confint(robest2, method = symmetricBias())
+plot(pIC(robest2))
+
+## total variation neighborhoods (known deviation)
+robest3 <- roptest(x, BinomFamily(size = 25), eps = 0.025,
+ neighbor = TotalVarNeighborhood(), steps = 3)
+estimate(robest3)
+confint(robest3, method = symmetricBias())
+plot(pIC(robest3))
+
+## total variation neighborhoods (unknown deviation)
+robest4 <- roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.1,
+ neighbor = TotalVarNeighborhood(), steps = 3)
+estimate(robest4)
+confint(robest4, method = symmetricBias())
+plot(pIC(robest4))
+
+#############################
+## 2. Poisson data
+#############################
+## Example: Rutherford-Geiger (1910); cf. Feller~(1968), Section VI.7 (a)
+x <- c(rep(0, 57), rep(1, 203), rep(2, 383), rep(3, 525), rep(4, 532),
+ rep(5, 408), rep(6, 273), rep(7, 139), rep(8, 45), rep(9, 27),
+ rep(10, 10), rep(11, 4), rep(12, 0), rep(13, 1), rep(14, 1))
+
+## ML-estimate
+MLest <- MLEstimator(x, PoisFamily())
+estimate(MLest)
+confint(MLest)
+
+## compute optimally robust estimator (unknown contamination)
+robest <- roptest(x, PoisFamily(), eps.upper = 0.1, steps = 3)
+estimate(robest)
+confint(robest, symmetricBias())
+plot(pIC(robest))
+
+## total variation neighborhoods (unknown deviation)
+robest1 <- roptest(x, PoisFamily(), eps.upper = 0.05,
+ neighbor = TotalVarNeighborhood(), steps = 3)
+estimate(robest1)
+confint(robest1, symmetricBias())
+plot(pIC(robest1))
+
+#############################
+## 3. Normal (Gaussian) location and scale
+#############################
+## 24 determinations of copper in wholemeal flour
+library(MASS)
+data(chem)
+plot(chem, main = "copper in wholemeal flour", pch = 20)
+
+## ML-estimate
+MLest <- MLEstimator(chem, NormLocationScaleFamily())
+estimate(MLest)
+confint(MLest)
+
+## compute optimally robust estimator (known contamination)
+## takes some time -> you can use package RobLox for normal
+## location and scale which is optimized for speed
+robest <- roptest(chem, NormLocationScaleFamily(), eps = 0.05, steps = 3)
+estimate(robest)
+confint(robest, symmetricBias())
+plot(pIC(robest))
+## plot of relative and absolute information; cf. Kohl (2005)
+infoPlot(pIC(robest))
+
+## compute optimally robust estimator (unknown contamination)
+## takes some time -> use package RobLox!
+robest1 <- roptest(chem, NormLocationScaleFamily(), eps.lower = 0.05,
+ eps.upper = 0.1, steps = 3)
+estimate(robest1)
+confint(robest1, symmetricBias())
+plot(pIC(robest1))
+## plot of relative and absolute information; cf. Kohl (2005)
+infoPlot(pIC(robest1))
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>ROptEst</em> version 0.6.1 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/BinomialModel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/BinomialModel.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/BinomialModel.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -2,6 +2,7 @@
## Example: Binomial Family
###############################################################################
require(ROptEst)
+options("newDevice"=TRUE)
## generates Binomial Family with
## m = 25 and probability of success theta = 0.25
@@ -143,6 +144,11 @@
estimate(est1c2)
estimate(est1c3)
+## confidence intervals
+confint(est1c, symmetricBias())
+confint(est1c1, symmetricBias())
+confint(est1c2, symmetricBias())
+confint(est1c3, symmetricBias())
## av) Define infinitesimal robust model
RobB4 <- InfRobModel(center=BinomFamily(size=25, prob=estimate(est0)),
@@ -172,6 +178,12 @@
estimate(est1v2)
estimate(est1v3)
+## confidence intervals
+confint(est1v, symmetricBias())
+confint(est1v1, symmetricBias())
+confint(est1v2, symmetricBias())
+confint(est1v3, symmetricBias())
+
## 3.2. k-step estimation: radius known
IC9 <- optIC(model=RobB3, risk=asMSE())
(est2c <- kStepEstimator(x, IC=IC9, start=est0, steps = 3L))
@@ -193,6 +205,11 @@
estimate(est2c2)
estimate(est2c3)
+## confidence intervals
+confint(est2c, symmetricBias())
+confint(est2c1, symmetricBias())
+confint(est2c2, symmetricBias())
+confint(est2c3, symmetricBias())
IC10 <- optIC(model=RobB4, risk=asMSE())
(est2v <- kStepEstimator(x, IC=IC10, start=est0, steps = 3L))
@@ -217,7 +234,13 @@
estimate(est2v2)
estimate(est2v3)
+## confidence intervals
+confint(est2v, symmetricBias())
+confint(est2v1, symmetricBias())
+confint(est2v2, symmetricBias())
+confint(est2v3, symmetricBias())
+
## 4.1. one-step estimation: radius interval
IC11 <- radiusMinimaxIC(L2Fam=BinomFamily(size=25, prob=estimate(est0)),
neighbor=ContNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -235,6 +258,19 @@
(est3v1 <- roptest(x, BinomFamily(size = 25), eps.upper = 0.5, neighbor = TotalVarNeighborhood()))
checkIC(pIC(est3v1))
+## comparison of estimates
+estimate(est3c)
+estimate(est3v)
+estimate(est3c1)
+estimate(est3v1)
+
+## confidence intervals
+confint(est3c, symmetricBias())
+confint(est3v, symmetricBias())
+confint(est3c1, symmetricBias())
+confint(est3v1, symmetricBias())
+
+
## 4.2. k-step estimation: radius interval
IC11 <- radiusMinimaxIC(L2Fam=BinomFamily(size=25, prob=estimate(est0)),
neighbor=ContNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -252,3 +288,15 @@
(est4v1 <- roptest(x, BinomFamily(size = 25), eps.upper = 0.5, neighbor = TotalVarNeighborhood(),
steps = 3L))
checkIC(pIC(est4v1))
+
+## comparison of estimates
+estimate(est4c)
+estimate(est4v)
+estimate(est4c1)
+estimate(est4v1)
+
+## confidence intervals
+confint(est4c, symmetricBias())
+confint(est4v, symmetricBias())
+confint(est4c1, symmetricBias())
+confint(est4v1, symmetricBias())
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/ExponentialScaleModel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/ExponentialScaleModel.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/ExponentialScaleModel.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -2,6 +2,7 @@
## Example: Exponential Scale Family
###############################################################################
require(ROptEst)
+options("newDevice"=TRUE)
## generates Exponential Scale Family with scale = 0.5 (rate = 2)
E1 <- ExpScaleFamily(scale = 0.5)
@@ -19,7 +20,7 @@
## L_2 family + infinitesimal neighborhood
E1.Rob1 <- InfRobModel(center = E1, neighbor = ContNeighborhood(radius = 0.5))
E1.Rob1 # show E1.Rob1
-E1.Rob2 <- InfRobModel(center = E1, neighbor = TotalVarNeighborhood(radius = 0.5))
+(E1.Rob2 <- InfRobModel(center = E1, neighbor = TotalVarNeighborhood(radius = 0.5)))
## MSE solution
(E1.IC1 <- optIC(model=E1.Rob1, risk=asMSE()))
@@ -109,7 +110,15 @@
estimate(E1.est22)
estimate(E1.est23)
+## confidence intervals
+confint(E1.est11, symmetricBias())
+confint(E1.est12, symmetricBias())
+confint(E1.est13, symmetricBias())
+confint(E1.est21, symmetricBias())
+confint(E1.est22, symmetricBias())
+confint(E1.est23, symmetricBias())
+
## 4. one-step estimation: radius interval
E1.IC11 <- radiusMinimaxIC(L2Fam=ExpScaleFamily(scale=estimate(E1.est01)),
neighbor=ContNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -135,3 +144,11 @@
estimate(E1.est41)
estimate(E1.est42)
estimate(E1.est43)
+
+## confidence intervals
+confint(E1.est31, symmetricBias())
+confint(E1.est32, symmetricBias())
+confint(E1.est33, symmetricBias())
+confint(E1.est41, symmetricBias())
+confint(E1.est42, symmetricBias())
+confint(E1.est43, symmetricBias())
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/GammaModel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/GammaModel.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/GammaModel.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -2,6 +2,7 @@
## Example: Gamma Family
###############################################################################
require(ROptEst)
+options("newDevice"=TRUE)
## generates Gamma Family with
## scale = 2 and shape = 0.5
@@ -28,7 +29,7 @@
checkIC(IC1)
Risks(IC1)
plot(IC1)
-devNew()
+#devNew()
infoPlot(IC1)
## lower case solutions
@@ -65,14 +66,36 @@
x <- (1-ind)*rgamma(100, scale = 1, shape = 2) + ind*rgamma(100, scale = 3, shape = 5)
## 2. Kolmogorov(-Smirnov) minimum distance estimator
-(est0 <- MDEstimator(x=x, GammaFamily()))
+(est01 <- MDEstimator(x=x, GammaFamily()))
+## 3. Cramer von Mises minimum distance estimator
+(est02 <- MDEstimator(x = x, GammaFamily(), distance = CvMDist))
+
## non-robust ML estimator
MLEstimator(x=x, GammaFamily())
-## 3. one-step estimation: radius known
-RobG3 <- InfRobModel(center=GammaFamily(scale = estimate(est0)["scale"],
- shape = estimate(est0)["shape"]),
+## 4. one-step estimation: radius known
+RobG3 <- InfRobModel(center=GammaFamily(scale = estimate(est02)["scale"],
+ shape = estimate(est02)["shape"]),
neighbor=ContNeighborhood(radius=0.5))
IC9 <- optIC(model=RobG3, risk=asMSE())
-(est1 <- oneStepEstimator(x, IC=IC9, start=estimate(est0)))
+(est1 <- oneStepEstimator(x, IC=IC9, start=est02))
+
+## 5. k-step estimation: radius known
+(est2 <- kStepEstimator(x, IC=IC9, start=est02, steps = 3))
+
+## It's simpler to use function roptest!
+(est3 <- roptest(x, eps = 0.5/sqrt(length(x)), L2Fam = GammaFamily()))
+(est4 <- roptest(x, eps = 0.5/sqrt(length(x)), L2Fam = GammaFamily(), steps = 3))
+
+## comparison
+estimate(est1)
+estimate(est3)
+estimate(est2)
+estimate(est4)
+
+## confidence intervals
+confint(est1, symmetricBias())
+confint(est3, symmetricBias())
+confint(est2, symmetricBias())
+confint(est4, symmetricBias())
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/GumbelLocationModel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/GumbelLocationModel.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/GumbelLocationModel.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -4,10 +4,11 @@
## Exponential Scale Family
###############################################################################
require(ROptEst)
+options("newDevice"=TRUE)
## generates Gumbel Location Family with loc = 0
## (known scale = 1)
-distrExOptions(ElowerTruncQuantile = 1e-15) # non-finite function value in integrate
+distrExOptions(ElowerTruncQuantile = 1e-7) # non-finite function value in integrate
G0 <- GumbelLocationFamily(loc = 0, scale = 1)
G0 # show G0
plot(G0) # plot of Gumbel(loc = 0, scale = 1) and L_2 derivative
@@ -107,28 +108,68 @@
G0.x <- rgumbel(1e2, loc=(1-ind)*0.5+ind*1)
## 2. Kolmogorov(-Smirnov) minimum distance estimator
-(G0.est0 <- MDEstimator(x=G0.x, GumbelLocationFamily(), interval = c(0, 5)))
+(G0.est01 <- MDEstimator(x=G0.x, GumbelLocationFamily()))
-## 3. one-step estimation: radius known
-G0.Rob3 <- InfRobModel(center=GumbelLocationFamily(loc=G0.est0$estimate),
+## 3. Cramer von Mises minimum distance estimator
+(G0.est02 <- MDEstimator(x=G0.x, GumbelLocationFamily(), distance = CvMDist))
+
+## 4. one-step estimation: radius known
+G0.Rob3 <- InfRobModel(center=GumbelLocationFamily(loc=estimate(G0.est02)),
neighbor=ContNeighborhood(radius=0.5))
G0.IC9 <- optIC(model=G0.Rob3, risk=asMSE())
-(G0.est1 <- oneStepEstimator(G0.x, IC=G0.IC9, start=G0.est0$estimate))
+(G0.est1 <- oneStepEstimator(G0.x, IC=G0.IC9, start=G0.est02))
-## 4. M estimation: radius known
+## 5. k-step estimation: radius known
+(G0.est2 <- kStepEstimator(G0.x, IC=G0.IC9, start=G0.est02, steps = 3))
+
+## 6. M estimation: radius known
G0.Rob31 <- InfRobModel(center=GumbelLocationFamily(loc=0),
neighbor=ContNeighborhood(radius=0.5))
G0.IC91 <- optIC(model=G0.Rob31, risk=asMSE())
(G0.est11 <- locMEstimator(G0.x, IC=G0.IC91))
-## 5. one-step estimation: radius interval
-G0.IC10 <- radiusMinimaxIC(L2Fam=GumbelLocationFamily(loc=G0.est0$estimate),
+## 7. one-step estimation: radius interval
+G0.IC10 <- radiusMinimaxIC(L2Fam=GumbelLocationFamily(loc=estimate(G0.est02)),
neighbor=ContNeighborhood(), risk=asMSE(), loRad=0.5, upRad=1)
-(G0.est2 <- oneStepEstimator(G0.x, IC=G0.IC10, start=G0.est0$estimate))
+(G0.est3 <- oneStepEstimator(G0.x, IC=G0.IC10, start=G0.est02))
-## 6. M estimation: radius interval
+## 8. k-step estimation: radius interval
+(G0.est4 <- kStepEstimator(G0.x, IC=G0.IC10, start=G0.est02, steps = 3))
+
+## 9. M estimation: radius interval
G0.IC101 <- radiusMinimaxIC(L2Fam=GumbelLocationFamily(),
neighbor=ContNeighborhood(), risk=asMSE(), loRad=0.5, upRad=1)
(G0.est21 <- locMEstimator(G0.x, IC=G0.IC101))
+## 10. It's easier to use function roptest for k-step (k >= 1) estimation!
+sqrtn <- sqrt(length(G0.x))
+G0.est5 <- roptest(G0.x, eps.lower = 0.5/sqrtn, eps.upper = 1/sqrtn,
+ L2Fam = GumbelLocationFamily())
+G0.est6 <- roptest(G0.x, eps.lower = 0.5/sqrtn, eps.upper = 1/sqrtn,
+ L2Fam = GumbelLocationFamily(), steps = 3)
+
+## comparison - radius known
+estimate(G0.est1)
+estimate(G0.est2)
+estimate(G0.est11)
+
+## confidence intervals
+confint(G0.est1, symmetricBias())
+confint(G0.est2, symmetricBias())
+confint(G0.est11, symmetricBias())
+
+## comparison - radius interval
+estimate(G0.est3)
+estimate(G0.est5)
+estimate(G0.est4)
+estimate(G0.est6)
+estimate(G0.est21)
+
+## confidence intervals
+confint(G0.est3, symmetricBias())
+confint(G0.est5, symmetricBias())
+confint(G0.est4, symmetricBias())
+confint(G0.est6, symmetricBias())
+confint(G0.est21, symmetricBias())
+
distrExOptions(ElowerTruncQuantile=0) # default
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/LognormalAndNormalModel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/LognormalAndNormalModel.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/LognormalAndNormalModel.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -2,11 +2,12 @@
## Example: Lognormal Scale and Normal Location
###############################################################################
require(ROptEst)
+options("newDevice"=TRUE)
-## generates Lognormal Scale Family with rate = 1
+## generates Lognormal Scale Family with meanlog = 0, sdlog = 1
LN1 <- LnormScaleFamily()
LN1 # show LN1
-plot(LN1) # plot of Exp(rate = 1) and L_2 derivative
+plot(LN1) # plot of Lnorm() and L_2 derivative
checkL2deriv(LN1)
## generates Normal Location Family with mean = 0
@@ -144,7 +145,6 @@
## least favorable radius
-## (may take quite some time!)
(LN1.r.rho1 <- leastFavorableRadius(L2Fam=LN1, neighbor=ContNeighborhood(),
risk=asMSE(), rho=0.5))
(N0.r.rho1 <- leastFavorableRadius(L2Fam=N0, neighbor=ContNeighborhood(),
@@ -153,3 +153,28 @@
risk=asMSE(), rho=1/3))
(N0.r.rho2 <- leastFavorableRadius(L2Fam=N0, neighbor=TotalVarNeighborhood(),
risk=asMSE(), rho=1/3))
+
+## For estimation use function roptest
+ind <- rbinom(1e2, size=1, prob=0.05)
+x <- rnorm(1e2, mean=(1-ind)+ind*9)
+y <- exp(x)
+
+## 1-step: contamination known
+est1 <- roptest(x, eps = 0.05, L2Fam = NormLocationFamily())
+est2 <- roptest(y, eps = 0.05, L2Fam = LnormScaleFamily())
+
+## k-step: contamination known
+est3 <- roptest(x, eps = 0.05, L2Fam = NormLocationFamily(), steps = 3)
+est4 <- roptest(y, eps = 0.05, L2Fam = LnormScaleFamily(), steps = 3)
+
+## comparison
+estimate(est1)
+log(estimate(est2))
+estimate(est3)
+log(estimate(est4))
+
+## confidence intervals
+confint(est1, symmetricBias())
+confint(est2, symmetricBias())
+confint(est3, symmetricBias())
+confint(est4, symmetricBias())
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -2,6 +2,7 @@
## Example: Normal location and scale
###############################################################################
require(ROptEst)
+options("newDevice"=TRUE)
## generates normal location and scale family with mean = -2 and sd = 3
N0 <- NormLocationScaleFamily(mean=-2, sd=3)
@@ -92,17 +93,6 @@
N0.r.rho1 <- leastFavorableRadius(L2Fam=N0, neighbor=ContNeighborhood(),
risk=asMSE(), rho=0.5)
-
-library(ROptEst)
-library(MASS)
-data(chem)
-initial.est <- c(median(chem), mad(chem))
-system.time(ROest1 <- roptest(chem, NormLocationScaleFamily(), eps.upper = 0.05, steps = 3L,
- initial.est = initial.est))
-
-library(RobLox)
-system.time(ROest2 <- roblox(chem, eps.upper = 0.05, k = 3, returnIC = TRUE))
-
## one-step estimation
## 1. generate a contaminated sample
ind <- rbinom(100, size=1, prob=0.05)
@@ -125,3 +115,23 @@
IC2 <- radiusMinimaxIC(L2Fam=N1, neighbor=ContNeighborhood(),risk=asMSE(),
loRad=0.1, upRad=1.0)
(est2 <- oneStepEstimator(x, IC2, est0$estimate))
+
+
+## a simple example
+library(MASS)
+data(chem)
+initial.est <- c(median(chem), mad(chem))
+system.time(ROest1 <- roptest(chem, NormLocationScaleFamily(), eps.upper = 0.1, steps = 3L,
+ initial.est = initial.est, useLast = TRUE))
+
+## optimized for speed
+library(RobLox)
+system.time(ROest2 <- roblox(chem, eps.upper = 0.1, k = 3, returnIC = TRUE))
+
+## comparison
+estimate(ROest1)
+estimate(ROest2)
+
+## confidence intervals
+confint(ROest1, symmetricBias())
+confint(ROest2, symmetricBias())
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalScaleModel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalScaleModel.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalScaleModel.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -2,6 +2,7 @@
## Example: Normal Scale
###############################################################################
require(ROptEst)
+options("newDevice"=TRUE)
## generates Normal Scale Family with scale = 3
N0 <- NormScaleFamily(mean=2, sd=3)
@@ -70,3 +71,30 @@
risk=asMSE(), rho=0.5))
(N0.r.rho2 <- leastFavorableRadius(L2Fam=N0, neighbor=TotalVarNeighborhood(),
risk=asMSE(), rho=1/3))
+
+
+## For estimation use function roptest
+ind <- rbinom(1e2, size=1, prob=0.05)
+x <- rnorm(1e2, mean=1, sd = (1-ind)+ind*9)
+
+## 1-step: contamination known
+est1 <- roptest(x, eps = 0.05, L2Fam = NormScaleFamily(mean = 1))
+est1v <- roptest(x, eps = 0.025, L2Fam = NormScaleFamily(mean = 1),
+ neighbor = TotalVarNeighborhood())
+
+## k-step: contamination known
+est2 <- roptest(x, eps = 0.05, L2Fam = NormScaleFamily(mean = 1), steps = 3)
+est2v <- roptest(x, eps = 0.025, L2Fam = NormScaleFamily(mean = 1),
+ neighbor = TotalVarNeighborhood(), steps = 3)
+
+## comparison
+estimate(est1)
+estimate(est2)
+estimate(est1v)
+estimate(est2v)
+
+## confidence intervals
+confint(est1, symmetricBias())
+confint(est2, symmetricBias())
+confint(est1v, symmetricBias())
+confint(est2v, symmetricBias())
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/PoissonModel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/PoissonModel.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/PoissonModel.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -2,6 +2,7 @@
## Example: Poisson Family
###############################################################################
require(ROptEst)
+options("newDevice"=TRUE)
distroptions("TruncQuantile", 1e-10) # increases numerical support of Pois;
# i.e., increases precision of the
@@ -159,6 +160,7 @@
(est214 <- kStepEstimator(x, IC=IC10, start=est12, steps = 3L))
checkIC(pIC(est214))
+## Its simpler to use roptest!
(est215 <- roptest(x, PoisFamily(), eps.upper = 1/sqrt(length(x)), steps = 3L))
checkIC(pIC(est215))
@@ -169,7 +171,14 @@
estimate(est214)
estimate(est215)
+## confidence intervals
+confint(est211, symmetricBias())
+confint(est212, symmetricBias())
+confint(est213, symmetricBias())
+confint(est214, symmetricBias())
+confint(est215, symmetricBias())
+
## 2.2 amount of contamination unknown
IC11 <- radiusMinimaxIC(L2Fam=PoisFamily(lambda=estimate(est11)),
neighbor=ContNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -188,6 +197,7 @@
(est224 <- kStepEstimator(x, IC=IC12, start=est12, steps = 3L))
checkIC(pIC(est224))
+## Its simpler to use roptest!
(est225 <- roptest(x, PoisFamily(), eps.upper = 0.5, steps = 3L))
checkIC(pIC(est225))
@@ -198,6 +208,12 @@
estimate(est224)
estimate(est225)
+## confidence intervals
+confint(est221, symmetricBias())
+confint(est222, symmetricBias())
+confint(est223, symmetricBias())
+confint(est224, symmetricBias())
+confint(est225, symmetricBias())
## 3. k-step estimation: total variation neighborhood
## 3.1 small amount of contamination < 2%
@@ -219,6 +235,7 @@
(est314 <- kStepEstimator(x, IC=IC14, start=est12, steps = 3L))
checkIC(pIC(est314))
+## Its simpler to use roptest!
(est315 <- roptest(x, PoisFamily(), eps.upper = 1/sqrt(length(x)), steps = 3L,
neighbor = TotalVarNeighborhood()))
checkIC(pIC(est315))
@@ -230,7 +247,14 @@
estimate(est314)
estimate(est315)
+## confidence intervals
+confint(est311, symmetricBias())
+confint(est312, symmetricBias())
+confint(est313, symmetricBias())
+confint(est314, symmetricBias())
+confint(est315, symmetricBias())
+
## 3.2 amount of contamination unknown
IC15 <- radiusMinimaxIC(L2Fam=PoisFamily(lambda=estimate(est11)),
neighbor=TotalVarNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -249,6 +273,7 @@
(est324 <- kStepEstimator(x, IC=IC16, start=est12, steps = 3L))
checkIC(pIC(est324))
+## Its simpler to use roptest!
(est325 <- roptest(x, PoisFamily(), eps.upper = 0.5, steps = 3L,
neighbor = TotalVarNeighborhood()))
checkIC(pIC(est325))
@@ -260,4 +285,11 @@
estimate(est324)
estimate(est325)
+## confidence intervals
+confint(est321, symmetricBias())
+confint(est322, symmetricBias())
+confint(est323, symmetricBias())
+confint(est324, symmetricBias())
+confint(est325, symmetricBias())
+
distroptions("TruncQuantile", 1e-5) # default
Modified: branches/robast-0.7/pkg/ROptEst/inst/scripts/UnderOverShootRisk.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/inst/scripts/UnderOverShootRisk.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/inst/scripts/UnderOverShootRisk.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,7 +1,8 @@
###############################################################################
## Example: Normal Location
###############################################################################
-system.time(require(ROptEst))
+require(ROptEst)
+options("newDevice"=TRUE)
## generates Normal Location Family with mean = 0
N0 <- NormLocationFamily(mean=0)
@@ -103,11 +104,16 @@
N0.IC7 <- optIC(model=N0.Rob5, risk=asUnOvShoot(width = 1.960))
(Mest1 <- locMEstimator(X, IC=N0.IC7))
+## confidence interval
+confint(Mest1, symmetricBias())
+
N0.Rob6 <- FixRobModel(center = NormLocationFamily(mean = 0),
neighbor = ContNeighborhood(radius = 0.05))
N0.IC8 <- optIC(model = N0.Rob6, risk=fiUnOvShoot(width = 1.960/sqrt(n)), sampleSize = 1e2)
(Mest2 <- locMEstimator(X, IC=N0.IC8))
+## confidence interval
+confint(Mest2, symmetricBias())
## 3. Kolmogorov(-Smirnov) minimum distance estimator
(est0 <- MDEstimator(x=X, NormLocationFamily()))
@@ -117,7 +123,10 @@
neighbor = ContNeighborhood(radius=0.5))
N0.IC9 <- optIC(model=N0.Rob7, risk=asUnOvShoot(width = 1.960))
(est1 <- oneStepEstimator(X, IC = N0.IC9, start = estimate(est0)))
+confint(est1, symmetricBias())
+
N0.Rob8 <- FixRobModel(center = NormLocationFamily(mean = estimate(est0)),
neighbor = ContNeighborhood(radius=0.05))
N0.IC10 <- optIC(model=N0.Rob8, risk=fiUnOvShoot(width = 1.960/sqrt(n)), sampleSize = 1e2)
(est2 <- oneStepEstimator(X, IC = N0.IC10, start = estimate(est0)))
+confint(est2, symmetricBias())
Copied: branches/robast-0.7/pkg/ROptEst/man/0ROptEst-package.Rd (from rev 217, pkg/ROptEst/man/0ROptEst-package.Rd)
===================================================================
--- branches/robast-0.7/pkg/ROptEst/man/0ROptEst-package.Rd (rev 0)
+++ branches/robast-0.7/pkg/ROptEst/man/0ROptEst-package.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,64 @@
+\name{ROptEst-package}
+\alias{ROptEst-package}
+\alias{ROptEst}
+\docType{package}
+\title{
+Optimally robust estimation
+}
+\description{
+Optimally robust estimation in general smoothly parameterized models
+using S4 classes and methods.
+}
+\details{
+\tabular{ll}{
+Package: \tab ROptEst\cr
+Version: \tab 0.7\cr
+Date: \tab 2008-11-25\cr
+Depends: \tab R(>= 2.7.0), methods, distr(>= 2.0), distrEx(>= 2.0),
+distrMod(>= 2.0), RandVar(>= 0.6.4), RobAStBase\cr
+LazyLoad: \tab yes\cr
+License: \tab LGPL-3\cr
+URL: \tab http://robast.r-forge.r-project.org/\cr
+}
+}
+\author{
+Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de},\cr%
+Matthias Kohl \email{Matthias.Kohl at stamats.de}\cr
+
+Maintainer: Matthias Kohl \email{matthias.kohl at stamats.de}}
+\references{
+ M. Kohl (2005). Numerical Contributions to the Asymptotic Theory of Robustness.
+ Dissertation. University of Bayreuth.
+}
+\seealso{
+\code{\link[distr]{distr-package}}, \code{\link[distrEx]{distrEx-package}},
+\code{\link[distrMod]{distrMod-package}}, \code{\link[RandVar]{RandVar-package}},
+\code{\link[RobAStBase]{RobAStBase-package}}
+}
+\examples{
+library(ROptEst)
+
+## Example: Rutherford-Geiger (1910); cf. Feller~(1968), Section VI.7 (a)
+x <- c(rep(0, 57), rep(1, 203), rep(2, 383), rep(3, 525), rep(4, 532),
+ rep(5, 408), rep(6, 273), rep(7, 139), rep(8, 45), rep(9, 27),
+ rep(10, 10), rep(11, 4), rep(12, 0), rep(13, 1), rep(14, 1))
+
+## ML-estimate from package distrMod
+MLest <- MLEstimator(x, PoisFamily())
+MLest
+## confidence interval based on CLT
+confint(MLest)
+
+## compute optimally (w.r.t to MSE) robust estimator (unknown contamination)
+robest <- roptest(x, PoisFamily(), eps.upper = 0.1, steps = 3)
+estimate(robest)
+## check influence curve
+checkIC(pIC(robest))
+## plot influence curve
+plot(pIC(robest))
+## confidence interval based on LAN - neglecting bias
+confint(robest)
+## confidence interval based on LAN - including bias
+confint(robest, method = symmetricBias())
+}
+\keyword{package}
Copied: branches/robast-0.7/pkg/ROptEst/man/cniperCont.Rd (from rev 217, pkg/ROptEst/man/cniperCont.Rd)
===================================================================
--- branches/robast-0.7/pkg/ROptEst/man/cniperCont.Rd (rev 0)
+++ branches/robast-0.7/pkg/ROptEst/man/cniperCont.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,99 @@
+\name{cniperCont}
+\alias{cniperCont}
+\alias{cniperCont-methods}
+\alias{cniperCont,IC,IC,L2ParamFamily,ContNeighborhood,asMSE-method}
+\alias{cniperPoint}
+\alias{cniperPoint-methods}
+\alias{cniperPoint,L2ParamFamily,ContNeighborhood,asMSE-method}
+\alias{cniperPointPlot}
+\alias{cniperPointPlot-methods}
+\alias{cniperPointPlot,L2ParamFamily,ContNeighborhood,asMSE-method}
+\title{ Generic Functions for Computation and Plot of Cniper Contamination
+ and Cniper Points. }
+\description{
+ These generic functions and their methods can be used to determine cniper
+ contamination as well as cniper points. That is, under which (Dirac)
+ contamination is the risk of one procedure larger than the risk of some
+ other procedure.
+}
+\usage{
+cniperCont(IC1, IC2, L2Fam, neighbor, risk, ...)
+\S4method{cniperCont}{IC,IC,L2ParamFamily,ContNeighborhood,asMSE}(IC1,
+ IC2, L2Fam, neighbor, risk, lower, upper, n = 101)
+
+cniperPoint(L2Fam, neighbor, risk, ...)
+\S4method{cniperPoint}{L2ParamFamily,ContNeighborhood,asMSE}(L2Fam,
+ neighbor, risk, lower, upper)
+
+cniperPointPlot(L2Fam, neighbor, risk, ...)
+\S4method{cniperPointPlot}{L2ParamFamily,ContNeighborhood,asMSE}(L2Fam,
+ neighbor, risk, lower, upper, n = 101)
+}
+\arguments{
+ \item{IC1}{ object of class \code{IC} }
+ \item{IC2}{ object of class \code{IC} }
+ \item{L2Fam}{ object of class \code{L2ParamFamily} }
+ \item{neighbor}{ object of class \code{Neighborhood} }
+ \item{risk}{ object of class \code{RiskType} }
+ \item{\dots}{ additional parameters. }
+ \item{lower, upper}{ the lower and upper end points of the
+ contamination interval. }
+ \item{n}{ number of points between \code{lower} and \code{upper}}
+}
+\details{
+ In case of \code{cniperCont} the difference between the risks of two ICs
+ is plotted.
+
+ The function \code{cniperPoint} can be used to determine cniper
+ points. That is, points such that the optimally robust estimator
+ has smaller minimax risk than the classical optimal estimator under
+ contamination with Dirac measures at the cniper points.
+
+ As such points might be difficult to find, we provide the
+ function \code{cniperPointPlot} which can be used to obtain a plot
+ of the risk difference.
+
+ For more details about cniper contamination and cniper points we refer
+ to Section~3.5 of Kohl et al. (2008) as well as Ruckdeschel (2004) and
+ the Introduction of Kohl (2005).
+}
+\value{invisible() resp. cniper point is returned.}
+\references{
+ Kohl, M. and Ruckdeschel, H. and Rieder, H. (2008). Infinitesimally
+ Robust Estimation in General Smoothly Parametrized Models. Unpublished
+ Manuscript.
+
+ Kohl, M. (2005) \emph{Numerical Contributions to the Asymptotic Theory of Robustness}.
+ Bayreuth: Dissertation.
+
+ Ruckdeschel, P. (2004). Higher Order Asymptotics for the MSE of M-Estimators
+ on Shrinking Neighborhoods. Unpublished Manuscript.
+}
+\author{Matthias Kohl \email{Matthias.Kohl at stamats.de}}
+%\note{}
+%\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
+\examples{
+## cniper contamination
+P <- PoisFamily(lambda = 4)
+RobP1 <- InfRobModel(center = P, neighbor = ContNeighborhood(radius = 0.1))
+IC1 <- optIC(model=RobP1, risk=asMSE())
+RobP2 <- InfRobModel(center = P, neighbor = ContNeighborhood(radius = 1))
+IC2 <- optIC(model=RobP2, risk=asMSE())
+cniperCont(IC1 = IC1, IC2 = IC2, L2Fam = P,
+ neighbor = ContNeighborhood(radius = 0.5),
+ risk = asMSE(),
+ lower = 0, upper = 8, n = 101)
+
+## cniper point plot
+cniperPointPlot(P, neighbor = ContNeighborhood(radius = 0.5),
+ risk = asMSE(), lower = 0, upper = 10)
+
+## cniper point
+cniperPoint(P, neighbor = ContNeighborhood(radius = 0.5),
+ risk = asMSE(), lower = 0, upper = 4)
+cniperPoint(P, neighbor = ContNeighborhood(radius = 0.5),
+ risk = asMSE(), lower = 4, upper = 8)
+}
+\concept{cniper contamination}
+\concept{cniper point}
+\keyword{robust}
Modified: branches/robast-0.7/pkg/ROptEst/man/roptest.Rd
===================================================================
--- branches/robast-0.7/pkg/ROptEst/man/roptest.Rd 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptEst/man/roptest.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -111,15 +111,39 @@
x <- rbinom(100, size=25, prob=(1-ind)*0.25 + ind*0.9)
## ML-estimate
-MLEstimator(x, BinomFamily(size = 25))
+MLest <- MLEstimator(x, BinomFamily(size = 25))
+estimate(MLest)
+confint(MLest)
## compute optimally robust estimator (known contamination)
-roptest(x, BinomFamily(size = 25), eps = 0.05, steps = 3)
+robest1 <- roptest(x, BinomFamily(size = 25), eps = 0.05, steps = 3)
+estimate(robest1)
+confint(robest1, method = symmetricBias())
+## neglecting bias
+confint(robest1)
+plot(pIC(robest1))
## compute optimally robust estimator (unknown contamination)
-roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.2, steps = 3)
+robest2 <- roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.2, steps = 3)
+estimate(robest2)
+confint(robest2, method = symmetricBias())
+plot(pIC(robest2))
+## total variation neighborhoods (known deviation)
+robest3 <- roptest(x, BinomFamily(size = 25), eps = 0.025,
+ neighbor = TotalVarNeighborhood(), steps = 3)
+estimate(robest3)
+confint(robest3, method = symmetricBias())
+plot(pIC(robest3))
+## total variation neighborhoods (unknown deviation)
+robest4 <- roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.1,
+ neighbor = TotalVarNeighborhood(), steps = 3)
+estimate(robest4)
+confint(robest4, method = symmetricBias())
+plot(pIC(robest4))
+
+
#############################
## 2. Poisson data
#############################
@@ -129,28 +153,56 @@
rep(10, 10), rep(11, 4), rep(12, 0), rep(13, 1), rep(14, 1))
## ML-estimate
-MLEstimator(x, PoisFamily())
+MLest <- MLEstimator(x, PoisFamily())
+estimate(MLest)
+confint(MLest)
## compute optimally robust estimator (unknown contamination)
-roptest(x, PoisFamily(), eps.upper = 0.1, steps = 3)
+robest <- roptest(x, PoisFamily(), eps.upper = 0.1, steps = 3)
+estimate(robest)
+confint(robest, symmetricBias())
+plot(pIC(robest))
+## total variation neighborhoods (unknown deviation)
+robest1 <- roptest(x, PoisFamily(), eps.upper = 0.05,
+ neighbor = TotalVarNeighborhood(), steps = 3)
+estimate(robest1)
+confint(robest1, symmetricBias())
+plot(pIC(robest1))
+
+
#############################
## 3. Normal (Gaussian) location and scale
#############################
-## Generate a contaminated sample
-ind <- rbinom(100, size=1, prob=0.05)
-x <- rnorm(100, mean=0, sd=(1-ind) + ind*9)
+## 24 determinations of copper in wholemeal flour
+library(MASS)
+data(chem)
+plot(chem, main = "copper in wholemeal flour", pch = 20)
## ML-estimate
-MLEstimator(x, NormLocationScaleFamily())
+MLest <- MLEstimator(chem, NormLocationScaleFamily())
+estimate(MLest)
+confint(MLest)
## compute optimally robust estimator (known contamination)
-## takes some time
-roptest(x, NormLocationScaleFamily(), eps = 0.05, steps = 3)
+## takes some time -> you can use package RobLox for normal
+## location and scale which is optimized for speed
+robest <- roptest(chem, NormLocationScaleFamily(), eps = 0.05, steps = 3)
+estimate(robest)
+confint(robest, symmetricBias())
+plot(pIC(robest))
+## plot of relative and absolute information; cf. Kohl (2005)
+infoPlot(pIC(robest))
## compute optimally robust estimator (unknown contamination)
-## takes some time
-roptest(x, NormLocationScaleFamily(), eps.upper = 0.2, steps = 3)
+## takes some time -> use package RobLox!
+robest1 <- roptest(chem, NormLocationScaleFamily(), eps.lower = 0.05,
+ eps.upper = 0.1, steps = 3)
+estimate(robest1)
+confint(robest1, symmetricBias())
+plot(pIC(robest1))
+## plot of relative and absolute information; cf. Kohl (2005)
+infoPlot(pIC(robest1))
}
\concept{k-step construction}
\concept{optimally robust estimation}
Modified: branches/robast-0.7/pkg/ROptRegTS/DESCRIPTION
===================================================================
--- branches/robast-0.7/pkg/ROptRegTS/DESCRIPTION 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptRegTS/DESCRIPTION 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,13 +1,14 @@
Package: ROptRegTS
-Version: 0.7.0
-Date: 2008-10-06
+Version: 0.7
+Date: 2008-11-25
Title: Optimally robust estimation for regression-type models
-Description: Optimally robust estimation for regression-type
- models using S4 classes and methods
-Depends: R (>= 2.4.0), methods, distr(>= 1.9), distrEx(>= 1.9), RandVar(>= 0.6), ROptEst(>= 0.5.0)
+Description: Optimally robust estimation for regression-type models
+ using S4 classes and methods
+Depends: R (>= 2.4.0), methods, distr(>= 1.9), distrEx(>= 1.9),
+ RandVar(>= 0.6), ROptEst(>= 0.5.0)
Author: Matthias Kohl <Matthias.Kohl at stamats.de>, Peter Ruckdeschel
Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
LazyLoad: yes
-License: GPL version 2 or later
+License: LGPL-3
URL: http://robast.r-forge.r-project.org/
-Packaged: Mon Aug 6 08:09:59 2007; kohl
+Packaged: Mon Aug 6 08:09:59 2007; kohl
Modified: branches/robast-0.7/pkg/ROptRegTS/R/leastFavorableRadius.R
===================================================================
--- branches/robast-0.7/pkg/ROptRegTS/R/leastFavorableRadius.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptRegTS/R/leastFavorableRadius.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -8,6 +8,9 @@
function(L2Fam, neighbor, risk, rho, upRad = 1, z.start = NULL,
A.start = NULL, upper = 100, maxiter = 100,
tol = .Machine$double.eps^0.4, warn = FALSE){
+ ow <- options("warn")
+ on.exit(options(ow))
+
if(length(rho) != 1)
stop("'rho' is not of length == 1")
if((rho <= 0)||(rho >= 1))
@@ -22,6 +25,7 @@
lower <- ifelse(identical(all.equal(loRad, 0), TRUE), 1e-4, loRad)
upper <- ifelse(upRad == Inf, 10, upRad)
ow <- options("warn")
+ on.exit(options(ow))
options(warn = -1)
if(identical(all.equal(loRad, 0), TRUE)){
loRad <- 0
@@ -107,6 +111,7 @@
lower <- ifelse(identical(all.equal(loRad, 0), TRUE), 1e-4, loRad)
upper <- ifelse(upRad == Inf, 10, upRad)
ow <- options("warn")
+ on.exit(options(ow))
options(warn = -1)
trafo <- L2Fam at param@trafo
if(identical(all.equal(loRad, 0), TRUE)){
Modified: branches/robast-0.7/pkg/ROptRegTS/R/optIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptRegTS/R/optIC.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptRegTS/R/optIC.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -37,8 +37,9 @@
function(model, risk, z.start=NULL, A.start=NULL, upper = 1e4,
maxiter = 50, tol = .Machine$double.eps^0.4, warn = TRUE){
ErrorL2derivDim <- numberOfMaps(model at center@ErrorL2deriv)
+ ow <- options("warn")
+ on.exit(options(ow))
if(ErrorL2derivDim == 1){
- ow <- options("warn")
options(warn = -1)
res <- getInfRobRegTypeIC(ErrorL2deriv = model at center@ErrorL2derivDistr[[1]],
Regressor = model at center@RegDistr, risk = risk, neighbor = model at neighbor,
@@ -71,7 +72,6 @@
ErrorL2derivDistrSymm <- new("DistrSymmList", L2)
}
}
- ow <- options("warn")
options(warn = -1)
res <- getInfRobRegTypeIC(ErrorL2deriv = ErrorL2deriv,
Regressor = model at center@RegDistr, risk = risk, neighbor = model at neighbor,
@@ -96,10 +96,11 @@
setMethod("optIC", signature(model = "InfRobRegTypeModel", risk = "asUnOvShoot"),
function(model, risk, upper = 1e4, maxiter = 50, tol = .Machine$double.eps^0.4,
warn = TRUE){
+ ow <- options("warn")
+ on.exit(options(ow))
ErrorL2derivDistr <- model at center@ErrorL2derivDistr[[1]]
if((length(model at center@ErrorL2derivDistr) == 1) & is(ErrorL2derivDistr, "UnivariateDistribution")
& is(model at center@RegDistr, "UnivariateDistribution")){
- ow <- options("warn")
options(warn = -1)
res <- getInfRobRegTypeIC(ErrorL2deriv = ErrorL2derivDistr,
Regressor = model at center@RegDistr, risk = risk, neighbor = model at neighbor,
@@ -134,6 +135,8 @@
setMethod("optIC", signature(model = "FixRobRegTypeModel", risk = "fiUnOvShoot"),
function(model, risk, sampleSize, upper = 1e4, maxiter = 50,
tol = .Machine$double.eps^0.4, warn = TRUE, Algo = "A", cont = "left"){
+ ow <- options("warn")
+ on.exit(options(ow))
if(!identical(all.equal(sampleSize, trunc(sampleSize)), TRUE))
stop("'sampleSize' has to be an integer > 0")
if(is(model at center@ErrorDistr, "UnivariateDistribution")
@@ -142,7 +145,6 @@
if(!is(RegDistr, "AbscontDistribution"))
if(!identical(all.equal(d(RegDistr)(0), 0), TRUE))
stop("Solution only available under 'K(x=0)!=0'!")
- ow <- options("warn")
options(warn = -1)
res <- getFixRobRegTypeIC(ErrorDistr = model at center@ErrorDistr,
Regressor = RegDistr, risk = risk, neighbor = model at neighbor,
Modified: branches/robast-0.7/pkg/ROptRegTS/R/radiusMinimaxIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptRegTS/R/radiusMinimaxIC.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/ROptRegTS/R/radiusMinimaxIC.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -7,6 +7,10 @@
risk = "asGRisk"),
function(L2Fam, neighbor, risk, loRad, upRad, z.start = NULL, A.start = NULL,
upper = 1e4, maxiter = 100, tol = .Machine$double.eps^0.4, warn = FALSE){
+
+ ow <- options("warn")
+ on.exit(options(ow))
+
if(length(loRad) != 1)
stop("'loRad' is not of length == 1")
if(length(upRad) != 1)
@@ -15,7 +19,6 @@
stop("'upRad < loRad' is not fulfilled")
L2derivDim <- numberOfMaps(L2Fam at ErrorL2deriv)
if(L2derivDim == 1){
- ow <- options("warn")
options(warn = -1)
upper.b <- upper
lower <- ifelse(identical(all.equal(loRad, 0), TRUE), 1e-4, loRad)
@@ -102,7 +105,6 @@
}
}
trafo <- L2Fam at param@trafo
- ow <- options("warn")
options(warn = -1)
upper.b <- upper
lower <- ifelse(identical(all.equal(loRad, 0), TRUE), 1e-4, loRad)
Modified: branches/robast-0.7/pkg/RandVar/DESCRIPTION
===================================================================
--- branches/robast-0.7/pkg/RandVar/DESCRIPTION 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RandVar/DESCRIPTION 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,12 +1,13 @@
Package: RandVar
-Version: 0.7.0
-Date: 2008-10-06
+Version: 0.7
+Date: 2008-11-25
Title: Implementation of random variables
-Description: Implementation of random variables by means
- of S4 classes and methods
-Depends: R (>= 2.4.0), methods, startupmsg, distr(>= 1.9), distrEx(>= 1.9)
-Author: Matthias Kohl
+Description: Implementation of random variables by means of S4 classes
+ and methods
+Depends: R (>= 2.7.0), methods, startupmsg, distr(>= 2.0), distrEx(>=
+ 2.0)
+Author: Matthias Kohl, Peter Ruckdeschel
Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
LazyLoad: yes
-License: GPL version 2 or later
+License: LGPL-3
URL: http://robast.r-forge.r-project.org/
Modified: branches/robast-0.7/pkg/RandVar/R/util.R
===================================================================
--- branches/robast-0.7/pkg/RandVar/R/util.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RandVar/R/util.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,9 +1,12 @@
## small util if imageDistr fails
-.getImageDistr <- function(f, distr)
-{ if (is(distr, "DiscreteDistribution"))
- return(DiscreteDistribution(prob=d(distr)(support(distr)), supp=f(support(distr))))
- if (is(try(return(f(distr)), silent = TRUE),
- "try-error")){
- rl <- function(n) { xr <- r(distr)(n); f(xr) }
- return(AbscontDistribution( r = rl, .withArith = TRUE, .withSim = TRUE))}
-}
\ No newline at end of file
+.getImageDistr <- function(f, distr){
+ if (is(distr, "DiscreteDistribution"))
+ return(DiscreteDistribution(prob=d(distr)(support(distr)), supp=f(support(distr))))
+ if(is(try(return(f(distr)), silent = TRUE), "try-error")){
+ rl <- function(n){
+ xr <- r(distr)(n)
+ f(xr)
+ }
+ return(AbscontDistribution(r = rl, .withArith = TRUE, .withSim = TRUE))
+ }
+}
\ No newline at end of file
Modified: branches/robast-0.7/pkg/RandVar/chm/00Index.html
===================================================================
--- branches/robast-0.7/pkg/RandVar/chm/00Index.html 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RandVar/chm/00Index.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -10,7 +10,7 @@
<param name="keyword" value=".. contents">
</object>
-<h2>Help pages for package ‘RandVar’ version 0.6.3</h2>
+<h2>Help pages for package ‘RandVar’ version 0.6.5</h2>
<p align="center">
<a href="#"></a>
@@ -35,7 +35,7 @@
<h2><a name=" ">-- --</a></h2>
<table width="100%">
-<tr><td width="25%"><a href="RandVar-package.html">RandVar-package</a></td>
+<tr><td width="25%"><a href="0RandVar-package.html">RandVar-package</a></td>
<td>Implementation of random variables </td></tr>
</table>
@@ -286,7 +286,7 @@
<h2><a name="R">-- R --</a></h2>
<table width="100%">
-<tr><td width="25%"><a href="RandVar-package.html">RandVar</a></td>
+<tr><td width="25%"><a href="0RandVar-package.html">RandVar</a></td>
<td>Implementation of random variables </td></tr>
<tr><td width="25%"><a href="RandVariable.html">RandVariable</a></td>
<td>Generating function for RandVariable-class</td></tr>
Modified: branches/robast-0.7/pkg/RandVar/chm/RandVar.chm
===================================================================
(Binary files differ)
Modified: branches/robast-0.7/pkg/RandVar/chm/RandVar.hhp
===================================================================
--- branches/robast-0.7/pkg/RandVar/chm/RandVar.hhp 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RandVar/chm/RandVar.hhp 2008-11-25 10:41:15 UTC (rev 218)
@@ -12,6 +12,7 @@
[FILES]
00Index.html
+0RandVar-package.html
EuclRandMatrix-class.html
EuclRandMatrix.html
EuclRandVarList-class.html
@@ -19,7 +20,6 @@
EuclRandVariable-class.html
EuclRandVariable.html
OptionalrSpace-class.html
-RandVar-package.html
RandVariable-class.html
RandVariable.html
RealRandVariable-class.html
Modified: branches/robast-0.7/pkg/RandVar/chm/RandVar.toc
===================================================================
--- branches/robast-0.7/pkg/RandVar/chm/RandVar.toc 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RandVar/chm/RandVar.toc 2008-11-25 10:41:15 UTC (rev 218)
@@ -11,7 +11,7 @@
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="RandVar-package">
-<param name="Local" value="RandVar-package.html">
+<param name="Local" value="0RandVar-package.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="%*%,EuclRandMatrix,EuclRandMatrix-method">
@@ -419,7 +419,7 @@
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="RandVar">
-<param name="Local" value="RandVar-package.html">
+<param name="Local" value="0RandVar-package.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="RandVariable">
@@ -532,7 +532,7 @@
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Implementation of random variables ">
-<param name="Local" value="RandVar-package.html">
+<param name="Local" value="0RandVar-package.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="List of Euclidean random variables">
Modified: branches/robast-0.7/pkg/RandVar/inst/doc/RandVar.Rnw
===================================================================
--- branches/robast-0.7/pkg/RandVar/inst/doc/RandVar.Rnw 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RandVar/inst/doc/RandVar.Rnw 2008-11-25 10:41:15 UTC (rev 218)
@@ -136,6 +136,7 @@
we can for instance generate
<<exa1, eval = TRUE>>=
library(RandVar)
+distroptions("withSweave" = TRUE) ## only for use in Sweave - document; set to FALSE else!
(X <- RealRandVariable(Map = list(function(x){x}, function(x){x^2}), Domain = Reals(), Range = Reals()))
Map(X)
evalRandVar(X, 2)
Modified: branches/robast-0.7/pkg/RandVar/inst/doc/RandVar.pdf
===================================================================
(Binary files differ)
Copied: branches/robast-0.7/pkg/RandVar/man/0RandVar-package.Rd (from rev 217, pkg/RandVar/man/0RandVar-package.Rd)
===================================================================
--- branches/robast-0.7/pkg/RandVar/man/0RandVar-package.Rd (rev 0)
+++ branches/robast-0.7/pkg/RandVar/man/0RandVar-package.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,39 @@
+\name{RandVar-package}
+\alias{RandVar-package}
+\alias{RandVar}
+\docType{package}
+\title{
+Implementation of random variables
+}
+\description{
+Implementation of random variables by means of S4 classes and methods.
+}
+\details{
+\tabular{ll}{
+Package: \tab RandVar\cr
+Version: \tab 0.7\cr
+Date: \tab 2008-11-25\cr
+Depends: \tab R (>= 2.7.0), methods, startupmsg, distr(>= 2.0), distrEx(>=
+2.0)\cr
+LazyLoad: \tab yes\cr
+License: \tab LGPL-3\cr
+URL: \tab http://robast.r-forge.r-project.org/\cr
+}
+}
+\author{
+Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de},\cr%
+Matthias Kohl \email{Matthias.Kohl at stamats.de}\cr
+
+Maintainer: Matthias Kohl \email{matthias.kohl at stamats.de}}
+\references{
+ M. Kohl (2005). Numerical Contributions to the Asymptotic Theory of Robustness.
+ Dissertation. University of Bayreuth.
+}
+\seealso{
+\code{\link[distr]{distr-package}}, \code{\link[distrEx]{distrEx-package}}
+}
+\examples{
+library(RandVar)
+#vignette("RandVar")
+}
+\keyword{package}
Modified: branches/robast-0.7/pkg/RobAStBase/DESCRIPTION
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/DESCRIPTION 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/DESCRIPTION 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,11 +1,13 @@
Package: RobAStBase
-Version: 0.7.0
-Date: 2008-10-06
+Version: 0.2
+Date: 2008-11-25
Title: Robust Asymptotic Statistics
-Description: Base S4-classes and functions for robust asymptotic statistics.
-Depends: R(>= 2.6.0), methods, distr(>= 2.0), distrEx(>= 2.0), distrMod(>= 2.0), RandVar(>= 0.6.3)
+Description: Base S4-classes and functions for robust asymptotic
+ statistics.
+Depends: R(>= 2.7.0), methods, distr(>= 2.0), distrEx(>= 2.0),
+ distrMod(>= 2.0), RandVar(>= 0.6.3)
Author: Matthias Kohl, Peter Ruckdeschel
Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
LazyLoad: yes
-License: GPL version 2 or later
+License: LGPL-3
URL: http://robast.r-forge.r-project.org/
Modified: branches/robast-0.7/pkg/RobAStBase/NAMESPACE
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/NAMESPACE 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/NAMESPACE 2008-11-25 10:41:15 UTC (rev 218)
@@ -17,6 +17,7 @@
exportClasses("RobAStControl", "RobWeight", "BoundedWeight",
"BdStWeight", "HampelWeight")
exportClasses("ALEstimate", "kStepEstimate", "MEstimate")
+exportClasses("cutoff")
exportMethods("show",
"plot")
exportMethods("type", "radius")
@@ -54,8 +55,12 @@
exportMethods("pIC", "asbias",
"steps",
"Mroot")
+exportMethods("ddPlot")
+exportMethods("cutoff.quantile", "cutoff.quantile<-")
export("ContNeighborhood", "TotalVarNeighborhood")
export("FixRobModel", "InfRobModel")
export("InfluenceCurve", "IC", "ContIC", "TotalVarIC")
export(".eq", ".getDistr")
export("RobAStBaseOptions", "getRobAStBaseOption")
+export("cutoff","cutoff.chisq","cutoff.sememp")
+export("outlyingPlotIC")
Modified: branches/robast-0.7/pkg/RobAStBase/R/AllClass.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/AllClass.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/AllClass.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -255,3 +255,12 @@
untransformed.estimate = NULL,
untransformed.asvar = NULL),
contains = "ALEstimate")
+#################################################
+## "cutoff" class
+#################################################
+setClass("cutoff", representation = representation(name = "character",
+ fct = "function",
+ cutoff.quantile = "numeric"),
+ prototype = prototype(name = "empirical",
+ fct = function(data) quantile(data),
+ cutoff.quantile = 0.95))
Modified: branches/robast-0.7/pkg/RobAStBase/R/AllGeneric.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/AllGeneric.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/AllGeneric.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -179,3 +179,14 @@
if(!isGeneric("modifyIC")){
setGeneric("modifyIC", function(object) standardGeneric("modifyIC"))
}
+if(!isGeneric("cutoff.quantile")){
+ setGeneric("cutoff.quantile", function(object) standardGeneric("cutoff.quantile"))
+}
+if(!isGeneric("cutoff.quantile<-")){
+ setGeneric("cutoff.quantile<-", function(object,value)
+ standardGeneric("cutoff.quantile<-"))
+}
+if(!isGeneric("ddPlot")){
+ setGeneric("ddPlot", function(data, dist.x, dist.y, cutoff.x, cutoff.y,...)
+ standardGeneric("ddPlot"))
+}
Modified: branches/robast-0.7/pkg/RobAStBase/R/AllPlot.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/AllPlot.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/AllPlot.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -112,9 +112,11 @@
}
- w0 <- options("warn")
+ w0 <- getOption("warn")
options(warn = -1)
+ on.exit(options(warn = w0))
opar <- par()
+ on.exit(par=opar)
if (!withSweave)
devNew()
nrows <- trunc(sqrt(dims))
@@ -160,7 +162,5 @@
mtext(text = sub, side = 1, cex = cex.sub, adj = .5,
outer = TRUE, line = -1.6, col = col.sub)
- par(opar)
- options(w0)
invisible()
})
Modified: branches/robast-0.7/pkg/RobAStBase/R/bALEstimate.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/bALEstimate.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/bALEstimate.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -6,3 +6,158 @@
setMethod("asbias", "ALEstimate", function(object) object at asbias)
setMethod("steps", "kStepEstimate", function(object) object at steps)
setMethod("Mroot", "MEstimate", function(object) object at Mroot)
+
+setMethod("confint", signature(object="ALEstimate", method="missing"),
+ function(object, method, level = 0.95) {
+ objN <- paste(deparse(substitute(object)),sep="",collapse="")
+
+ if(is.null(object at asvar)){
+ cat(gettextf("Slot 'asvar' of object %s has not (yet) been filled.\n", objN))
+ return(NULL)
+ }
+
+ sd0 <- sqrt(diag(object at asvar)/object at samplesize)
+ names(sd0) <- names(object at estimate)
+
+### code borrowed from confint.default from package stats
+ a <- (1 - level)/2
+ a <- c(a, 1 - a)
+ pct <- stats:::format.perc(a, 3)
+ fac <- qnorm(a)
+ ci <- array(NA, dim = c(length(object at estimate), 2),
+ dimnames = list(names(object at estimate), pct))
+ ci[] <- main(object) + sd0 %o% fac
+### end of borrowed code
+
+ new("Confint", type = gettext("asymptotic (LAN-based)"),
+ samplesize.estimate = object at samplesize,
+ call.estimate = object at estimate.call,
+ name.estimate = object at name,
+ trafo.estimate = object at trafo,
+ nuisance.estimate = nuisance(object),
+ fixed.estimate = fixed(object),
+ confint = ci)
+})
+
+setMethod("confint", signature(object="ALEstimate", method="symmetricBias"),
+ function(object, method, level = 0.95) {
+ objN <- paste(deparse(substitute(object)),sep="",collapse="")
+
+ if(is.null(object at asvar)){
+ cat(gettextf("Slot 'asvar' of object %s has not (yet) been filled.\n", objN))
+ return(NULL)
+ }
+ if(is.null(object at asbias)){
+ cat(gettextf("Slot 'asbias' of object %s has not (yet) been filled.\n", objN))
+ return(confint(object))
+ }
+
+ sd0 <- sqrt(diag(object at asvar)/object at samplesize)
+ names(sd0) <- names(object at estimate)
+
+### code borrowed from confint.default from package stats
+ a <- (1 - level)/2
+ a <- c(a, 1 - a)
+ pct <- stats:::format.perc(a, 3)
+ fac <- qnorm(a, mean = c(-object at asbias, object at asbias))
+ ci <- array(NA, dim = c(length(object at estimate), 2),
+ dimnames = list(names(object at estimate), pct))
+ ci[] <- main(object) + sd0 %o% fac
+### end of borrowed code
+
+ new("Confint", type = c(
+ gettext("asymptotic (LAN-based), uniform (bias-aware)\n"),
+ gettextf("for %s", name(method))
+ ),
+ samplesize.estimate = object at samplesize,
+ call.estimate = object at estimate.call,
+ name.estimate = object at name,
+ trafo.estimate = object at trafo,
+ nuisance.estimate = nuisance(object),
+ fixed.estimate = fixed(object),
+ confint = ci)
+})
+
+setMethod("confint", signature(object="ALEstimate", method="onesidedBias"),
+ function(object, method, level = 0.95) {
+ objN <- paste(deparse(substitute(object)),sep="",collapse="")
+
+ if(is.null(object at asvar)){
+ cat(gettextf("Slot 'asvar' of object %s has not (yet) been filled.\n", objN))
+ return(NULL)
+ }
+ if(is.null(object at asbias)){
+ cat(gettextf("Slot 'asbias' of object %s has not (yet) been filled.\n", objN))
+ return(confint(object))
+ }
+
+ sd0 <- sqrt(diag(object at asvar)/object at samplesize)
+ names(sd0) <- names(object at estimate)
+
+### code borrowed from confint.default from package stats
+ a <- (1 - level)/2
+ a <- c(a, 1 - a)
+ pct <- stats:::format.perc(a, 3)
+ if(method at sign == -1)
+ M <- c(-object at asbias, 0)
+ else
+ M <- c(0, object at asbias)
+ fac <- qnorm(a, mean = M)
+ ci <- array(NA, dim = c(length(object at estimate), 2),
+ dimnames = list(names(object at estimate), pct))
+ ci[] <- main(object) + sd0 %o% fac
+### end of borrowed code
+
+ new("Confint", type = c(
+ gettext("asymptotic (LAN-based), uniform (bias-aware)\n"),
+ gettextf("for %s", name(method))
+ ),
+ samplesize.estimate = object at samplesize,
+ call.estimate = object at estimate.call,
+ name.estimate = object at name,
+ trafo.estimate = object at trafo,
+ nuisance.estimate = nuisance(object),
+ fixed.estimate = fixed(object),
+ confint = ci)
+})
+
+setMethod("confint", signature(object="ALEstimate", method="asymmetricBias"),
+ function(object, method, level = 0.95) {
+ objN <- paste(deparse(substitute(object)),sep="",collapse="")
+
+ if(is.null(object at asvar)){
+ cat(gettextf("Slot 'asvar' of object %s has not (yet) been filled.\n", objN))
+ return(NULL)
+ }
+ if(is.null(object at asbias)){
+ cat(gettextf("Slot 'asbias' of object %s has not (yet) been filled.\n", objN))
+ return(confint(object))
+ }
+
+ sd0 <- sqrt(diag(object at asvar)/object at samplesize)
+ names(sd0) <- names(object at estimate)
+
+### code borrowed from confint.default from package stats
+ a <- (1 - level)/2
+ a <- c(a, 1 - a)
+ pct <- stats:::format.perc(a, 3)
+ fac <- qnorm(a, mean = c(-object at asbias, object at asbias)/method at nu)
+ ci <- array(NA, dim = c(length(object at estimate), 2),
+ dimnames = list(names(object at estimate), pct))
+ ci[] <- main(object) + sd0 %o% fac
+### end of borrowed code
+
+ nuround <- round(nu,3)
+ new("Confint", type = c(
+ gettext("asymptotic (LAN-based), uniform (bias-aware)\n"),
+ gettextf("for %s with nu =(%f,%f)",
+ name(method), nuround[1], nuround[2])
+ ),
+ samplesize.estimate = object at samplesize,
+ call.estimate = object at estimate.call,
+ name.estimate = object at name,
+ trafo.estimate = object at trafo,
+ nuisance.estimate = nuisance(object),
+ fixed.estimate = fixed(object),
+ confint = ci)
+})
Modified: branches/robast-0.7/pkg/RobAStBase/R/comparePlot.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/comparePlot.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/comparePlot.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -160,9 +160,11 @@
}
- w0 <- options("warn")
+ w0 <- getOption("warn")
options(warn = -1)
+ on.exit(options(warn = w0))
opar <- par()
+ on.exit(par(opar))
nrows <- trunc(sqrt(dims))
ncols <- ceiling(dims/nrows)
par(mfrow = c(nrows, ncols))
@@ -217,7 +219,5 @@
outer = TRUE, line = -1.6, col = col.sub)
- par(opar)
- options(w0)
invisible()
})
Copied: branches/robast-0.7/pkg/RobAStBase/R/cutoff-class.R (from rev 217, pkg/RobAStBase/R/cutoff-class.R)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/cutoff-class.R (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/R/cutoff-class.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,52 @@
+
+
+setMethod("cutoff.quantile", "cutoff", function(object)object at cutoff.quantile)
+setReplaceMethod("cutoff.quantile", "cutoff", function(object, value){
+ object at cutoff.quantile<-value; object})
+
+setMethod("fct", "cutoff", function(object)object at fct)
+setMethod("name", "cutoff", function(object)object at name)
+
+
+
+cutoff <- function(name = "empirical",
+ body.fct0,
+ cutoff.quantile = 0.95,
+ norm = NormType(), QF, nsim = 100000){
+ mc <- match.call()
+ if (missing(body.fct0)) body.fct0 <- quote(quantile(slot(norm,"fct")(data), cutoff.quantile))
+ arglist <- list()
+ arglist$norm <- if (!is.null(mc$norm)) mc$norm else NormType()
+ QFsub <- if(is.null(mc$QF))
+ quote({QF <- if(is(norm,"QFNorm"))
+ QuadForm(norm) else diag(nrow(data))})
+ else quote({})
+ arglist$cutoff.quantile <- if (!is.null(mc$cutoff.quantile))
+ mc$cutoff.quantile else 0.95
+ arglist$nsim <- if (!is.null(mc$nsim)) mc$nsim else 100000
+ arglist$QFsub0 <- substitute(QFsub)
+ arglist$body.fct1 <- body.fct0
+ fct0 <- function(data){}
+ body(fct0) <- #eval(
+ substitute({
+ QFsub0
+ body.fct1
+ }, arglist)
+ #)
+ new("cutoff", fct = fct0, name = name, cutoff.quantile = cutoff.quantile)
+}
+
+cutoff.sememp <- function(){cutoff(name = "semi-empirical",
+ body.fct0 = substitute({n.05 <- chol(QF)
+# print(QF)
+ N0 <- matrix(rnorm(nsim*nrow(QF)),ncol=ncol(QF))
+ N0 <- N0 %*% n.05
+ quantile((rowSums(N0^2))^.5,cutoff.quantile)
+ }),
+ cutoff.quantile = 0.95)}
+
+cutoff.chisq <- function(){cutoff(name = "chisq",
+ body.fct0 = substitute({dim = nrow(data)
+ qchisq(df=dim,cutoff.quantile)^.5
+ }),
+ cutoff.quantile = 0.95)}
Copied: branches/robast-0.7/pkg/RobAStBase/R/ddPlot.R (from rev 217, pkg/RobAStBase/R/ddPlot.R)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/ddPlot.R (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/R/ddPlot.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,44 @@
+setMethod("ddPlot", signature = signature(data = "matrix"),
+ function(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff){
+ mc <- match.call(expand.dots = FALSE, call = sys.call(sys.parent(1)))
+ dots <- mc$"..."
+
+do.call(.ddPlot.MatNtNtCoCo, args = c(list(data=data), dots, list(dist.x = mc$dist.x,
+ dist.y = mc$dist.y, cutoff.x = mc$cutoff.x, cutoff.y = mc$cutoff.y,
+ cutoff.quantile.x = mc$cutoff.quantile.x, cutoff.quantile.y = mc$cutoff.quantile.y,
+ transform.x = mc$transform.x, transform.y = mc$transform.y,
+ id.n = mc$id.n, lab.pts = mc$lab.pts, adj = mc$adj, cex.idn = mc$cex.idn,
+ col.idn = mc$col.idn, lty.cutoff = mc$lty.cutoff,
+ lwd.cutoff = mc$lwd.cutoff, col.cutoff = mc$col.cutoff)))
+})
+
+setMethod("ddPlot", signature = signature(data = "data.frame"),
+ function(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff){
+
+ mc <- match.call(call = sys.call(sys.parent(1)))
+ mc$data <- t(as.matrix(data))
+ do.call(ddPlot,args = as.list(mc[-1]))
+ })
+
+setMethod("ddPlot", signature = signature(data = "numeric"),
+ function(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff){
+
+ mc <- match.call(call = sys.call(sys.parent(1)))
+ mc$data <- matrix(data,nrow=1)
+ do.call(ddPlot,args = as.list(mc[-1]))
+ })
Copied: branches/robast-0.7/pkg/RobAStBase/R/ddPlot_utils.R (from rev 217, pkg/RobAStBase/R/ddPlot_utils.R)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/ddPlot_utils.R (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/R/ddPlot_utils.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,153 @@
+.ddPlot.MatNtNtCoCo <- function(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, lab.pts, adj =0, cex.idn = 1,
+ col.idn = par("col"), lty.cutoff,
+ lwd.cutoff, col.cutoff = "red"){
+
+ dots <- match.call(expand.dots = FALSE)$"..."
+
+ id.n1 <- 1:ncol(data)
+
+ if(missing(id.n) || is.null(id.n))
+ id.n <- id.n1
+
+
+ if(missing(lab.pts)|| is.null(lab.pts)){
+ lab.pts <- if(!is.null(colnames(data))) colnames(data) else 1:ncol(data)
+ }
+
+ data <- data[,id.n, drop = FALSE]
+ lab.pts <- lab.pts[id.n]
+ id.n1 <- id.n1[id.n]
+
+ id.n0 <- 1:length(id.n)
+
+ data.x <- if(missing(transform.x)||is.null(transform.x)) data else
+ transform.x(data)
+ #if(!is(IC.x,"IC")) stop("Argument 'IC.x' of 'ddPlot' must be an 'IC'")
+ # apply(data,2,function(xx) evalIC(IC.x,xx))}
+ data.y <- if(missing(transform.y)||is.null(transform.y)) data else
+ transform.y(data)
+ #if(!is(IC.y,"IC")) stop("Argument 'IC.y' of 'ddPlot' must be an 'IC'")
+ # apply(data,2,function(xx) evalIC(IC.y,xx))}
+
+
+ if(is.null(dist.x)) dist.x <- NormType()
+ if(is.null(dist.y)) dist.y <- NormType()
+ if(is.null(dots$xlab)) dots$xlab <- name(dist.x)
+ if(is.null(dots$ylab)) dots$ylab <- name(dist.y)
+
+ if(is.null(cutoff.quantile.x))
+ cutoff.quantile.x <- 0.95
+
+ if(is.null(cutoff.quantile.y))
+ cutoff.quantile.y <- cutoff.quantile.x
+
+ if(is.null(cutoff.x))
+ cutoff.x <- cutoff(norm = dist.x, cutoff.quantile = cutoff.quantile.x)
+ else {assign("norm", dist.x, environment(fct(cutoff.x)))
+ assign("cutoff.quantile", cutoff.quantile.x, environment(fct(cutoff.x)))}
+
+ if(is.null(cutoff.y))
+ cutoff.y <- cutoff(norm = dist.y, cutoff.quantile = cutoff.quantile.y)
+ else {assign("norm", dist.y, environment(fct(cutoff.y)))
+ assign("cutoff.quantile", cutoff.quantile.y, environment(fct(cutoff.y)))}
+
+ if(!is(dist.x, "NormType")) stop("Argument 'dist.x' of 'ddPlot' must be of class 'NormType'")
+ if(!is(dist.y, "NormType")) stop("Argument 'dist.y' of 'ddPlot' must be of class 'NormType'")
+ if(!is(cutoff.x, "cutoff")) stop("Argument 'cutoff.x' of 'ddPlot' must be of class 'cutoff'")
+ if(!is(cutoff.y, "cutoff")) stop("Argument 'cutoff.y' of 'ddPlot' must be of class 'cutoff'")
+
+ ndata.x <- fct(dist.x)(data.x)
+ ndata.y <- fct(dist.y)(data.y)
+
+
+ if(is.null(adj)) adj <- 0
+ if(is.null(cex.idn)) cex.idn <- 1
+ if(is.null(col.idn)) col.idn <- par("col")
+ if(is.null(col.cutoff)) col.cutoff <- "red"
+
+ if(is.null(dots$lwd)) dots$lwd <- par("lwd")
+ if(is.null(dots$lty)) dots$lty <- par("lty")
+
+
+ pdots <- dots
+ pdots$type <- NULL
+ pdots$x <- NULL
+ pdots$y <- NULL
+ pdots$offset <- NULL
+ pdots$pos <- NULL
+ pdots$log <- NULL
+ pdots$untf <- NULL
+
+ abdots <- pdots
+ abdots$col <- col.cutoff
+ if(!missing(lwd.cutoff)) abdots$lwd <- lwd.cutoff
+ if(!missing(lty.cutoff)) abdots$lty <- lty.cutoff
+ abdots$pos <- NULL
+ abdots$untf <- dots$untf
+ abdots$adj <- NULL
+
+ adots <- pdots
+ adots$col <- pdots$col.axis
+ adots$lty <- pdots$lty.axis
+ adots$adj <- par("adj")
+
+ tdots <- pdots
+ tdots$cex <- cex.idn
+ tdots$col <- col.idn
+ tdots$offset <- dots$offset
+ tdots$pos <- dots$pos
+ tdots$adj <- adj
+
+ pdots$axes <- FALSE
+ pdots$log <- dots$log
+ pdots$adj <- par("adj")
+
+ ####
+
+ co.x <- fct(cutoff.x)(data.x)
+ co.y <- fct(cutoff.y)(data.y)
+# print(quantile(ndata.x))
+# print(co.x)
+# print(fct(cutoff.x))
+# print(dist.x)
+# print(get("norm", environment(fct(cutoff.x))))
+# print(quantile(ndata.y))
+# print(co.y)
+# print(fct(cutoff.y))
+# print(get("norm", environment(fct(cutoff.y))))
+##
+
+ if(!is.null(dots$xlim))
+ if(is.logical(dots$xlim))
+ if(dots$xlim) pdots$xlim <- c(min(ndata.x)/1.03,max(ndata.x,co.x)*1.03)
+ if(!is.null(dots$ylim))
+ if(is.logical(dots$ylim))
+ if(dots$ylim) pdots$ylim <- c(min(ndata.y)/1.03,max(ndata.y,co.y)*1.03)
+
+
+ id.x <- id.n0[ndata.x >= co.x*.999]
+ id.y <- id.n0[ndata.y >= co.y*.999]
+ id.xy <- intersect(id.x,id.y)
+
+
+ id0.xy <- id.n1[id.xy]
+ id0.x <- id.n1[id.x]
+ id0.y <- id.n1[id.y]
+
+ do.call(plot, args = c(list(x = ndata.x,ndata.y, type = "p"), pdots))
+ do.call(box,args=c(adots))
+ do.call(abline, args = c(list(h=co.y), abdots))
+ do.call(abline, args = c(list(v=co.x), abdots))
+ if(length(id.xy))
+ do.call(text, args = c(list(ndata.x[id.xy], ndata.y[id.xy],
+ labels=lab.pts[id.xy]), tdots))
+ return(list(id.x=id0.x, id.y= id0.y, id.xy = id0.xy,
+ qtx = quantile(ndata.x), qty = quantile(ndata.y),
+ cutoff.x.v = co.x, cutoff.y.v = co.y
+ ))
+}
Modified: branches/robast-0.7/pkg/RobAStBase/R/infoPlot.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/infoPlot.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/infoPlot.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -23,8 +23,6 @@
dotsP <- dotsL <- dotsT <- dots
- print(dots)
- print(lwd)
e1 <- L2Fam at distribution
if(!is(e1, "UnivariateDistribution") | is(e1, "CondDistribution"))
stop("not yet implemented")
@@ -144,11 +142,13 @@
absInfo <- sapply(x.vec, absInfo at Map[[1]])
- w0 <- options("warn")
+ w0 <- getOption("warn")
options(warn = -1)
+ on.exit(options(warn = w0))
opar <- par()
- if (!withSweave)
- devNew()
+ on.exit(par(opar))
+# if (!withSweave)
+# devNew()
omar <- par("mar")
parArgs <- list(mar = c(bmar,omar[2],tmar,omar[4]))
@@ -166,7 +166,7 @@
ylab = "absolute information"), dotsP))
do.call(lines, args=c(list(x.vec, absInfo, type = plty, lty = lty),
dotsL))
- legend(max(x.vec), 0, xjust = 1, yjust = 0,
+ legend("top",
legend = c("class. opt. IC", objectc),
lty = c(lty,"dashed"), col = c(colI, col),
lwd=c(lwdI, lwd), cex = 0.75)
@@ -205,7 +205,7 @@
yc.vec <- sapply(x.vec, classIC.i.5 at Map[[i]])^2/absInfoClass
do.call(lines, args=c(list(x.vec, yc.vec, type = plty,
lty = "dashed"), dotsL))
- legend(max(x.vec), 1.1, xjust = 1,
+ legend("topright",
legend = c("class. opt. IC", objectc), lty = c(lty,"dashed"),
col = c(colI, col), lwd=c(lwdI, lwd),
cex = 0.6)
@@ -227,8 +227,6 @@
outer = TRUE, line = -1.6, col = col.sub)
- par(opar)
- options(w0)
}
})
\ No newline at end of file
Modified: branches/robast-0.7/pkg/RobAStBase/R/kStepEstimator.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/kStepEstimator.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/kStepEstimator.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -29,7 +29,7 @@
if(steps == 1){
if(useLast && !is(modifyIC(IC), "NULL") ){
newParam <- param(L2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(L2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("kStepEstimator",
@@ -76,7 +76,7 @@
start <- res
newL2Fam <- eval(CallL2Fam(IC))
newParam <- param(newL2Fam)
- main(newParam) <- start
+ main(newParam)[] <- start
newL2Fam <- modifyModel(newL2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
res <- start + rowMeans(evalIC(IC, as.matrix(x)), na.rm = TRUE)
@@ -84,7 +84,7 @@
if(useLast){
newL2Fam <- eval(CallL2Fam(IC))
newParam <- param(newL2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(newL2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("kStepEstimator",
@@ -151,7 +151,7 @@
if(steps == 1){
if(useLast && !is(modifyIC(IC), "NULL") ){
newParam <- param(L2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(L2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("kStepEstimator",
@@ -198,7 +198,7 @@
start <- res
newL2Fam <- eval(CallL2Fam(IC))
newParam <- param(newL2Fam)
- main(newParam) <- start
+ main(newParam)[] <- start
newL2Fam <- modifyModel(newL2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
res <- start + rowMeans(evalIC(IC, x), na.rm = TRUE)
@@ -206,7 +206,7 @@
if(useLast){
newL2Fam <- eval(CallL2Fam(IC))
newParam <- param(newL2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(newL2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("kStepEstimator",
@@ -271,7 +271,7 @@
if(steps == 1){
if(useLast && !is(modifyIC(IC), "NULL") ){
newParam <- param(L2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(L2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("kStepEstimator",
@@ -318,7 +318,7 @@
start0 <- res
newL2Fam <- eval(CallL2Fam(IC))
newParam <- param(newL2Fam)
- main(newParam) <- start0
+ main(newParam)[] <- start0
newL2Fam <- modifyModel(newL2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
res <- start0 + rowMeans(evalIC(IC, as.matrix(x)), na.rm = TRUE)
@@ -326,7 +326,7 @@
if(useLast){
newL2Fam <- eval(CallL2Fam(IC))
newParam <- param(newL2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(newL2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("kStepEstimator",
@@ -393,7 +393,7 @@
if(steps == 1){
if(useLast && !is(modifyIC(IC), "NULL") ){
newParam <- param(L2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(L2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("kStepEstimator",
@@ -440,7 +440,7 @@
start0 <- res
newL2Fam <- eval(CallL2Fam(IC))
newParam <- param(newL2Fam)
- main(newParam) <- start0
+ main(newParam)[] <- start0
newL2Fam <- modifyModel(newL2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
res <- start0 + rowMeans(evalIC(IC, x), na.rm = TRUE)
@@ -448,7 +448,7 @@
if(useLast){
newL2Fam <- eval(CallL2Fam(IC))
newParam <- param(newL2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(newL2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("kStepEstimator",
Modified: branches/robast-0.7/pkg/RobAStBase/R/oneStepEstimator.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/oneStepEstimator.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/oneStepEstimator.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -23,7 +23,7 @@
if(is(L2Fam, "L2GroupParamFamily")) useLast <- TRUE
if(useLast && !is(modifyIC(IC), "NULL") ){
newParam <- param(L2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(L2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("oneStepEstimator",
@@ -94,7 +94,7 @@
if(is(L2Fam, "L2GroupParamFamily")) useLast <- TRUE
if(useLast && !is(modifyIC(IC), "NULL") ){
newParam <- param(L2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(L2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("oneStepEstimator",
@@ -164,7 +164,7 @@
if(is(L2Fam, "L2GroupParamFamily")) useLast <- TRUE
if(useLast && !is(modifyIC(IC), "NULL") ){
newParam <- param(L2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(L2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("oneStepEstimator",
@@ -236,7 +236,7 @@
if(is(L2Fam, "L2GroupParamFamily")) useLast <- TRUE
if(useLast && !is(modifyIC(IC), "NULL") ){
newParam <- param(L2Fam)
- main(newParam) <- res
+ main(newParam)[] <- res
newL2Fam <- modifyModel(L2Fam, newParam)
IC <- modifyIC(IC)(newL2Fam, IC)
Infos <- rbind(Infos, c("oneStepEstimator",
Copied: branches/robast-0.7/pkg/RobAStBase/R/outlyingPlot.R (from rev 217, pkg/RobAStBase/R/outlyingPlot.R)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/outlyingPlot.R (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/R/outlyingPlot.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,48 @@
+outlyingPlotIC <- function(data, IC.x, IC.y = IC.x, dist.x = NormType(),
+ dist.y, cutoff.y = cutoff.chisq(), cutoff.x = cutoff.sememp(), ...,
+ cutoff.quantile.x = 0.95,
+ cutoff.quantile.y = cutoff.quantile.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff,
+ main = gettext("Outlyingness by means of a distance-distance plot")
+ ){
+ mc <- as.list(match.call(expand.dots = FALSE))[-1]
+ dots <- mc$"..."
+ if(is.null(dots$xlim)) dots$xlim <- TRUE
+ if(is.null(dots$ylim)) dots$ylim <- TRUE
+ if(is.null(mc$cutoff.quantile.x)) mc$cutoff.quantile.x <- 0.95
+ if(is.null(mc$cutoff.quantile.y)) mc$cutoff.quantile.y <- cutoff.quantile.x
+ if(is.null(mc$cutoff.x)) mc$cutoff.x <- cutoff.sememp()
+ if(is.null(mc$cutoff.y)) mc$cutoff.y <- cutoff.chisq()
+ if(missing(IC.x)) stop("Argument 'IC.x' must be given as argument to 'outlyingPlot'")
+ if(missing(data)) stop("Argument 'data' must be given as argument to 'outlyingPlot'")
+
+ if(missing(dist.y)){
+ if("asCov" %in% names(Risks(IC.y)))
+ if(is.matrix(Risks(IC.y)$asCov) || length(Risks(IC.y)$asCov) == 1)
+ asVar <- Risks(IC.y)$asCov
+ else
+ asVar <- Risks(IC.y)$asCov$value
+ else
+ asVar <- getRiskIC(IC.y, risk = asCov())$asCov$value
+
+ asVar <- PosSemDefSymmMatrix(solve(asVar))
+ mc$dist.y <- QFNorm(name = gettext("Mahalonobis-Norm"), QuadForm = asVar)
+ }
+ if(missing(dist.x))
+ mc$dist.x <- NormType()
+
+ tf.x <- function(x) apply(x,2,function(xx) evalIC(IC.x,xx))
+ tf.y <- function(x) apply(x,2,function(xx) evalIC(IC.y,xx))
+
+
+ do.call(ddPlot,args=c(list(data=data), dots, list(dist.x = mc$dist.x,
+ dist.y = mc$dist.y, cutoff.x = mc$cutoff.x, cutoff.y = mc$cutoff.y,
+ cutoff.quantile.x = mc$cutoff.quantile.x, cutoff.quantile.y = mc$cutoff.quantile.y,
+ transform.x = tf.x, transform.y = tf.y,
+ id.n = mc$id.n, lab.pts = mc$lab.pts, adj = mc$adj, cex.idn = mc$cex.idn,
+ col.idn = mc$col.idn, lty.cutoff = mc$lty.cutoff,
+ lwd.cutoff = mc$lwd.cutoff, col.cutoff = mc$col.cutoff, main = main)))
+
+ }
+
Modified: branches/robast-0.7/pkg/RobAStBase/R/utils.R
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/R/utils.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/R/utils.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -5,11 +5,13 @@
slots <- slots[slots != "name"]
nrvalues <- length(slots)
if (nrvalues > 0) {
- values = numeric(nrvalues)
+ values <- numeric(nrvalues)
for (i in 1:nrvalues)
values[i] <- attributes(attributes(L2Fam at distribution)$param)[[slots[i]]]
paramstring <- paste("(", paste(values, collapse = ", "), ")", sep = "")
+ }else{
+ paramstring <- NULL
}
distr <- paste(class(L2Fam at distribution)[1], paramstring, sep = "")
}
Modified: branches/robast-0.7/pkg/RobAStBase/chm/00Index.html
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/00Index.html 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/chm/00Index.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -10,9 +10,10 @@
<param name="keyword" value=".. contents">
</object>
-<h2>Help pages for package ‘RobAStBase’ version 0.1.0</h2>
+<h2>Help pages for package ‘RobAStBase’ version 0.1.2</h2>
<p align="center">
+<a href="# "> </a>
<a href="#A">A</a>
<a href="#B">B</a>
<a href="#C">C</a>
@@ -37,6 +38,13 @@
<table width="100%">
</table>
+<h2><a name=" ">-- --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="0RobAStBase-package.html">RobAStBase-package</a></td>
+<td>Robust Asymptotic Statistics </td></tr>
+</table>
+
<h2><a name="A">-- A --</a></h2>
<table width="100%">
@@ -126,6 +134,14 @@
<td>Compare - Plots</td></tr>
<tr><td width="25%"><a href="comparePlot.html">comparePlot-methods</a></td>
<td>Compare - Plots</td></tr>
+<tr><td width="25%"><a href="ALEstimate-class.html">confint,ALEstimate,asymmetricBias-method</a></td>
+<td>ALEstimate-class.</td></tr>
+<tr><td width="25%"><a href="ALEstimate-class.html">confint,ALEstimate,missing-method</a></td>
+<td>ALEstimate-class.</td></tr>
+<tr><td width="25%"><a href="ALEstimate-class.html">confint,ALEstimate,onesidedBias-method</a></td>
+<td>ALEstimate-class.</td></tr>
+<tr><td width="25%"><a href="ALEstimate-class.html">confint,ALEstimate,symmetricBias-method</a></td>
+<td>ALEstimate-class.</td></tr>
<tr><td width="25%"><a href="ContIC.html">ContIC</a></td>
<td>Generating function for ContIC-class</td></tr>
<tr><td width="25%"><a href="ContIC-class.html">ContIC-class</a></td>
@@ -138,11 +154,35 @@
<td>Influence curve</td></tr>
<tr><td width="25%"><a href="InfluenceCurve-class.html">Curve,InfluenceCurve-method</a></td>
<td>Influence curve</td></tr>
+<tr><td width="25%"><a href="cutoff.html">cutoff</a></td>
+<td>Generating function(s) for class 'cutoff'</td></tr>
+<tr><td width="25%"><a href="cutoff-class.html">cutoff-class</a></td>
+<td>Cutoff class for distance-distance plots</td></tr>
+<tr><td width="25%"><a href="cutoff.html">cutoff.chisq</a></td>
+<td>Generating function(s) for class 'cutoff'</td></tr>
+<tr><td width="25%"><a href="cutoff-class.html">cutoff.quantile</a></td>
+<td>Cutoff class for distance-distance plots</td></tr>
+<tr><td width="25%"><a href="cutoff-class.html">cutoff.quantile,cutoff-method</a></td>
+<td>Cutoff class for distance-distance plots</td></tr>
+<tr><td width="25%"><a href="cutoff-class.html">cutoff.quantile<-,cutoff-method</a></td>
+<td>Cutoff class for distance-distance plots</td></tr>
+<tr><td width="25%"><a href="cutoff.html">cutoff.sememp</a></td>
+<td>Generating function(s) for class 'cutoff'</td></tr>
</table>
<h2><a name="D">-- D --</a></h2>
<table width="100%">
+<tr><td width="25%"><a href="ddPlot-methods.html">ddPlot</a></td>
+<td>Methods for Function ddPlot in Package ‘RobAStBase’ </td></tr>
+<tr><td width="25%"><a href="ddPlot-methods.html">ddPlot,data.frame-method</a></td>
+<td>Methods for Function ddPlot in Package ‘RobAStBase’ </td></tr>
+<tr><td width="25%"><a href="ddPlot-methods.html">ddPlot,matrix-method</a></td>
+<td>Methods for Function ddPlot in Package ‘RobAStBase’ </td></tr>
+<tr><td width="25%"><a href="ddPlot-methods.html">ddPlot,numeric-method</a></td>
+<td>Methods for Function ddPlot in Package ‘RobAStBase’ </td></tr>
+<tr><td width="25%"><a href="ddPlot-methods.html">ddPlot-methods</a></td>
+<td>Methods for Function ddPlot in Package ‘RobAStBase’ </td></tr>
<tr><td width="25%"><a href="InfluenceCurve-class.html">Domain,InfluenceCurve-method</a></td>
<td>Influence curve</td></tr>
</table>
@@ -161,6 +201,8 @@
<h2><a name="F">-- F --</a></h2>
<table width="100%">
+<tr><td width="25%"><a href="cutoff-class.html">fct,cutoff-method</a></td>
+<td>Cutoff class for distance-distance plots</td></tr>
<tr><td width="25%"><a href="FixRobModel.html">FixRobModel</a></td>
<td>Generating function for FixRobModel-class</td></tr>
<tr><td width="25%"><a href="FixRobModel-class.html">FixRobModel-class</a></td>
@@ -252,8 +294,10 @@
<td>Influence curve</td></tr>
<tr><td width="25%"><a href="infoPlot.html">infoPlot</a></td>
<td>Plot absolute and relative information</td></tr>
-<tr><td width="25%"><a href="IC-class.html">infoPlot,IC-method</a></td>
-<td>Influence curve</td></tr>
+<tr><td width="25%"><a href="infoPlot.html">infoPlot,IC-method</a></td>
+<td>Plot absolute and relative information</td></tr>
+<tr><td width="25%"><a href="infoPlot.html">infoPlot-methods</a></td>
+<td>Plot absolute and relative information</td></tr>
<tr><td width="25%"><a href="InfluenceCurve-class.html">Infos</a></td>
<td>Influence curve</td></tr>
<tr><td width="25%"><a href="InfluenceCurve-class.html">Infos,InfluenceCurve-method</a></td>
@@ -346,6 +390,8 @@
<h2><a name="N">-- N --</a></h2>
<table width="100%">
+<tr><td width="25%"><a href="cutoff-class.html">name,cutoff-method</a></td>
+<td>Cutoff class for distance-distance plots</td></tr>
<tr><td width="25%"><a href="InfluenceCurve-class.html">name,InfluenceCurve-method</a></td>
<td>Influence curve</td></tr>
<tr><td width="25%"><a href="RobAStControl-class.html">name,RobAStControl-method</a></td>
@@ -407,6 +453,8 @@
<td>Generic function for the computation of optimally robust ICs</td></tr>
<tr><td width="25%"><a href="optIC.html">optIC-methods</a></td>
<td>Generic function for the computation of optimally robust ICs</td></tr>
+<tr><td width="25%"><a href="outlyingPlotIC.html">outlyingPlotIC</a></td>
+<td>Function outlyingPlotIC in Package ‘RobAStBase’ </td></tr>
</table>
<h2><a name="P">-- P --</a></h2>
@@ -416,8 +464,12 @@
<td>ALEstimate-class.</td></tr>
<tr><td width="25%"><a href="ALEstimate-class.html">pIC,ALEstimate-method</a></td>
<td>ALEstimate-class.</td></tr>
-<tr><td width="25%"><a href="IC-class.html">plot,IC,ANY-method</a></td>
-<td>Influence curve</td></tr>
+<tr><td width="25%"><a href="plot-methods.html">plot</a></td>
+<td>Methods for Function plot in Package ‘RobAStBase’ </td></tr>
+<tr><td width="25%"><a href="plot-methods.html">plot,IC,missing-method</a></td>
+<td>Methods for Function plot in Package ‘RobAStBase’ </td></tr>
+<tr><td width="25%"><a href="plot-methods.html">plot-methods</a></td>
+<td>Methods for Function plot in Package ‘RobAStBase’ </td></tr>
</table>
<h2><a name="R">-- R --</a></h2>
@@ -435,6 +487,8 @@
<td>Influence curve</td></tr>
<tr><td width="25%"><a href="InfluenceCurve-class.html">Risks<-,InfluenceCurve-method</a></td>
<td>Influence curve</td></tr>
+<tr><td width="25%"><a href="0RobAStBase-package.html">RobAStBase</a></td>
+<td>Robust Asymptotic Statistics </td></tr>
<tr><td width="25%"><a href="RobAStBaseOptions.html">RobAStBaseOptions</a></td>
<td>Function to change the global variables of the package ‘RobAStBase’ </td></tr>
<tr><td width="25%"><a href="RobAStControl-class.html">RobAStControl-class</a></td>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/0RobAStBase-package.html (from rev 217, pkg/RobAStBase/chm/0RobAStBase-package.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/0RobAStBase-package.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/0RobAStBase-package.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,106 @@
+<html><head><title>Robust Asymptotic Statistics</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>RobAStBase-package(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: RobAStBase-package">
+<param name="keyword" value="R: RobAStBase">
+<param name="keyword" value=" Robust Asymptotic Statistics">
+</object>
+
+
+<h2>Robust Asymptotic Statistics</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Base S4-classes and functions for robust asymptotic statistics.
+</p>
+
+
+<h3>Details</h3>
+
+<p>
+<table summary="Rd table">
+<tr>
+ <td align="left">Package: </td> <td align="left"> RobAStBase</td>
+</tr>
+<tr>
+ <td align="left"> Version: </td> <td align="left"> 0.1.2</td>
+</tr>
+<tr>
+ <td align="left"> Date: </td> <td align="left"> 2008-11-24</td>
+</tr>
+<tr>
+ <td align="left"> Depends: </td> <td align="left"> R(>= 2.7.0), methods, distr(>= 2.0), distrEx(>= 2.0),distrMod(>= 2.0), RandVar(>= 0.6.3)</td>
+</tr>
+<tr>
+ <td align="left"> LazyLoad: </td> <td align="left"> yes</td>
+</tr>
+<tr>
+ <td align="left"> License: </td> <td align="left"> LGPL-3</td>
+</tr>
+<tr>
+ <td align="left"> URL: </td> <td align="left"> http://robast.r-forge.r-project.org/</td>
+</tr>
+</table>
+
+
+<h3>Author(s)</h3>
+
+<p>
+Peter Ruckdeschel <a href="mailto:Peter.Ruckdeschel at itwm.fraunhofer.de">Peter.Ruckdeschel at itwm.fraunhofer.de</a>,<br>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a><br>
+</p>
+<p>
+Maintainer: Matthias Kohl <a href="mailto:matthias.kohl at stamats.de">matthias.kohl at stamats.de</a>
+</p>
+
+
+<h3>References</h3>
+
+<p>
+M. Kohl (2005). Numerical Contributions to the Asymptotic Theory of Robustness.
+Dissertation. University of Bayreuth.
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a onclick="findlink('distr', 'distr-package.html')" style="text-decoration: underline; color: blue; cursor: hand">distr-package</a></code>, <code><a onclick="findlink('distrEx', 'distrEx-package.html')" style="text-decoration: underline; color: blue; cursor: hand">distrEx-package</a></code>,
+<code><a onclick="findlink('distrMod', 'distrMod-package.html')" style="text-decoration: underline; color: blue; cursor: hand">distrMod-package</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+library(RobAStBase)
+
+## some L2 differentiable parametric family from package distrMod, e.g.
+B <- BinomFamily(size = 25, prob = 0.25)
+
+## classical optimal IC
+IC0 <- optIC(model = B, risk = asCov())
+plot(IC0) # plot IC
+checkIC(IC0, B)
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.2 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/ALEstimate-class.html (from rev 217, pkg/RobAStBase/chm/ALEstimate-class.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/ALEstimate-class.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/ALEstimate-class.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,131 @@
+<html><head><title>ALEstimate-class.</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>ALEstimate-class(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: ALEstimate-class">
+<param name="keyword" value="R: pIC">
+<param name="keyword" value="R: pIC,ALEstimate-method">
+<param name="keyword" value="R: asbias">
+<param name="keyword" value="R: asbias,ALEstimate-method">
+<param name="keyword" value="R: show,ALEstimate-method">
+<param name="keyword" value="R: confint,ALEstimate,missing-method">
+<param name="keyword" value="R: confint,ALEstimate,symmetricBias-method">
+<param name="keyword" value="R: confint,ALEstimate,onesidedBias-method">
+<param name="keyword" value="R: confint,ALEstimate,asymmetricBias-method">
+<param name="keyword" value=" ALEstimate-class.">
+</object>
+
+
+<h2>ALEstimate-class.</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Class of asymptotically linear estimates.
+</p>
+
+
+<h3>Objects from the Class</h3>
+
+<p>
+Objects can be created by calls of the form <code>new("ALEstimate", ...)</code>.
+</p>
+
+
+<h3>Slots</h3>
+
+<dl>
+<dt><code>name</code>:</dt><dd>Object of class <code>"character"</code>:
+name of the estimator. </dd>
+<dt><code>estimate</code>:</dt><dd>Object of class <code>"ANY"</code>:
+estimate. </dd>
+<dt><code>samplesize</code>:</dt><dd>Object of class <code>"numeric"</code>:
+sample size. </dd>
+<dt><code>asvar</code>:</dt><dd>Optional object of class <code>"matrix"</code>:
+asymptotic variance. </dd>
+<dt><code>asbias</code>:</dt><dd>Optional object of class <code>"numeric"</code>:
+asymptotic bias. </dd>
+<dt><code>pIC</code>:</dt><dd>Optional object of class <code>InfluenceCurve</code>:
+influence curve. </dd>
+<dt><code>nuis.idx</code>:</dt><dd>object of class <code>"OptionalNumeric"</code>:
+indices of <code>estimate</code> belonging to the nuisance part. </dd>
+<dt><code>Infos</code>:</dt><dd>object of class <code>"matrix"</code>
+with two columns named <code>method</code> and <code>message</code>:
+additional informations. </dd>
+</dl>
+
+<h3>Extends</h3>
+
+<p>
+Class <code>"Estimate"</code>, directly.
+</p>
+
+
+<h3>Methods</h3>
+
+<dl>
+<dt>pIC</dt><dd><code>signature(object = "ALEstimate")</code>:
+accessor function for slot <code>pIC</code>. </dd>
+
+
+<dt>show</dt><dd><code>signature(object = "ALEstimate")</code> </dd>
+
+
+<dt>confint</dt><dd><code>signature(object = "ALEstimate", method = "missing")</code>:
+compute asymptotic (LAN-based) confidence interval neglecting any bias. </dd>
+
+
+<dt>confint</dt><dd><code>signature(object = "ALEstimate", method = "symmetricBias")</code>:
+compute asymptotic (LAN-based) confidence interval incorporating bias
+symmetrically. </dd>
+
+
+<dt>confint</dt><dd><code>signature(object = "ALEstimate", method = "onesidedBias")</code>:
+compute asymptotic (LAN-based) confidence interval incorporating bias
+one-sided; i.e., positive or negative, respectively. </dd>
+
+
+<dt>confint</dt><dd><code>signature(object = "ALEstimate", method = "asymmetricBias")</code>:
+compute asymptotic (LAN-based) confidence interval incorporating bias
+asymmetrically. </dd>
+</dl>
+
+<h3>Author(s)</h3>
+
+<p>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a onclick="findlink('distrMod', 'Estimate-class.html')" style="text-decoration: underline; color: blue; cursor: hand">Estimate-class</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+## prototype
+new("ALEstimate")
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.2 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Modified: branches/robast-0.7/pkg/RobAStBase/chm/IC-class.html
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/IC-class.html 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/chm/IC-class.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -16,8 +16,6 @@
<param name="keyword" value="R: checkIC,IC,L2ParamFamily-method">
<param name="keyword" value="R: evalIC,IC,numeric-method">
<param name="keyword" value="R: evalIC,IC,matrix-method">
-<param name="keyword" value="R: infoPlot,IC-method">
-<param name="keyword" value="R: plot,IC,ANY-method">
<param name="keyword" value="R: show,IC-method">
<param name="keyword" value=" Influence curve">
</object>
@@ -107,7 +105,7 @@
Plot absolute and relative information of <code>IC</code>. </dd>
-<dt>plot</dt><dd><code>signature(x = "IC")</code></dd>
+<dt>plot</dt><dd><code>signature(x = "IC", y = "missing")</code></dd>
<dt>show</dt><dd><code>signature(object = "IC")</code></dd>
@@ -160,6 +158,6 @@
</script>
-<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.0 <a href="00Index.html">Index]</a></div>
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.2 <a href="00Index.html">Index]</a></div>
</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/MEstimate-class.html (from rev 217, pkg/RobAStBase/chm/MEstimate-class.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/MEstimate-class.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/MEstimate-class.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,102 @@
+<html><head><title>MEstimate-class.</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>MEstimate-class(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: MEstimate-class">
+<param name="keyword" value="R: Mroot">
+<param name="keyword" value="R: Mroot,MEstimate-method">
+<param name="keyword" value="R: show,MEstimate-method">
+<param name="keyword" value=" MEstimate-class.">
+</object>
+
+
+<h2>MEstimate-class.</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Class of asymptotically linear estimates.
+</p>
+
+
+<h3>Objects from the Class</h3>
+
+<p>
+Objects can be created by calls of the form <code>new("MEstimate", ...)</code>.
+More frequently they are created via the generating function
+<code>locMEstimator</code>.
+</p>
+
+
+<h3>Slots</h3>
+
+<dl>
+<dt><code>name</code>:</dt><dd>Object of class <code>"character"</code>:
+name of the estimator. </dd>
+<dt><code>estimate</code>:</dt><dd>Object of class <code>"ANY"</code>:
+estimate. </dd>
+<dt><code>samplesize</code>:</dt><dd>Object of class <code>"numeric"</code>:
+sample size. </dd>
+<dt><code>asvar</code>:</dt><dd>Optional object of class <code>"matrix"</code>:
+asymptotic variance. </dd>
+<dt><code>asbias</code>:</dt><dd>Optional object of class <code>"numeric"</code>:
+asymptotic bias. </dd>
+<dt><code>pIC</code>:</dt><dd>Optional object of class <code>InfluenceCurve</code>:
+influence curve. </dd>
+<dt><code>nuis.idx</code>:</dt><dd>object of class <code>"OptionalNumeric"</code>:
+indices of <code>estimate</code> belonging to the nuisance part. </dd>
+<dt><code>Mroot</code>:</dt><dd>Object of class <code>"numeric"</code>: value of
+the M equation at the estimate. </dd>
+<dt><code>Infos</code>:</dt><dd>object of class <code>"matrix"</code>
+with two columns named <code>method</code> and <code>message</code>:
+additional informations. </dd>
+</dl>
+
+<h3>Extends</h3>
+
+<p>
+Class <code>"ALEstimate"</code>, directly.<br>
+Class <code>"Estimate"</code>, by class <code>"ALEstimate"</code>.
+</p>
+
+
+<h3>Methods</h3>
+
+<dl>
+<dt>Mroot</dt><dd><code>signature(object = "MEstimate")</code>:
+accessor function for slot <code>Mroot</code>. </dd>
+
+
+<dt>show</dt><dd><code>signature(object = "MEstimate")</code> </dd>
+</dl>
+
+<h3>Author(s)</h3>
+
+<p>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a href="ALEstimate-class.html">ALEstimate-class</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+## prototype
+new("MEstimate")
+</pre>
+
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.0 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Modified: branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.chm
===================================================================
(Binary files differ)
Modified: branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.hhp
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.hhp 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.hhp 2008-11-25 10:41:15 UTC (rev 218)
@@ -12,6 +12,7 @@
[FILES]
00Index.html
+0RobAStBase-package.html
ALEstimate-class.html
BdStWeight-class.html
BoundedWeight-class.html
@@ -42,6 +43,9 @@
UncondNeighborhood-class.html
checkIC.html
comparePlot.html
+cutoff-class.html
+cutoff.html
+ddPlot-methods.html
evalIC.html
generateIC.html
generateICfct.html
@@ -50,9 +54,12 @@
getweight.html
infoPlot.html
internals.html
+internals_ddPlot.html
kStepEstimate-class.html
kStepEstimator.html
locMEstimator.html
makeIC-methods.html
oneStepEstimator.html
optIC.html
+outlyingPlotIC.html
+plot-methods.html
Modified: branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.toc
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.toc 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.toc 2008-11-25 10:41:15 UTC (rev 218)
@@ -10,6 +10,14 @@
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="RobAStBase-package">
+<param name="Local" value="0RobAStBase-package.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value=".ddPlot.MatNtNtCoCo">
+<param name="Local" value="internals_ddPlot.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value=".eq">
<param name="Local" value="internals.html">
</OBJECT>
@@ -202,6 +210,22 @@
<param name="Local" value="comparePlot.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="confint,ALEstimate,asymmetricBias-method">
+<param name="Local" value="ALEstimate-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="confint,ALEstimate,missing-method">
+<param name="Local" value="ALEstimate-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="confint,ALEstimate,onesidedBias-method">
+<param name="Local" value="ALEstimate-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="confint,ALEstimate,symmetricBias-method">
+<param name="Local" value="ALEstimate-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="ContIC">
<param name="Local" value="ContIC.html">
</OBJECT>
@@ -226,6 +250,58 @@
<param name="Local" value="InfluenceCurve-class.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cutoff">
+<param name="Local" value="cutoff.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cutoff-class">
+<param name="Local" value="cutoff-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cutoff.chisq">
+<param name="Local" value="cutoff.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cutoff.quantile">
+<param name="Local" value="cutoff-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cutoff.quantile,cutoff-method">
+<param name="Local" value="cutoff-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cutoff.quantile<-">
+<param name="Local" value="cutoff-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cutoff.quantile<-,cutoff-method">
+<param name="Local" value="cutoff-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="cutoff.sememp">
+<param name="Local" value="cutoff.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="ddPlot">
+<param name="Local" value="ddPlot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="ddPlot,data.frame-method">
+<param name="Local" value="ddPlot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="ddPlot,matrix-method">
+<param name="Local" value="ddPlot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="ddPlot,numeric-method">
+<param name="Local" value="ddPlot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="ddPlot-methods">
+<param name="Local" value="ddPlot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Domain,InfluenceCurve-method">
<param name="Local" value="InfluenceCurve-class.html">
</OBJECT>
@@ -242,6 +318,10 @@
<param name="Local" value="IC-class.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="fct,cutoff-method">
+<param name="Local" value="cutoff-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="FixRobModel">
<param name="Local" value="FixRobModel.html">
</OBJECT>
@@ -395,9 +475,13 @@
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="infoPlot,IC-method">
-<param name="Local" value="IC-class.html">
+<param name="Local" value="infoPlot.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="infoPlot-methods">
+<param name="Local" value="infoPlot.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Infos">
<param name="Local" value="InfluenceCurve-class.html">
</OBJECT>
@@ -426,6 +510,10 @@
<param name="Local" value="internals.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="internals_for_RobAStBase_ddPlot">
+<param name="Local" value="internals_ddPlot.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="kStepEstimate-class">
<param name="Local" value="kStepEstimate-class.html">
</OBJECT>
@@ -554,6 +642,10 @@
<param name="Local" value="MEstimate-class.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="name,cutoff-method">
+<param name="Local" value="cutoff-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="name,InfluenceCurve-method">
<param name="Local" value="InfluenceCurve-class.html">
</OBJECT>
@@ -674,6 +766,10 @@
<param name="Local" value="optIC.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="outlyingPlotIC">
+<param name="Local" value="outlyingPlotIC.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="pIC">
<param name="Local" value="ALEstimate-class.html">
</OBJECT>
@@ -682,10 +778,18 @@
<param name="Local" value="ALEstimate-class.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
-<param name="Name" value="plot,IC,ANY-method">
-<param name="Local" value="IC-class.html">
+<param name="Name" value="plot">
+<param name="Local" value="plot-methods.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="plot,IC,missing-method">
+<param name="Local" value="plot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="plot-methods">
+<param name="Local" value="plot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="radius">
<param name="Local" value="Neighborhood-class.html">
</OBJECT>
@@ -714,6 +818,10 @@
<param name="Local" value="InfluenceCurve-class.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="RobAStBase">
+<param name="Local" value="0RobAStBase-package.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="RobAStBaseOptions">
<param name="Local" value="RobAStBaseOptions.html">
</OBJECT>
@@ -875,6 +983,14 @@
<param name="Local" value="RobAStControl-class.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Cutoff class for distance-distance plots">
+<param name="Local" value="cutoff-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Function outlyingPlotIC in Package `RobAStBase' ">
+<param name="Local" value="outlyingPlotIC.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Function to change the global variables of the package `RobAStBase' ">
<param name="Local" value="RobAStBaseOptions.html">
</OBJECT>
@@ -911,6 +1027,10 @@
<param name="Local" value="TotalVarNeighborhood.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Generating function(s) for class 'cutoff'">
+<param name="Local" value="cutoff.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Generating weights">
<param name="Local" value="getweight.html">
</OBJECT>
@@ -975,6 +1095,10 @@
<param name="Local" value="internals.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Internal / Helper functions of package RobAStBase for ddPlot">
+<param name="Local" value="internals_ddPlot.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="kStepEstimate-class.">
<param name="Local" value="kStepEstimate-class.html">
</OBJECT>
@@ -983,6 +1107,14 @@
<param name="Local" value="MEstimate-class.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Methods for Function ddPlot in Package `RobAStBase' ">
+<param name="Local" value="ddPlot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Methods for Function plot in Package `RobAStBase' ">
+<param name="Local" value="plot-methods.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Neighborhood">
<param name="Local" value="Neighborhood-class.html">
</OBJECT>
@@ -991,6 +1123,10 @@
<param name="Local" value="infoPlot.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Robust Asymptotic Statistics ">
+<param name="Local" value="0RobAStBase-package.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Robust model">
<param name="Local" value="RobModel-class.html">
</OBJECT>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/RobAStBaseOptions.html (from rev 217, pkg/RobAStBase/chm/RobAStBaseOptions.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/RobAStBaseOptions.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/RobAStBaseOptions.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,102 @@
+<html><head><title>Function to change the global variables of the package ‘RobAStBase’</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>RobAStBaseOptions(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: RobAStBaseOptions">
+<param name="keyword" value="R: getRobAStBaseOption">
+<param name="keyword" value="R: kStepUseLast">
+<param name="keyword" value=" Function to change the global variables of the package ‘RobAStBase’">
+</object>
+
+
+<h2>Function to change the global variables of the package ‘RobAStBase’</h2>
+
+
+<h3>Description</h3>
+
+<p>
+With <code>RobAStBaseOptions</code> you can inspect and change
+the global variables of the package <span class="pkg">RobAStBase</span>.
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+RobAStBaseOptions(...)
+getRobAStBaseOption(x)
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>...</code></td>
+<td>
+any options can be defined, using name = value or by passing a list of such tagged values. </td></tr>
+<tr valign="top"><td><code>x</code></td>
+<td>
+a character string holding an option name.</td></tr>
+</table>
+
+<h3>Value</h3>
+
+<p>
+<code>RobAStBaseOptions()</code> returns a list of the global variables.newline
+<code>RobAStBaseOptions(x)</code> returns the global variable <VAR>x</VAR>.newline
+<code>getRobAStBaseOption(x)</code> returns the global variable <VAR>x</VAR>.newline
+<code>RobAStBaseOptions(x=y)</code> sets the value of the global variable <VAR>x</VAR> to <VAR>y</VAR>.</p>
+
+<h3>Global Options</h3>
+
+<dl>
+<dt>kStepUseLast:</dt><dd>The default value of argument <code>kStepUseLast</code> is
+<code>FALSE</code>. Explicitly setting <code>kStepUseLast</code> to <code>TRUE</code> should
+be done with care as in this situation the influence curve in case of
+<code>oneStepEstimator</code> and <code>kStepEstimator</code> is re-computed using
+the value of the one- resp. k-step estimate which may take quite a long
+time depending on the model. </dd>
+</dl>
+
+<h3>Author(s)</h3>
+
+<p>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a onclick="findlink('base', 'options.html')" style="text-decoration: underline; color: blue; cursor: hand">options</a></code>, <code><a onclick="findlink('base', 'getOption.html')" style="text-decoration: underline; color: blue; cursor: hand">getOption</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+RobAStBaseOptions()
+RobAStBaseOptions("kStepUseLast")
+RobAStBaseOptions("kStepUseLast" = TRUE)
+# or
+RobAStBaseOptions(kStepUseLast = 1e-6)
+getRobAStBaseOption("kStepUseLast")
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.0 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Modified: branches/robast-0.7/pkg/RobAStBase/chm/comparePlot.html
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/comparePlot.html 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/chm/comparePlot.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -27,7 +27,12 @@
<pre>
comparePlot(obj1, obj2, ... )
## S4 method for signature 'IC, IC':
-comparePlot(obj1, obj2, obj3 = NULL, obj4 = NULL, ... )
+comparePlot(obj1, obj2, obj3 = NULL, obj4 = NULL,
+ ..., withSweave = getdistrOption("withSweave"),
+ main = FALSE, inner = TRUE, sub = FALSE,
+ col.inner = par("col.main"), cex.inner = 0.8,
+ bmar = par("mar")[1], tmar = par("mar")[3],
+ mfColRow = TRUE)
</pre>
@@ -46,11 +51,72 @@
<tr valign="top"><td><code>obj4</code></td>
<td>
optional: object of class <code>"InfluenceCurve"</code> to be compared with <code>obj1</code></td></tr>
+<tr valign="top"><td><code>withSweave</code></td>
+<td>
+logical: if <code>TRUE</code> (for working with <CODE>Sweave</CODE>)
+no extra device is opened</td></tr>
+<tr valign="top"><td><code>main</code></td>
+<td>
+logical: is a main title to be used? or <br>
+just as argument <code>main</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>.</td></tr>
+<tr valign="top"><td><code>inner</code></td>
+<td>
+logical: panels have their own titles? or <br>
+character vector of / cast to length number of comparands:
+<code>main</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>)</td></tr>
+<tr valign="top"><td><code>sub</code></td>
+<td>
+logical: is a sub-title to be used? or <br>
+just as argument <code>sub</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>.</td></tr>
+<tr valign="top"><td><code>tmar</code></td>
+<td>
+top margin – useful for non-standard main title sizes</td></tr>
+<tr valign="top"><td><code>bmar</code></td>
+<td>
+bottom margin – useful for non-standard sub title sizes</td></tr>
+<tr valign="top"><td><code>cex.inner</code></td>
+<td>
+magnification to be used for inner titles relative
+to the current setting of <code>cex</code>; as in
+<code><a onclick="findlink('stats', 'par.html')" style="text-decoration: underline; color: blue; cursor: hand">par</a></code></td></tr>
+<tr valign="top"><td><code>col.inner</code></td>
+<td>
+character or integer code; color for the inner title</td></tr>
+<tr valign="top"><td><code>mfColRow</code></td>
+<td>
+shall default partition in panels be used — defaults to <code>TRUE</code></td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
further arguments to be passed to <code>plot</code></td></tr>
</table>
+<h3>Details</h3>
+
+<p>
+Any parameters of <code>plot.default</code> may be passed on to this particular
+<code>plot</code> method.
+</p>
+<p>
+For main-, inner, and subtitles given as arguments <code>main</code>,
+<code>inner</code>, and <code>sub</code>, top and bottom margins are enlarged to 5 resp.
+6 by default but may also be specified by <code>tmar</code> / <code>bmar</code> arguments.
+If <code>main</code> / <code>inner</code> / <code>sub</code> are
+logical then if the respective argument is <code>FALSE</code> nothing is done/plotted,
+but if it is <code>TRUE</code>, we use a default main title taking up the calling
+arguments in case of <code>main</code>, default inner titles taking up the
+class and (named) parameter slots of arguments in case of <code>inner</code>,
+and a "generated on <data>"-tag in case of <code>sub</code>.
+Of course, if <code>main</code> / <code>inner</code> / <code>sub</code> are <code>character</code>, this
+is used for the title; in case of <code>inner</code> it is then checked whether it
+has correct length. In all title arguments, the following patterns are substituted:
+<ul>
+<dt><code>"%C1"</code>,<code>"%C2"</code>,[<code>"%C3"</code>,][<code>"%C4"</code>]</dt><dd>class of argument
+<code>obj<i></code>, i=1,..4</dd>
+<dt><code>"%A1"</code>,<code>"%A2"</code>,[<code>"%A3"</code>,][<code>"%A4"</code>]</dt><dd>deparsed argument
+<code>obj<i></code>, i=1,..4</dd>
+<dt><code>"%D"</code></dt><dd>time/date-string when the plot was generated</dd>
+</ul>
+
<h3>Author(s)</h3>
<p>
@@ -99,6 +165,6 @@
</script>
-<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.0 <a href="00Index.html">Index]</a></div>
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.3 <a href="00Index.html">Index]</a></div>
</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/cutoff-class.html (from rev 217, pkg/RobAStBase/chm/cutoff-class.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/cutoff-class.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/cutoff-class.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,110 @@
+<html><head><title>Cutoff class for distance-distance plots</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>cutoff-class(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: cutoff-class">
+<param name="keyword" value="R: cutoff.quantile<-,cutoff-method">
+<param name="keyword" value="R: cutoff.quantile<-">
+<param name="keyword" value="R: cutoff.quantile,cutoff-method">
+<param name="keyword" value="R: cutoff.quantile">
+<param name="keyword" value="R: name,cutoff-method">
+<param name="keyword" value="R: fct,cutoff-method">
+<param name="keyword" value=" Cutoff class for distance-distance plots">
+</object>
+
+
+<h2>Cutoff class for distance-distance plots</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Class of methods to determine cutoff point for distance-distance plots;
+used to derive other cutoff methods later by method dispatch.
+</p>
+
+
+<h3>Objects from the Class</h3>
+
+<p>
+Objects could in principle be created by calls of the form <code>new("cutoff", ...)</code>.
+More frequently they are created via the generating function
+<code><a href="cutoff.html">cutoff</a></code>, respectively via the helper functions
+<code>cutoff.sememp</code> and <code>cutoff.chisq</code>.
+</p>
+
+
+<h3>Slots</h3>
+
+<dl>
+<dt><code>name</code>:</dt><dd>object of class <code>"character"</code>; defaults to <code>"empirical"</code>
+in prototype; </dd>
+
+
+<dt><code>fct</code>:</dt><dd>an object of of class <code>"function"</code>;
+for this class layer, this function
+must only have one argument <code>data</code> (which may
+but need not be used to determine the cutoff point empirically);
+in derived classes this restriction could be dropped, if corresponding
+special methods for <code>ddPlot</code> are derived. Defaults to
+<code>function(data) quantile(data)</code>.</dd>
+
+
+<dt><code>cutoff.quantile</code>:</dt><dd>Object of class <code>"numeric"</code>:
+a quantile (empirical or theoretical) to plot the cutoff line; defaults
+to <code>0.95</code> in prototype;</dd>
+
+<p>
+</dl>
+
+<h3>Methods</h3>
+
+<dl>
+</p>
+
+<dt>cutoff.quantile</dt><dd><code>signature(object = "cutoff")</code>:
+accessor function for slot <code>cutoff.quantile</code>. </dd>
+
+
+<dt>cutoff.quantile<-</dt><dd><code>signature(object = "cutoff")</code>:
+replacement function for slot <code>cutoff.quantile</code>. </dd>
+
+
+<dt>fct</dt><dd><code>signature(object = "cutoff")</code>:
+accessor function for slot <code>fct</code>. </dd>
+
+
+<dt>name</dt><dd><code>signature(object = "cutoff")</code>:
+accessor function for slot <code>name</code>. </dd>
+
+<p>
+</dl>
+
+<h3>Author(s)</h3>
+
+<p>
+Peter Ruckdeschel <a href="mailto:Peter.Ruckdeschel at itwm.fraunhofer.de">Peter.Ruckdeschel at itwm.fraunhofer.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a href="ddPlot-methods.html">ddPlot</a></code>, <code><a href="outlyingPlotIC.html">outlyingPlotIC</a></code> <code><a href="cutoff.html">cutoff</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+cutoff()
+</pre>
+
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.2 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/cutoff.html (from rev 217, pkg/RobAStBase/chm/cutoff.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/cutoff.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/cutoff.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,122 @@
+<html><head><title>Generating function(s) for class 'cutoff'</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>cutoff(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: cutoff">
+<param name="keyword" value="R: cutoff.sememp">
+<param name="keyword" value="R: cutoff.chisq">
+<param name="keyword" value=" Generating function(s) for class 'cutoff'">
+</object>
+
+
+<h2>Generating function(s) for class 'cutoff'</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Generating function(s) for class <code>cutoff</code>.
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+cutoff(name = "empirical", body.fct0,
+ cutoff.quantile = 0.95,
+ norm = NormType(), QF, nsim = 100000)
+cutoff.sememp()
+cutoff.chisq()
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>name</code></td>
+<td>
+argument for name slot of <code>cutoff</code> object</td></tr>
+<tr valign="top"><td><code>body.fct0</code></td>
+<td>
+a call generated by code wrapped to <code>substitute</code> resp. <code>quote</code>;
+the body of the <code>fct</code> slot of the <code>cutoff</code> object</td></tr>
+<tr valign="top"><td><code>cutoff.quantile</code></td>
+<td>
+numeric; the corresponding slot value for the <code>cutoff</code> object</td></tr>
+<tr valign="top"><td><code>norm</code></td>
+<td>
+an object of class <code>NormType</code> – the norm/distance by which to produce
+the cutoff - value.</td></tr>
+<tr valign="top"><td><code>nsim</code></td>
+<td>
+integer: the sample size used for determining the quantiles
+of <i>x'Qx^.5</i> for <i>x</i> multivariate standard
+normal and <i>Q</i> a corresponding quadratic form</td></tr>
+<tr valign="top"><td><code>QF</code></td>
+<td>
+a quadratic (positive semidefinite, symmetric) matrix used
+as quadratic form </td></tr>
+</table>
+
+<h3>Details</h3>
+
+<p>
+<code>cutoff</code> generates a valid object of class <code>"cutoff"</code>.
+As function slot <code>fct</code> may only have a formal argument <code>data</code>,
+the other arguments to determine the cutoff value, i.e. <code>norm</code>, <code>QF</code>, <code>nsim</code>,
+<code>cutoff.quantile</code>, <code>nsim</code> have to enter the scope of this
+function by lexical scoping; now <code>cutoff.quantile</code>, <code>norm</code>, <code>QF</code>
+are to be taken from the calling environment (not from the defining one),
+so we have delay evaluation of the function body, which is why we assume
+it to be given wrapped into <code>substitute</code> resp. <code>quote</code>.
+<code>body.fct0</code> is by default (i.e. if argument <code>body.fct0</code> is missing) set
+to <code>quote(quantile(slot(norm,"fct")(data), cutoff.quantile))</code>, internally,
+i.e.; to an empirical quantile of the corresponding norms.<br>
+</p>
+<p>
+<code>cutoff.sememp()</code> is a helper function generating the theoretical (asymptotic)
+quantile of (the square root of) a corresponding quadratic form, assuming multivariate
+normality; to determine this quantile <code>nsim</code> simulations are used.<br>
+</p>
+<p>
+<code>cutoff.chisq()</code> is a helper function generating the theoretical (asymptotic)
+quantile of (the square root of) a (self-standardized) quadratic form, assuming multivariate
+normality; i.e.; a corresponding quantile of a Chi-Square distribution.
+</p>
+
+
+<h3>Value</h3>
+
+<p>
+Object of class <code>"cutoff"</code>.</p>
+
+<h3>Author(s)</h3>
+
+<p>
+Peter Ruckdeschel <a href="mailto:Peter.Ruckdeschel at itwm.fraunhofer.de">Peter.Ruckdeschel at itwm.fraunhofer.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a href="cutoff-class.html">cutoff-class</a></code>, <code><a href="ddPlot-methods.html">ddPlot</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+cutoff()
+cutoff.sememp()
+cutoff.chisq()
+</pre>
+
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.2 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/ddPlot-methods.html (from rev 217, pkg/RobAStBase/chm/ddPlot-methods.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/ddPlot-methods.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/ddPlot-methods.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,192 @@
+<html><head><title>Methods for Function ddPlot in Package ‘RobAStBase’</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>ddPlot-methods(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: ddPlot">
+<param name="keyword" value="R: ddPlot-methods">
+<param name="keyword" value="R: ddPlot,matrix-method">
+<param name="keyword" value="R: ddPlot,numeric-method">
+<param name="keyword" value="R: ddPlot,data.frame-method">
+<param name="keyword" value=" Methods for Function ddPlot in Package ‘RobAStBase’">
+</object>
+
+
+<h2>Methods for Function ddPlot in Package ‘RobAStBase’</h2>
+
+
+<h3>Description</h3>
+
+<p>
+ddPlot-methods
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+ddPlot(data, dist.x, dist.y, cutoff.x, cutoff.y, ...)
+## S4 method for signature 'matrix':
+ddPlot(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff)
+## S4 method for signature 'numeric':
+ddPlot(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff)
+## S4 method for signature 'data.frame':
+ddPlot(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff)
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>data</code></td>
+<td>
+data coercable to <code>matrix</code>; the data at which to produce the <code>ddPlot</code>.</td></tr>
+<tr valign="top"><td><code>...</code></td>
+<td>
+further arguments to be passed to <code>plot.default</code>, <code>text</code>, and <code>abline</code></td></tr>
+<tr valign="top"><td><code>dist.x</code></td>
+<td>
+object of class <code>NormType</code>; the distance for the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>dist.y</code></td>
+<td>
+object of class <code>NormType</code>; the distance for the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>cutoff.x</code></td>
+<td>
+object of class <code>cutoff</code>; the cutoff information for the <code>x</code> axis
+(the vertical line discriminating 'good' and 'bad' points).</td></tr>
+<tr valign="top"><td><code>cutoff.y</code></td>
+<td>
+object of class <code>cutoff</code>; the cutoff information for the <code>y</code> axis
+(the horizontal line discriminating 'good' and 'bad' points).</td></tr>
+<tr valign="top"><td><code>cutoff.quantile.x</code></td>
+<td>
+numeric; the cutoff quantile for the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>cutoff.quantile.y</code></td>
+<td>
+numeric; the cutoff quantile for the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>transform.x</code></td>
+<td>
+function; a transformation to be performed before determining the
+distances of the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>transform.y</code></td>
+<td>
+function; a transformation to be performed before determining the
+distances of the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>id.n</code></td>
+<td>
+a set of indices (or a corresponding logical vector); to select a subset
+of the data in argument <code>data</code>.</td></tr>
+<tr valign="top"><td><code>lab.pts</code></td>
+<td>
+a vector of labels for the (unsubsetted) <code>data</code>.</td></tr>
+<tr valign="top"><td><code>adj</code></td>
+<td>
+the corresponding argument for <code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for
+labelling the outliers.</td></tr>
+<tr valign="top"><td><code>cex.idn</code></td>
+<td>
+the corresponding <code>cex</code> argument for
+<code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for labelling the outliers.</td></tr>
+<tr valign="top"><td><code>col.idn</code></td>
+<td>
+the corresponding <code>col</code> argument for
+<code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for labelling the outliers.</td></tr>
+<tr valign="top"><td><code>lty.cutoff</code></td>
+<td>
+the corresponding <code>lty</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+<tr valign="top"><td><code>lwd.cutoff</code></td>
+<td>
+the corresponding <code>lwd</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+<tr valign="top"><td><code>col.cutoff</code></td>
+<td>
+the corresponding <code>col</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+</table>
+
+<h3>Details</h3>
+
+<p>
+The <code>matrix</code>-method calls <code>.ddPlot.MatNtNtCoCo</code>,
+the <code>numeric</code>- and <code>data.frame</code>-methods coerce argument <code>data</code>
+to <code>matrix</code> — the <code>numeric</code>-method by a call to <code>matrix(data, nrow=1)</code>,
+in the <code>data.frame</code>-methods by a call to <code>t(as.matrix(data))</code>.
+</p>
+
+
+<h3>Value</h3>
+
+<p>
+a list with items
+</p>
+<table summary="R argblock">
+<tr valign="top"><td><code>id.x</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>x</code>-cutoff</td></tr>
+<tr valign="top"><td><code>id.y</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>y</code>-cutoff</td></tr>
+<tr valign="top"><td><code>id.xy</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>x</code>-cutoff and the <code>y</code>-cutoff</td></tr>
+<tr valign="top"><td><code>qtx</code></td>
+<td>
+the quantiles of the distances of the (possibly transformed) data in <code>x</code> direction</td></tr>
+<tr valign="top"><td><code>qty</code></td>
+<td>
+the quantiles of the distances of the (possibly transformed) data in <code>y</code> direction</td></tr>
+<tr valign="top"><td><code>cutoff.x.v</code></td>
+<td>
+the cutoff value in <code>x</code> direction</td></tr>
+<tr valign="top"><td><code>cutoff.y.v</code></td>
+<td>
+the cutoff value in <code>y</code> direction</td></tr>
+</table>
+
+<h3>Author(s)</h3>
+
+<p>
+Peter Ruckdeschel <a href="mailto:Peter.Ruckdeschel at itwm.fraunhofer.de">Peter.Ruckdeschel at itwm.fraunhofer.de</a>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+MX <- matrix(rnorm(1500),nrow=6)
+QM <- matrix(rnorm(36),nrow=6); QM <- QM %*% t(QM)
+ddPlot(data=MX, dist.y=QFNorm(QuadF=PosSemDefSymmMatrix(QM)))
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.2 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Modified: branches/robast-0.7/pkg/RobAStBase/chm/infoPlot.html
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/infoPlot.html 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/chm/infoPlot.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -6,6 +6,8 @@
<table width="100%"><tr><td>infoPlot(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R: infoPlot">
+<param name="keyword" value="R: infoPlot-methods">
+<param name="keyword" value="R: infoPlot,IC-method">
<param name="keyword" value=" Plot absolute and relative information">
</object>
@@ -23,7 +25,14 @@
<h3>Usage</h3>
<pre>
-infoPlot(object)
+infoPlot(object, ...)
+## S4 method for signature 'IC':
+infoPlot(object, ..., withSweave = getdistrOption("withSweave"),
+ colI = grey(0.5), lwdI = 0.7*par("lwd"),
+ main = FALSE, inner = TRUE, sub = FALSE,
+ col.inner = par("col.main"), cex.inner = 0.8,
+ bmar = par("mar")[1], tmar = par("mar")[3],
+ mfColRow = TRUE)
</pre>
@@ -33,7 +42,52 @@
<tr valign="top"><td><code>object</code></td>
<td>
object of class <code>"InfluenceCurve"</code> </td></tr>
+<tr valign="top"><td><code>withSweave</code></td>
+<td>
+logical: if <code>TRUE</code> (for working with <CODE>Sweave</CODE>)
+no extra device is opened</td></tr>
+<tr valign="top"><td><code>main</code></td>
+<td>
+logical: is a main title to be used? or <br>
+just as argument <code>main</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>.</td></tr>
+<tr valign="top"><td><code>inner</code></td>
+<td>
+logical: panels have their own titles? or <br>
+character vector of / cast to length number of comparands:
+<code>main</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>)</td></tr>
+<tr valign="top"><td><code>sub</code></td>
+<td>
+logical: is a sub-title to be used? or <br>
+just as argument <code>sub</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>.</td></tr>
+<tr valign="top"><td><code>tmar</code></td>
+<td>
+top margin – useful for non-standard main title sizes</td></tr>
+<tr valign="top"><td><code>bmar</code></td>
+<td>
+bottom margin – useful for non-standard sub title sizes</td></tr>
+<tr valign="top"><td><code>colI</code></td>
+<td>
+color of the classically optimal IC</td></tr>
+<tr valign="top"><td><code>lwdI</code></td>
+<td>
+linewidth of the classically optimal IC</td></tr>
+<tr valign="top"><td><code>cex.inner</code></td>
+<td>
+magnification to be used for inner titles relative
+to the current setting of <code>cex</code>; as in
+<code><a onclick="findlink('stats', 'par.html')" style="text-decoration: underline; color: blue; cursor: hand">par</a></code></td></tr>
+<tr valign="top"><td><code>col.inner</code></td>
+<td>
+character or integer code; color for the inner title</td></tr>
+<tr valign="top"><td><code>mfColRow</code></td>
+<td>
+shall default partition in panels be used — defaults to <code>TRUE</code></td></tr>
+<tr valign="top"><td><code>...</code></td>
+<td>
+</td></tr>
</table>
+<p>
+ {further parameters for <code>plot</code>}</p>
<h3>Details</h3>
@@ -42,10 +96,31 @@
of an IC. The relative information is defined as the
absolute information of one component with respect to the
absolute information of the whole IC; confer Section 8.1
-of Kohl (2005).
+of Kohl (2005). <br>
</p>
+<p>
+Any parameters of <code>plot.default</code> may be passed on to this particular
+<code>plot</code> method.
+</p>
+<p>
+For main-, inner, and subtitles given as arguments <code>main</code>,
+<code>inner</code>, and <code>sub</code>, top and bottom margins are enlarged to 5 resp.
+6 by default but may also be specified by <code>tmar</code> / <code>bmar</code> arguments.
+If <code>main</code> / <code>inner</code> / <code>sub</code> are
+logical then if the respective argument is <code>FALSE</code> nothing is done/plotted,
+but if it is <code>TRUE</code>, we use a default main title taking up the calling
+arguments in case of <code>main</code>, default inner titles taking up the
+class and (named) parameter slots of arguments in case of <code>inner</code>,
+and a "generated on <data>"-tag in case of <code>sub</code>.
+Of course, if <code>main</code> / <code>inner</code> / <code>sub</code> are <code>character</code>, this
+is used for the title; in case of <code>inner</code> it is then checked whether it
+has correct length. In all title arguments, the following patterns are substituted:
+<ul>
+<dt><code>"%C"</code></dt><dd>class of argument <code>object</code></dd>
+<dt><code>"%A"</code></dt><dd>deparsed argument <code>object</code></dd>
+<dt><code>"%D"</code></dt><dd>time/date-string when the plot was generated</dd>
+</ul>
-
<h3>Author(s)</h3>
<p>
@@ -87,6 +162,6 @@
</script>
-<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.0 <a href="00Index.html">Index]</a></div>
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.3 <a href="00Index.html">Index]</a></div>
</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/internals_ddPlot.html (from rev 217, pkg/RobAStBase/chm/internals_ddPlot.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/internals_ddPlot.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/internals_ddPlot.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,193 @@
+<html><head><title>Internal / Helper functions of package RobAStBase for ddPlot</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>internals_for_RobAStBase_ddPlot(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: internals_for_RobAStBase_ddPlot">
+<param name="keyword" value="R: .ddPlot.MatNtNtCoCo">
+<param name="keyword" value=" Internal / Helper functions of package RobAStBase for ddPlot">
+</object>
+
+
+<h2>Internal / Helper functions of package RobAStBase for ddPlot</h2>
+
+
+<h3>Description</h3>
+
+<p>
+This function is an internally used helper function for <code><a href="ddPlot-methods.html">ddPlot</a></code> in package <span class="pkg">RobAStBase</span>.
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+.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, lab.pts, adj =0, cex.idn = 1,
+ col.idn = par("col"), lty.cutoff,
+ lwd.cutoff, col.cutoff = "red")</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>data</code></td>
+<td>
+data in <code>matrix</code> form (columns are observations; rows are variable
+dimensions) at which to produce the <code>ddPlot</code>.</td></tr>
+<tr valign="top"><td><code>...</code></td>
+<td>
+further arguments to be passed to <code>plot.default</code>, <code>text</code>, and <code>abline</code></td></tr>
+<tr valign="top"><td><code>dist.x</code></td>
+<td>
+object of class <code>NormType</code>; the distance for the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>dist.y</code></td>
+<td>
+object of class <code>NormType</code>; the distance for the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>cutoff.x</code></td>
+<td>
+object of class <code>cutoff</code>; the cutoff information for the <code>x</code> axis
+(the vertical line discriminating 'good' and 'bad' points).</td></tr>
+<tr valign="top"><td><code>cutoff.y</code></td>
+<td>
+object of class <code>cutoff</code>; the cutoff information for the <code>y</code> axis
+(the horizontal line discriminating 'good' and 'bad' points).</td></tr>
+<tr valign="top"><td><code>cutoff.quantile.x</code></td>
+<td>
+numeric; the cutoff quantile for the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>cutoff.quantile.y</code></td>
+<td>
+numeric; the cutoff quantile for the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>transform.x</code></td>
+<td>
+function; a transformation to be performed before determining the
+distances of the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>transform.y</code></td>
+<td>
+function; a transformation to be performed before determining the
+distances of the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>id.n</code></td>
+<td>
+a set of indices (or a corresponding logical vector); to select a subset
+of the data in argument <code>data</code>.</td></tr>
+<tr valign="top"><td><code>lab.pts</code></td>
+<td>
+a vector of labels for the (unsubsetted) <code>data</code>.</td></tr>
+<tr valign="top"><td><code>adj</code></td>
+<td>
+the corresponding argument for <code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for
+labelling the outliers.</td></tr>
+<tr valign="top"><td><code>cex.idn</code></td>
+<td>
+the corresponding <code>cex</code> argument for
+<code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for labelling the outliers.</td></tr>
+<tr valign="top"><td><code>col.idn</code></td>
+<td>
+the corresponding <code>col</code> argument for
+<code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for labelling the outliers.</td></tr>
+<tr valign="top"><td><code>lty.cutoff</code></td>
+<td>
+the corresponding <code>lty</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+<tr valign="top"><td><code>lwd.cutoff</code></td>
+<td>
+the corresponding <code>lwd</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+<tr valign="top"><td><code>col.cutoff</code></td>
+<td>
+the corresponding <code>col</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+</table>
+
+<h3>Details</h3>
+
+<p>
+performs the plotting for <code><a href="ddPlot-methods.html">ddPlot</a></code> and <code><a href="outlyingPlotIC.html">outlyingPlotIC</a></code>;
+all arguments except for <code>data</code> are optional. In case they are missing
+default values are used as usual; for those arguments without default arguments,
+we do
+<ul>
+<dt>transform.x</dt><dd>defaults to identity, internally</dd>.
+<dt>id.n</dt><dd>defaults to <code>1:ncol(data)</code>, internally</dd>.
+<dt>lab.pts</dt><dd>defaults to <code>(1:ncol(data))[id.n]</code>, internally</dd>.
+<dt>lwd.cutoff</dt><dd>defaults to argument <code>lwd</code>, if given, else to <code>par{lwd}</code>, internally</dd>.
+<dt>lty.cutoff</dt><dd>defaults to argument <code>lty</code>, if given, else to <code>par{lty}</code>, internally</dd>.
+</ul>
+
+<h3>Value</h3>
+
+<p>
+a list with items
+</p>
+<table summary="R argblock">
+<tr valign="top"><td><code>id.x</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>x</code>-cutoff</td></tr>
+<tr valign="top"><td><code>id.y</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>y</code>-cutoff</td></tr>
+<tr valign="top"><td><code>id.xy</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>x</code>-cutoff and the <code>y</code>-cutoff</td></tr>
+<tr valign="top"><td><code>qtx</code></td>
+<td>
+the quantiles of the distances of the (possibly transformed) data in <code>x</code> direction</td></tr>
+<tr valign="top"><td><code>qty</code></td>
+<td>
+the quantiles of the distances of the (possibly transformed) data in <code>y</code> direction</td></tr>
+<tr valign="top"><td><code>cutoff.x.v</code></td>
+<td>
+the cutoff value in <code>x</code> direction</td></tr>
+<tr valign="top"><td><code>cutoff.y.v</code></td>
+<td>
+the cutoff value in <code>y</code> direction</td></tr>
+</table>
+
+<h3>Author(s)</h3>
+
+<p>
+Peter Ruckdeschel <a href="mailto:Peter.Ruckdeschel at itwm.fraunhofer.de">Peter.Ruckdeschel at itwm.fraunhofer.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a onclick="findlink('graphics', 'plot.default.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>, <code><a onclick="findlink('graphics', 'par.html')" style="text-decoration: underline; color: blue; cursor: hand">par</a></code>,
+<code><a href="ddPlot-methods.html">ddPlot</a></code>, <code><a href="outlyingPlotIC.html">outlyingPlotIC</a></code>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+MX <- matrix(rnorm(1500),nrow=6)
+QM <- matrix(rnorm(36),nrow=6); QM <- QM %*% t(QM)
+RobAStBase:::.ddPlot.MatNtNtCoCo(data=MX,
+ dist.y=QFNorm(QuadF=PosSemDefSymmMatrix(QM)),
+ xlab="Norm.x",ylab="Norm.y", cex.idn = 1.3, offset=0,
+ lwd=2, lwd.cutoff=4, lty=2, col.cutoff =2, col.idn="green",
+ col = "blue", adj=0.4, pos=4,id.n = sample(1:200,size=100),
+ lab.pts=letters,log="x", main="GA", sub="NO",cex.sub=0.2)
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.2 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/kStepEstimate-class.html (from rev 217, pkg/RobAStBase/chm/kStepEstimate-class.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/kStepEstimate-class.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/kStepEstimate-class.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,94 @@
+<html><head><title>kStepEstimate-class.</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>kStepEstimate-class(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: kStepEstimate-class">
+<param name="keyword" value="R: steps">
+<param name="keyword" value="R: steps,kStepEstimate-method">
+<param name="keyword" value="R: show,kStepEstimate-method">
+<param name="keyword" value=" kStepEstimate-class.">
+</object>
+
+
+<h2>kStepEstimate-class.</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Class of asymptotically linear estimates.
+</p>
+
+
+<h3>Objects from the Class</h3>
+
+<p>
+Objects can be created by calls of the form <code>new("kStepEstimate", ...)</code>.
+More frequently they are created via the generating function
+<code>kStepEstimator</code>.
+</p>
+
+
+<h3>Slots</h3>
+
+<dl>
+<dt><code>name</code>:</dt><dd>Object of class <code>"character"</code>:
+name of the estimator. </dd>
+<dt><code>estimate</code>:</dt><dd>Object of class <code>"ANY"</code>:
+estimate. </dd>
+<dt><code>samplesize</code>:</dt><dd>Object of class <code>"numeric"</code>:
+sample size. </dd>
+<dt><code>asvar</code>:</dt><dd>Optional object of class <code>"matrix"</code>:
+asymptotic variance. </dd>
+<dt><code>asbias</code>:</dt><dd>Optional object of class <code>"numeric"</code>:
+asymptotic bias. </dd>
+<dt><code>pIC</code>:</dt><dd>Optional object of class <code>InfluenceCurve</code>:
+influence curve. </dd>
+<dt><code>nuis.idx</code>:</dt><dd>object of class <code>"OptionalNumeric"</code>:
+indices of <code>estimate</code> belonging to the nuisance part. </dd>
+<dt><code>steps</code>:</dt><dd>Object of class <code>"integer"</code>: number
+of steps. </dd>
+<dt><code>Infos</code>:</dt><dd>object of class <code>"matrix"</code>
+with two columns named <code>method</code> and <code>message</code>:
+additional informations. </dd>
+</dl>
+
+<h3>Extends</h3>
+
+<p>
+Class <code>"ALEstimate"</code>, directly.<br>
+Class <code>"Estimate"</code>, by class <code>"ALEstimate"</code>
+</p>
+
+
+<h3>Methods</h3>
+
+<dl>
+<dt>steps</dt><dd><code>signature(object = "kStepEstimate")</code>:
+accessor function for slot <code>steps</code>. </dd>
+
+
+<dt>show</dt><dd><code>signature(object = "kStepEstimate")</code> </dd>
+</dl>
+
+<h3>Author(s)</h3>
+
+<p>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a>
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a href="ALEstimate-class.html">ALEstimate-class</a></code>
+</p>
+
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.0 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/kStepEstimator.html (from rev 217, pkg/RobAStBase/chm/kStepEstimator.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/kStepEstimator.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/kStepEstimator.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,144 @@
+<html><head><title>Generic function for the computation of k-step estimates</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>kStepEstimator(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: kStepEstimator">
+<param name="keyword" value="R: kStepEstimator-methods">
+<param name="keyword" value="R: kStepEstimator,numeric,IC,numeric-method">
+<param name="keyword" value="R: kStepEstimator,matrix,IC,numeric-method">
+<param name="keyword" value="R: kStepEstimator,numeric,IC,Estimate-method">
+<param name="keyword" value="R: kStepEstimator,matrix,IC,Estimate-method">
+<param name="keyword" value=" Generic function for the computation of k-step estimates">
+</object>
+
+
+<h2>Generic function for the computation of k-step estimates</h2>
+
+
+<h3>Description</h3>
+
+<p>
+Generic function for the computation of k-step estimates.
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+kStepEstimator(x, IC, start, ...)
+
+## S4 method for signature 'numeric, IC, numeric':
+kStepEstimator(x, IC, start, steps = 1L,
+ useLast = getRobAStBaseOption("kStepUseLast"))
+## S4 method for signature 'matrix, IC, numeric':
+kStepEstimator(x, IC, start, steps = 1L,
+ useLast = getRobAStBaseOption("kStepUseLast"))
+## S4 method for signature 'numeric, IC, Estimate':
+kStepEstimator(x, IC, start, steps = 1L,
+ useLast = getRobAStBaseOption("kStepUseLast"))
+## S4 method for signature 'matrix, IC, Estimate':
+kStepEstimator(x, IC, start, steps = 1L,
+ useLast = getRobAStBaseOption("kStepUseLast"))
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>x</code></td>
+<td>
+sample </td></tr>
+<tr valign="top"><td><code>IC</code></td>
+<td>
+object of class <code>"IC"</code> </td></tr>
+<tr valign="top"><td><code>start</code></td>
+<td>
+initial estimate </td></tr>
+<tr valign="top"><td><code>steps</code></td>
+<td>
+integer: number of steps </td></tr>
+<tr valign="top"><td><code>useLast</code></td>
+<td>
+which parameter estimate (initial estimate or
+k-step estimate) shall be used to fill the slots <code>pIC</code>,
+<code>asvar</code> and <code>asbias</code> of the return value. </td></tr>
+<tr valign="top"><td><code>...</code></td>
+<td>
+additional parameters </td></tr>
+</table>
+
+<h3>Details</h3>
+
+<p>
+Given an initial estimation <code>start</code>, a sample <code>x</code>
+and an influence curve <code>IC</code> the corresponding k-step
+estimator is computed.
+</p>
+<p>
+The default value of argument <code>useLast</code> is set by the
+global option <code>kStepUseLast</code> which by default is set to
+<code>FALSE</code>. In case of general models <code>useLast</code>
+remains unchanged during the computations. However, if
+slot <code>CallL2Fam</code> of <code>IC</code> generates an object of
+class <code>"L2GroupParamFamily"</code> the value of <code>useLast</code>
+is changed to <code>TRUE</code>.
+Explicitly setting <code>useLast</code> to <code>TRUE</code> should
+be done with care as in this situation the influence curve
+is re-computed using the value of the one-step estimate
+which may take quite a long time depending on the model.
+</p>
+<p>
+If <code>useLast</code> is set to <code>TRUE</code> and slot <code>modifyIC</code>
+of <code>IC</code> is filled with some function (which can be
+used to re-compute the IC for a different parameter), the
+computation of <code>asvar</code>, <code>asbias</code> and <code>IC</code> is
+based on the k-step estimate.
+</p>
+
+
+<h3>Value</h3>
+
+<p>
+Object of class <code>"kStepEstimate"</code>.</p>
+
+<h3>Methods</h3>
+
+<dl>
+<dt>x = "numeric", IC = "IC", start = "numeric"</dt><dd>univariate samples. </dd>
+<dt>x = "matrix", IC = "IC", start = "numeric"</dt><dd>multivariate samples. </dd>
+<dt>x = "matrix", IC = "IC", start = "Estimate"</dt><dd>multivariate samples. </dd>
+<dt>x = "matrix", IC = "IC", start = "Estimate"</dt><dd>multivariate samples. </dd>
+</dl>
+
+<h3>Author(s)</h3>
+
+<p>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a>
+</p>
+
+
+<h3>References</h3>
+
+<p>
+Rieder, H. (1994) <EM>Robust Asymptotic Statistics</EM>. New York: Springer.
+</p>
+<p>
+Kohl, M. (2005) <EM>Numerical Contributions to the Asymptotic Theory of Robustness</EM>.
+Bayreuth: Dissertation.
+</p>
+
+
+<h3>See Also</h3>
+
+<p>
+<code><a href="IC-class.html">IC-class</a></code>, <code><a href="kStepEstimate-class.html">kStepEstimate-class</a></code>
+</p>
+
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.0 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/outlyingPlotIC.html (from rev 217, pkg/RobAStBase/chm/outlyingPlotIC.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/outlyingPlotIC.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/outlyingPlotIC.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,182 @@
+<html><head><title>Function outlyingPlotIC in Package ‘RobAStBase’</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>outlyingPlotIC(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: outlyingPlotIC">
+<param name="keyword" value=" Function outlyingPlotIC in Package ‘RobAStBase’">
+</object>
+
+
+<h2>Function outlyingPlotIC in Package ‘RobAStBase’</h2>
+
+
+<h3>Description</h3>
+
+<p>
+outlyingPlotIC produces an outlyingness plot based on distances applied
+to ICs
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>
+outlyingPlotIC(data, IC.x, IC.y = IC.x, dist.x = NormType(),
+ dist.y, cutoff.y = cutoff.chisq(), cutoff.x = cutoff.sememp(), ...,
+ cutoff.quantile.x = 0.95,
+ cutoff.quantile.y = cutoff.quantile.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff,
+ main = gettext("Outlyingness by means of a distance-distance plot")
+ )
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>data</code></td>
+<td>
+data coercable to <code>matrix</code>; the data at which to produce the <code>ddPlot</code>.</td></tr>
+<tr valign="top"><td><code>IC.x</code></td>
+<td>
+object of class <code>IC</code> the influence curve to produce
+the distances for the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>IC.y</code></td>
+<td>
+object of class <code>IC</code> the influence curve to produce
+the distances for the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>...</code></td>
+<td>
+further arguments to be passed to <code>plot.default</code>, <code>text</code>, and <code>abline</code></td></tr>
+<tr valign="top"><td><code>dist.x</code></td>
+<td>
+object of class <code>NormType</code>; the distance for the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>dist.y</code></td>
+<td>
+object of class <code>NormType</code>; the distance for the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>cutoff.x</code></td>
+<td>
+object of class <code>cutoff</code>; the cutoff information for the <code>x</code> axis
+(the vertical line discriminating 'good' and 'bad' points).</td></tr>
+<tr valign="top"><td><code>cutoff.y</code></td>
+<td>
+object of class <code>cutoff</code>; the cutoff information for the <code>y</code> axis
+(the horizontal line discriminating 'good' and 'bad' points).</td></tr>
+<tr valign="top"><td><code>cutoff.quantile.x</code></td>
+<td>
+numeric; the cutoff quantile for the <code>x</code> axis.</td></tr>
+<tr valign="top"><td><code>cutoff.quantile.y</code></td>
+<td>
+numeric; the cutoff quantile for the <code>y</code> axis.</td></tr>
+<tr valign="top"><td><code>id.n</code></td>
+<td>
+a set of indices (or a corresponding logical vector); to select a subset
+of the data in argument <code>data</code>.</td></tr>
+<tr valign="top"><td><code>lab.pts</code></td>
+<td>
+a vector of labels for the (unsubsetted) <code>data</code>.</td></tr>
+<tr valign="top"><td><code>adj</code></td>
+<td>
+the corresponding argument for <code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for
+labelling the outliers.</td></tr>
+<tr valign="top"><td><code>cex.idn</code></td>
+<td>
+the corresponding <code>cex</code> argument for
+<code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for labelling the outliers.</td></tr>
+<tr valign="top"><td><code>col.idn</code></td>
+<td>
+the corresponding <code>col</code> argument for
+<code><a onclick="findlink('graphics', 'text.html')" style="text-decoration: underline; color: blue; cursor: hand">text</a></code> for labelling the outliers.</td></tr>
+<tr valign="top"><td><code>lty.cutoff</code></td>
+<td>
+the corresponding <code>lty</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+<tr valign="top"><td><code>lwd.cutoff</code></td>
+<td>
+the corresponding <code>lwd</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+<tr valign="top"><td><code>col.cutoff</code></td>
+<td>
+the corresponding <code>col</code> argument for
+<code><a onclick="findlink('graphics', 'abline.html')" style="text-decoration: underline; color: blue; cursor: hand">abline</a></code> for drawing the cutoff lines.</td></tr>
+<tr valign="top"><td><code>main</code></td>
+<td>
+the main title.</td></tr>
+</table>
+
+<h3>Details</h3>
+
+<p>
+calls a corresponding <code><a href="ddPlot-methods.html">ddPlot</a></code> method to produce the plot.
+</p>
+
+
+<h3>Value</h3>
+
+<p>
+a list with items
+</p>
+<table summary="R argblock">
+<tr valign="top"><td><code>id.x</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>x</code>-cutoff</td></tr>
+<tr valign="top"><td><code>id.y</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>y</code>-cutoff</td></tr>
+<tr valign="top"><td><code>id.xy</code></td>
+<td>
+the indices of (possibly transformed) data (within subset <code>id.n</code>) beyond the <code>x</code>-cutoff and the <code>y</code>-cutoff</td></tr>
+<tr valign="top"><td><code>qtx</code></td>
+<td>
+the quantiles of the distances of the (possibly transformed) data in <code>x</code> direction</td></tr>
+<tr valign="top"><td><code>qty</code></td>
+<td>
+the quantiles of the distances of the (possibly transformed) data in <code>y</code> direction</td></tr>
+<tr valign="top"><td><code>cutoff.x.v</code></td>
+<td>
+the cutoff value in <code>x</code> direction</td></tr>
+<tr valign="top"><td><code>cutoff.y.v</code></td>
+<td>
+the cutoff value in <code>y</code> direction</td></tr>
+</table>
+
+<h3>Author(s)</h3>
+
+<p>
+Peter Ruckdeschel <a href="mailto:Peter.Ruckdeschel at itwm.fraunhofer.de">Peter.Ruckdeschel at itwm.fraunhofer.de</a>
+</p>
+
+
+<h3>Examples</h3>
+
+<pre>
+if(require(ROptEst)){
+## generates normal location and scale family with mean = -2 and sd = 3
+N0 <- NormLocationScaleFamily()
+N0.IC0 <- optIC(model = N0, risk = asCov())
+N0.Rob1 <- InfRobModel(center = N0, neighbor = ContNeighborhood(radius = 0.5))
+N0.IC1 <- optIC(model = N0.Rob1, risk = asMSE())
+xn <- c(rnorm(100),rcauchy(20)+20)
+outlyingPlotIC(xn, IC.x=N0.IC0)
+outlyingPlotIC(xn, IC.x=N0.IC1)
+}
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.2 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/chm/plot-methods.html (from rev 217, pkg/RobAStBase/chm/plot-methods.html)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/chm/plot-methods.html (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/chm/plot-methods.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,134 @@
+<html><head><title>Methods for Function plot in Package ‘RobAStBase’</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" type="text/css" href="Rchm.css">
+</head>
+<body>
+
+<table width="100%"><tr><td>plot-methods(RobAStBase)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<param name="keyword" value="R: plot">
+<param name="keyword" value="R: plot-methods">
+<param name="keyword" value="R: plot,IC,missing-method">
+<param name="keyword" value=" Methods for Function plot in Package ‘RobAStBase’">
+</object>
+
+
+<h2>Methods for Function plot in Package ‘RobAStBase’</h2>
+
+
+<h3>Description</h3>
+
+<p>
+plot-methods
+</p>
+
+
+<h3>Usage</h3>
+
+<pre>plot(x, y, ...)
+## S4 method for signature 'IC, missing':
+plot(x, ..., withSweave = getdistrOption("withSweave"),
+ main = FALSE, inner = TRUE, sub = FALSE,
+ col.inner = par("col.main"), cex.inner = 0.8,
+ bmar = par("mar")[1], tmar = par("mar")[3],
+ mfColRow = TRUE)
+</pre>
+
+
+<h3>Arguments</h3>
+
+<table summary="R argblock">
+<tr valign="top"><td><code>x</code></td>
+<td>
+object of class <code>"IC"</code>: IC to be plotted </td></tr>
+<tr valign="top"><td><code>y</code></td>
+<td>
+missing </td></tr>
+<tr valign="top"><td><code>withSweave</code></td>
+<td>
+logical: if <code>TRUE</code> (for working with <CODE>Sweave</CODE>)
+no extra device is opened</td></tr>
+<tr valign="top"><td><code>main</code></td>
+<td>
+logical: is a main title to be used? or <br>
+just as argument <code>main</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>.</td></tr>
+<tr valign="top"><td><code>inner</code></td>
+<td>
+logical: panels have their own titles? or <br>
+character vector of / cast to length number of comparands:
+<code>main</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>)</td></tr>
+<tr valign="top"><td><code>sub</code></td>
+<td>
+logical: is a sub-title to be used? or <br>
+just as argument <code>sub</code> in <code><a onclick="findlink('graphics', 'plotdefault.html')" style="text-decoration: underline; color: blue; cursor: hand">plot.default</a></code>.</td></tr>
+<tr valign="top"><td><code>tmar</code></td>
+<td>
+top margin – useful for non-standard main title sizes</td></tr>
+<tr valign="top"><td><code>bmar</code></td>
+<td>
+bottom margin – useful for non-standard sub title sizes</td></tr>
+<tr valign="top"><td><code>cex.inner</code></td>
+<td>
+magnification to be used for inner titles relative
+to the current setting of <code>cex</code>; as in
+<code><a onclick="findlink('stats', 'par.html')" style="text-decoration: underline; color: blue; cursor: hand">par</a></code></td></tr>
+<tr valign="top"><td><code>col.inner</code></td>
+<td>
+character or integer code; color for the inner title</td></tr>
+<tr valign="top"><td><code>mfColRow</code></td>
+<td>
+shall default partition in panels be used — defaults to <code>TRUE</code></td></tr>
+<tr valign="top"><td><code>...</code></td>
+<td>
+</td></tr>
+</table>
+<p>
+ {further parameters for <code>plot</code>}</p>
+
+<h3>Details</h3>
+
+<p>
+Any parameters of <code>plot.default</code> may be passed on to this particular
+<code>plot</code> method.
+</p>
+<p>
+For main-, inner, and subtitles given as arguments <code>main</code>,
+<code>inner</code>, and <code>sub</code>, top and bottom margins are enlarged to 5 resp.
+6 by default but may also be specified by <code>tmar</code> / <code>bmar</code> arguments.
+If <code>main</code> / <code>inner</code> / <code>sub</code> are
+logical then if the respective argument is <code>FALSE</code> nothing is done/plotted,
+but if it is <code>TRUE</code>, we use a default main title taking up the calling
+arguments in case of <code>main</code>, default inner titles taking up the
+class and (named) parameter slots of arguments in case of <code>inner</code>,
+and a "generated on <data>"-tag in case of <code>sub</code>.
+Of course, if <code>main</code> / <code>inner</code> / <code>sub</code> are <code>character</code>, this
+is used for the title; in case of <code>inner</code> it is then checked whether it
+has correct length. In all title arguments, the following patterns are substituted:
+<ul>
+<dt><code>"%C"</code></dt><dd>class of argument <code>object</code></dd>
+<dt><code>"%A"</code></dt><dd>deparsed argument <code>object</code></dd>
+<dt><code>"%D"</code></dt><dd>time/date-string when the plot was generated</dd>
+</ul>
+
+<h3>Examples</h3>
+
+<pre>
+IC1 <- new("IC")
+plot(IC1)
+plot(IC1, main = TRUE, panel.first= grid(),
+ col = "blue", cex.main = 2, cex.inner = 1)
+</pre>
+
+<script Language="JScript">
+function findlink(pkg, fn) {
+var Y, link;
+Y = location.href.lastIndexOf("\\") + 1;
+link = location.href.substring(0, Y);
+link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
+location.href = link;
+}
+</script>
+
+
+<hr><div align="center">[Package <em>RobAStBase</em> version 0.1.3 <a href="00Index.html">Index]</a></div>
+
+</body></html>
Copied: branches/robast-0.7/pkg/RobAStBase/man/0RobAStBase-package.Rd (from rev 217, pkg/RobAStBase/man/0RobAStBase-package.Rd)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/man/0RobAStBase-package.Rd (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/man/0RobAStBase-package.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,47 @@
+\name{RobAStBase-package}
+\alias{RobAStBase-package}
+\alias{RobAStBase}
+\docType{package}
+\title{
+Robust Asymptotic Statistics
+}
+\description{
+Base S4-classes and functions for robust asymptotic statistics.
+}
+\details{
+\tabular{ll}{
+Package: \tab RobAStBase\cr
+Version: \tab 0.2\cr
+Date: \tab 2008-11-25\cr
+Depends: \tab R(>= 2.7.0), methods, distr(>= 2.0), distrEx(>= 2.0),
+distrMod(>= 2.0), RandVar(>= 0.6.3)\cr
+LazyLoad: \tab yes\cr
+License: \tab LGPL-3\cr
+URL: \tab http://robast.r-forge.r-project.org/\cr
+}
+}
+\author{
+Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de},\cr%
+Matthias Kohl \email{Matthias.Kohl at stamats.de}\cr
+
+Maintainer: Matthias Kohl \email{matthias.kohl at stamats.de}}
+\references{
+ M. Kohl (2005). Numerical Contributions to the Asymptotic Theory of Robustness.
+ Dissertation. University of Bayreuth.
+}
+\seealso{
+\code{\link[distr]{distr-package}}, \code{\link[distrEx]{distrEx-package}},
+\code{\link[distrMod]{distrMod-package}}
+}
+\examples{
+library(RobAStBase)
+
+## some L2 differentiable parametric family from package distrMod, e.g.
+B <- BinomFamily(size = 25, prob = 0.25)
+
+## classical optimal IC
+IC0 <- optIC(model = B, risk = asCov())
+plot(IC0) # plot IC
+checkIC(IC0, B)
+}
+\keyword{package}
Modified: branches/robast-0.7/pkg/RobAStBase/man/ALEstimate-class.Rd
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/man/ALEstimate-class.Rd 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/man/ALEstimate-class.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -6,6 +6,10 @@
\alias{asbias}
\alias{asbias,ALEstimate-method}
\alias{show,ALEstimate-method}
+\alias{confint,ALEstimate,missing-method}
+\alias{confint,ALEstimate,symmetricBias-method}
+\alias{confint,ALEstimate,onesidedBias-method}
+\alias{confint,ALEstimate,asymmetricBias-method}
\title{ALEstimate-class.}
\description{Class of asymptotically linear estimates.}
@@ -42,6 +46,21 @@
accessor function for slot \code{pIC}. }
\item{show}{\code{signature(object = "ALEstimate")} }
+
+ \item{confint}{\code{signature(object = "ALEstimate", method = "missing")}:
+ compute asymptotic (LAN-based) confidence interval neglecting any bias. }
+
+ \item{confint}{\code{signature(object = "ALEstimate", method = "symmetricBias")}:
+ compute asymptotic (LAN-based) confidence interval incorporating bias
+ symmetrically. }
+
+ \item{confint}{\code{signature(object = "ALEstimate", method = "onesidedBias")}:
+ compute asymptotic (LAN-based) confidence interval incorporating bias
+ one-sided; i.e., positive or negative, respectively. }
+
+ \item{confint}{\code{signature(object = "ALEstimate", method = "asymmetricBias")}:
+ compute asymptotic (LAN-based) confidence interval incorporating bias
+ asymmetrically. }
}
}
%\references{}
Modified: branches/robast-0.7/pkg/RobAStBase/man/IC-class.Rd
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/man/IC-class.Rd 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobAStBase/man/IC-class.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -11,7 +11,6 @@
\alias{checkIC,IC,L2ParamFamily-method}
\alias{evalIC,IC,numeric-method}
\alias{evalIC,IC,matrix-method}
-\alias{infoPlot,IC-method}
\alias{show,IC-method}
\title{Influence curve}
@@ -72,7 +71,7 @@
\item{infoPlot}{\code{signature(object = "IC")}:
Plot absolute and relative information of \code{IC}. }
- \item{plot}{\code{signature(x = "IC")}}
+ \item{plot}{\code{signature(x = "IC", y = "missing")}}
\item{show}{\code{signature(object = "IC")}}
}
Copied: branches/robast-0.7/pkg/RobAStBase/man/cutoff-class.Rd (from rev 217, pkg/RobAStBase/man/cutoff-class.Rd)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/man/cutoff-class.Rd (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/man/cutoff-class.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,64 @@
+\name{cutoff-class}
+\docType{class}
+\alias{cutoff-class}
+\alias{cutoff.quantile<-,cutoff-method}
+\alias{cutoff.quantile<-}
+\alias{cutoff.quantile,cutoff-method}
+\alias{cutoff.quantile}
+\alias{name,cutoff-method}
+\alias{fct,cutoff-method}
+
+\title{Cutoff class for distance-distance plots}
+\description{Class of methods to determine cutoff point for distance-distance plots;
+ used to derive other cutoff methods later by method dispatch.
+}
+\section{Objects from the Class}{
+ Objects could in principle be created by calls of the form \code{new("cutoff", ...)}.
+ More frequently they are created via the generating function
+ \code{\link{cutoff}}, respectively via the helper functions
+ \code{cutoff.sememp} and \code{cutoff.chisq}.
+}
+\section{Slots}{
+ \describe{
+ \item{\code{name}:}{ object of class \code{"character"}; defaults to \code{"empirical"}
+ in prototype; }
+
+ \item{\code{fct}:}{ an object of of class \code{"function"};
+ for this class layer, this function
+ must only have one argument \code{data} (which may
+ but need not be used to determine the cutoff point empirically);
+ in derived classes this restriction could be dropped, if corresponding
+ special methods for \code{ddPlot} are derived. Defaults to
+ \code{function(data) quantile(data)}.}
+
+ \item{\code{cutoff.quantile}:}{ Object of class \code{"numeric"}:
+ a quantile (empirical or theoretical) to plot the cutoff line; defaults
+ to \code{0.95} in prototype;}
+
+ }
+}
+\section{Methods}{
+ \describe{
+
+ \item{cutoff.quantile}{\code{signature(object = "cutoff")}:
+ accessor function for slot \code{cutoff.quantile}. }
+
+ \item{cutoff.quantile<-}{\code{signature(object = "cutoff")}:
+ replacement function for slot \code{cutoff.quantile}. }
+
+ \item{fct}{\code{signature(object = "cutoff")}:
+ accessor function for slot \code{fct}. }
+
+ \item{name}{\code{signature(object = "cutoff")}:
+ accessor function for slot \code{name}. }
+
+
+ }
+}
+\author{Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}}
+%\note{}
+\seealso{\code{\link{ddPlot}}, \code{\link{outlyingPlotIC}} \code{\link{cutoff}}}
+\examples{
+cutoff()
+}
+\keyword{classes}
Copied: branches/robast-0.7/pkg/RobAStBase/man/cutoff.Rd (from rev 217, pkg/RobAStBase/man/cutoff.Rd)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/man/cutoff.Rd (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/man/cutoff.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,62 @@
+\name{cutoff}
+\alias{cutoff}
+\alias{cutoff.sememp}
+\alias{cutoff.chisq}
+
+\title{Generating function(s) for class 'cutoff'}
+\description{
+ Generating function(s) for class \code{cutoff}.
+}
+\usage{
+cutoff(name = "empirical", body.fct0,
+ cutoff.quantile = 0.95,
+ norm = NormType(), QF, nsim = 100000)
+cutoff.sememp()
+cutoff.chisq()
+}
+\arguments{
+ \item{name}{argument for name slot of \code{cutoff} object}
+ \item{body.fct0}{a call generated by code wrapped to \code{substitute} resp. \code{quote};
+ the body of the \code{fct} slot of the \code{cutoff} object}
+ \item{cutoff.quantile}{numeric; the corresponding slot value for the \code{cutoff} object}
+ \item{norm}{an object of class \code{NormType} -- the norm/distance by which to produce
+ the cutoff - value.}
+ \item{nsim}{ integer: the sample size used for determining the quantiles
+ of \eqn{(x^\tau Q x)^{1/2}}{x'Qx\^.5} for \eqn{x} multivariate standard
+ normal and \eqn{Q} a corresponding quadratic form}
+ \item{QF}{ a quadratic (positive semidefinite, symmetric) matrix used
+ as quadratic form }
+}
+\details{
+\code{cutoff} generates a valid object of class \code{"cutoff"}.
+As function slot \code{fct} may only have a formal argument \code{data},
+the other arguments to determine the cutoff value, i.e. \code{norm}, \code{QF}, \code{nsim},
+\code{cutoff.quantile}, \code{nsim} have to enter the scope of this
+function by lexical scoping; now \code{cutoff.quantile}, \code{norm}, \code{QF}
+are to be taken from the calling environment (not from the defining one),
+so we have delay evaluation of the function body, which is why we assume
+it to be given wrapped into \code{substitute} resp. \code{quote}.
+\code{body.fct0} is by default (i.e. if argument \code{body.fct0} is missing) set
+to \code{quote(quantile(slot(norm,"fct")(data), cutoff.quantile))}, internally,
+i.e.; to an empirical quantile of the corresponding norms.\cr
+
+\code{cutoff.sememp()} is a helper function generating the theoretical (asymptotic)
+quantile of (the square root of) a corresponding quadratic form, assuming multivariate
+normality; to determine this quantile \code{nsim} simulations are used.\cr
+
+\code{cutoff.chisq()} is a helper function generating the theoretical (asymptotic)
+quantile of (the square root of) a (self-standardized) quadratic form, assuming multivariate
+normality; i.e.; a corresponding quantile of a Chi-Square distribution.
+}
+\value{Object of class \code{"cutoff"}.}
+\author{
+ Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}
+ }
+%\note{}
+\seealso{\code{\link{cutoff-class}}, \code{\link{ddPlot}} }
+\examples{
+cutoff()
+cutoff.sememp()
+cutoff.chisq()
+}
+\keyword{hplot}
Copied: branches/robast-0.7/pkg/RobAStBase/man/ddPlot-methods.Rd (from rev 217, pkg/RobAStBase/man/ddPlot-methods.Rd)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/man/ddPlot-methods.Rd (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/man/ddPlot-methods.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,89 @@
+\name{ddPlot-methods}
+\docType{methods}
+\alias{ddPlot}
+\alias{ddPlot-methods}
+\alias{ddPlot,matrix-method}
+\alias{ddPlot,numeric-method}
+\alias{ddPlot,data.frame-method}
+\title{ Methods for Function ddPlot in Package `RobAStBase' }
+\description{ddPlot-methods}
+\usage{
+ddPlot(data, dist.x, dist.y, cutoff.x, cutoff.y, ...)
+\S4method{ddPlot}{matrix}(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff)
+\S4method{ddPlot}{numeric}(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff)
+\S4method{ddPlot}{data.frame}(data, dist.x = NormType(), dist.y = NormType(),
+ cutoff.x, cutoff.y, ...,
+ cutoff.quantile.x = 0.95, cutoff.quantile.y = cutoff.quantile.x,
+ transform.x, transform.y = transform.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff)
+}
+\arguments{
+ \item{data}{data coercable to \code{matrix}; the data at which to produce the \code{ddPlot}.}
+ \item{\dots}{further arguments to be passed to \code{plot.default}, \code{text}, and \code{abline}}
+ \item{dist.x}{object of class \code{NormType}; the distance for the \code{x} axis.}
+ \item{dist.y}{object of class \code{NormType}; the distance for the \code{y} axis.}
+ \item{cutoff.x}{object of class \code{cutoff}; the cutoff information for the \code{x} axis
+ (the vertical line discriminating 'good' and 'bad' points).}
+ \item{cutoff.y}{object of class \code{cutoff}; the cutoff information for the \code{y} axis
+ (the horizontal line discriminating 'good' and 'bad' points).}
+ \item{cutoff.quantile.x}{numeric; the cutoff quantile for the \code{x} axis.}
+ \item{cutoff.quantile.y}{numeric; the cutoff quantile for the \code{y} axis.}
+ \item{transform.x}{function; a transformation to be performed before determining the
+ distances of the \code{x} axis.}
+ \item{transform.y}{function; a transformation to be performed before determining the
+ distances of the \code{y} axis.}
+ \item{id.n}{a set of indices (or a corresponding logical vector); to select a subset
+ of the data in argument \code{data}.}
+ \item{lab.pts}{a vector of labels for the (unsubsetted) \code{data}.}
+ \item{adj}{the corresponding argument for \code{\link[graphics]{text}} for
+ labelling the outliers.}
+ \item{cex.idn}{the corresponding \code{cex} argument for
+ \code{\link[graphics]{text}} for labelling the outliers.}
+ \item{col.idn}{the corresponding \code{col} argument for
+ \code{\link[graphics]{text}} for labelling the outliers.}
+ \item{lty.cutoff}{the corresponding \code{lty} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+ \item{lwd.cutoff}{the corresponding \code{lwd} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+ \item{col.cutoff}{the corresponding \code{col} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+}
+\details{
+The \code{matrix}-method calls \code{.ddPlot.MatNtNtCoCo},
+the \code{numeric}- and \code{data.frame}-methods coerce argument \code{data}
+to \code{matrix} --- the \code{numeric}-method by a call to \code{matrix(data, nrow=1)},
+in the \code{data.frame}-methods by a call to \code{t(as.matrix(data))}.
+}
+\value{
+a list with items
+\item{id.x}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{x}-cutoff}
+\item{id.y}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{y}-cutoff}
+\item{id.xy}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{x}-cutoff and the \code{y}-cutoff}
+\item{qtx}{the quantiles of the distances of the (possibly transformed) data in \code{x} direction}
+\item{qty}{the quantiles of the distances of the (possibly transformed) data in \code{y} direction}
+\item{cutoff.x.v}{the cutoff value in \code{x} direction}
+\item{cutoff.y.v}{the cutoff value in \code{y} direction}
+}
+\author{
+ Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}
+ }
+
+\examples{
+MX <- matrix(rnorm(1500),nrow=6)
+QM <- matrix(rnorm(36),nrow=6); QM <- QM \%*\% t(QM)
+ddPlot(data=MX, dist.y=QFNorm(QuadF=PosSemDefSymmMatrix(QM)))
+}
+\keyword{methods}
+\keyword{hplot}
+
Copied: branches/robast-0.7/pkg/RobAStBase/man/internals_ddPlot.Rd (from rev 217, pkg/RobAStBase/man/internals_ddPlot.Rd)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/man/internals_ddPlot.Rd (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/man/internals_ddPlot.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,98 @@
+\name{internals_for_RobAStBase_ddPlot}
+\alias{internals_for_RobAStBase_ddPlot}
+\alias{.ddPlot.MatNtNtCoCo}
+
+\title{Internal / Helper functions of package RobAStBase for ddPlot}
+
+\description{
+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, lab.pts, adj =0, cex.idn = 1,
+ col.idn = par("col"), lty.cutoff,
+ lwd.cutoff, col.cutoff = "red")}
+
+\arguments{
+ \item{data}{data in \code{matrix} form (columns are observations; rows are variable
+ dimensions) at which to produce the \code{ddPlot}.}
+ \item{\dots}{further arguments to be passed to \code{plot.default}, \code{text}, and \code{abline}}
+ \item{dist.x}{object of class \code{NormType}; the distance for the \code{x} axis.}
+ \item{dist.y}{object of class \code{NormType}; the distance for the \code{y} axis.}
+ \item{cutoff.x}{object of class \code{cutoff}; the cutoff information for the \code{x} axis
+ (the vertical line discriminating 'good' and 'bad' points).}
+ \item{cutoff.y}{object of class \code{cutoff}; the cutoff information for the \code{y} axis
+ (the horizontal line discriminating 'good' and 'bad' points).}
+ \item{cutoff.quantile.x}{numeric; the cutoff quantile for the \code{x} axis.}
+ \item{cutoff.quantile.y}{numeric; the cutoff quantile for the \code{y} axis.}
+ \item{transform.x}{function; a transformation to be performed before determining the
+ distances of the \code{x} axis.}
+ \item{transform.y}{function; a transformation to be performed before determining the
+ distances of the \code{y} axis.}
+ \item{id.n}{a set of indices (or a corresponding logical vector); to select a subset
+ of the data in argument \code{data}.}
+ \item{lab.pts}{a vector of labels for the (unsubsetted) \code{data}.}
+ \item{adj}{the corresponding argument for \code{\link[graphics]{text}} for
+ labelling the outliers.}
+ \item{cex.idn}{the corresponding \code{cex} argument for
+ \code{\link[graphics]{text}} for labelling the outliers.}
+ \item{col.idn}{the corresponding \code{col} argument for
+ \code{\link[graphics]{text}} for labelling the outliers.}
+ \item{lty.cutoff}{the corresponding \code{lty} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+ \item{lwd.cutoff}{the corresponding \code{lwd} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+ \item{col.cutoff}{the corresponding \code{col} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+}
+
+\details{
+performs the plotting for \code{\link{ddPlot}} and \code{\link{outlyingPlotIC}};
+all arguments except for \code{data} are optional. In case they are missing
+default values are used as usual; for those arguments without default arguments,
+we do
+\itemize{
+\item{transform.x}{defaults to identity, internally}.
+\item{id.n}{defaults to \code{1:ncol(data)}, internally}.
+\item{lab.pts}{defaults to \code{(1:ncol(data))[id.n]}, internally}.
+\item{lwd.cutoff}{defaults to argument \code{lwd}, if given, else to \code{par{lwd}}, internally}.
+\item{lty.cutoff}{defaults to argument \code{lty}, if given, else to \code{par{lty}}, internally}.
+}
+}
+
+
+\value{
+a list with items
+\item{id.x}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{x}-cutoff}
+\item{id.y}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{y}-cutoff}
+\item{id.xy}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{x}-cutoff and the \code{y}-cutoff}
+\item{qtx}{the quantiles of the distances of the (possibly transformed) data in \code{x} direction}
+\item{qty}{the quantiles of the distances of the (possibly transformed) data in \code{y} direction}
+\item{cutoff.x.v}{the cutoff value in \code{x} direction}
+\item{cutoff.y.v}{the cutoff value in \code{y} direction}
+}
+
+
+\author{
+ Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}
+ }
+\seealso{\code{\link[graphics]{plot.default}}, \code{\link[graphics]{par}},
+ \code{\link{ddPlot}}, \code{\link{outlyingPlotIC}}}
+
+\examples{
+MX <- matrix(rnorm(1500),nrow=6)
+QM <- matrix(rnorm(36),nrow=6); QM <- QM \%*\% t(QM)
+RobAStBase:::.ddPlot.MatNtNtCoCo(data=MX,
+ dist.y=QFNorm(QuadF=PosSemDefSymmMatrix(QM)),
+ xlab="Norm.x",ylab="Norm.y", cex.idn = 1.3, offset=0,
+ lwd=2, lwd.cutoff=4, lty=2, col.cutoff =2, col.idn="green",
+ col = "blue", adj=0.4, pos=4,id.n = sample(1:200,size=100),
+ lab.pts=letters,log="x", main="GA", sub="NO",cex.sub=0.2)
+}
+\keyword{internal}
+\concept{utilities}
+\keyword{hplot}
Copied: branches/robast-0.7/pkg/RobAStBase/man/outlyingPlotIC.Rd (from rev 217, pkg/RobAStBase/man/outlyingPlotIC.Rd)
===================================================================
--- branches/robast-0.7/pkg/RobAStBase/man/outlyingPlotIC.Rd (rev 0)
+++ branches/robast-0.7/pkg/RobAStBase/man/outlyingPlotIC.Rd 2008-11-25 10:41:15 UTC (rev 218)
@@ -0,0 +1,79 @@
+\name{outlyingPlotIC}
+\alias{outlyingPlotIC}
+\title{Function outlyingPlotIC in Package `RobAStBase' }
+\description{outlyingPlotIC produces an outlyingness plot based on distances applied
+to ICs}
+\usage{
+outlyingPlotIC(data, IC.x, IC.y = IC.x, dist.x = NormType(),
+ dist.y, cutoff.y = cutoff.chisq(), cutoff.x = cutoff.sememp(), ...,
+ cutoff.quantile.x = 0.95,
+ cutoff.quantile.y = cutoff.quantile.x,
+ id.n, lab.pts, adj, cex.idn,
+ col.idn, lty.cutoff, lwd.cutoff, col.cutoff,
+ main = gettext("Outlyingness by means of a distance-distance plot")
+ )
+}
+\arguments{
+ \item{data}{data coercable to \code{matrix}; the data at which to produce the \code{ddPlot}.}
+ \item{IC.x}{object of class \code{IC} the influence curve to produce
+ the distances for the \code{x} axis.}
+ \item{IC.y}{object of class \code{IC} the influence curve to produce
+ the distances for the \code{y} axis.}
+ \item{\dots}{further arguments to be passed to \code{plot.default}, \code{text}, and \code{abline}}
+ \item{dist.x}{object of class \code{NormType}; the distance for the \code{x} axis.}
+ \item{dist.y}{object of class \code{NormType}; the distance for the \code{y} axis.}
+ \item{cutoff.x}{object of class \code{cutoff}; the cutoff information for the \code{x} axis
+ (the vertical line discriminating 'good' and 'bad' points).}
+ \item{cutoff.y}{object of class \code{cutoff}; the cutoff information for the \code{y} axis
+ (the horizontal line discriminating 'good' and 'bad' points).}
+ \item{cutoff.quantile.x}{numeric; the cutoff quantile for the \code{x} axis.}
+ \item{cutoff.quantile.y}{numeric; the cutoff quantile for the \code{y} axis.}
+ \item{id.n}{a set of indices (or a corresponding logical vector); to select a subset
+ of the data in argument \code{data}.}
+ \item{lab.pts}{a vector of labels for the (unsubsetted) \code{data}.}
+ \item{adj}{the corresponding argument for \code{\link[graphics]{text}} for
+ labelling the outliers.}
+ \item{cex.idn}{the corresponding \code{cex} argument for
+ \code{\link[graphics]{text}} for labelling the outliers.}
+ \item{col.idn}{the corresponding \code{col} argument for
+ \code{\link[graphics]{text}} for labelling the outliers.}
+ \item{lty.cutoff}{the corresponding \code{lty} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+ \item{lwd.cutoff}{the corresponding \code{lwd} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+ \item{col.cutoff}{the corresponding \code{col} argument for
+ \code{\link[graphics]{abline}} for drawing the cutoff lines.}
+ \item{main}{the main title.}
+}
+\details{
+calls a corresponding \code{\link{ddPlot}} method to produce the plot.
+}
+\author{
+ Peter Ruckdeschel \email{Peter.Ruckdeschel at itwm.fraunhofer.de}
+ }
+
+\value{
+a list with items
+\item{id.x}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{x}-cutoff}
+\item{id.y}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{y}-cutoff}
+\item{id.xy}{the indices of (possibly transformed) data (within subset \code{id.n}) beyond the \code{x}-cutoff and the \code{y}-cutoff}
+\item{qtx}{the quantiles of the distances of the (possibly transformed) data in \code{x} direction}
+\item{qty}{the quantiles of the distances of the (possibly transformed) data in \code{y} direction}
+\item{cutoff.x.v}{the cutoff value in \code{x} direction}
+\item{cutoff.y.v}{the cutoff value in \code{y} direction}
+}
+
+\examples{
+if(require(ROptEst)){
+## generates normal location and scale family with mean = -2 and sd = 3
+N0 <- NormLocationScaleFamily()
+N0.IC0 <- optIC(model = N0, risk = asCov())
+N0.Rob1 <- InfRobModel(center = N0, neighbor = ContNeighborhood(radius = 0.5))
+N0.IC1 <- optIC(model = N0.Rob1, risk = asMSE())
+xn <- c(rnorm(100),rcauchy(20)+20)
+outlyingPlotIC(xn, IC.x=N0.IC0)
+outlyingPlotIC(xn, IC.x=N0.IC1)
+}
+}
+\keyword{hplot}
+
Modified: branches/robast-0.7/pkg/RobLox/DESCRIPTION
===================================================================
--- branches/robast-0.7/pkg/RobLox/DESCRIPTION 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobLox/DESCRIPTION 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,14 +1,14 @@
Package: RobLox
-Version: 0.7.0
-Date: 2008-10-06
+Version: 0.7
+Date: 2008-11-25
Title: Optimally robust influence curves for location and scale
-Description: functions for the determination of optimally
- robust influence curves in case of normal
- location with unknown scale
-Depends: R(>= 2.6.0), stats, distrMod(>= 2.0.0), RobAStBase(>= 0.1.0)
+Description: Functions for the determination of optimally robust
+ influence curves and estimators in case of normal location with
+ unknown scale
+Depends: R(>= 2.7.0), stats, distrMod(>= 2.0.1), RobAStBase(>= 0.1.1)
Suggests: Biobase
Author: Matthias Kohl <Matthias.Kohl at stamats.de>
Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
LazyLoad: yes
-License: GPL version 2 or later
+License: LGPL-3
URL: http://robast.r-forge.r-project.org/
Modified: branches/robast-0.7/pkg/RobLox/R/rlsOptIC_AL.R
===================================================================
--- branches/robast-0.7/pkg/RobLox/R/rlsOptIC_AL.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobLox/R/rlsOptIC_AL.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -176,7 +176,7 @@
a1 <- A[1, 1]/sdneu^2
a3 <- A[2, 2]/sdneu^2
a2 <- a[1]/sd/a3 + 1
- asVar <- sd^2*.ALrlsVar(b = b/sd, a1 = a1, a2 = a2, a3 = a3)
+ asVar <- sdneu^2*.ALrlsVar(b = b/sdneu, a1 = a1, a2 = a2, a3 = a3)
res <- list(A = A, a = sdneu*cent(IC)/sdalt, b = b, d = NULL,
risk = list(asMSE = mse, asBias = b, trAsCov = mse - r^2*b^2,
asCov = asVar),
Modified: branches/robast-0.7/pkg/RobLox/R/roblox.R
===================================================================
--- branches/robast-0.7/pkg/RobLox/R/roblox.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobLox/R/roblox.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -156,7 +156,7 @@
a1 <- A1/est[2]^2
a3 <- A2/est[2]^2
a2 <- a[2]/est[2]/a3 + 1
- asVar <- est[2]^2*.ALrlsVar(b = b, a1 = a1, a2 = a2, a3 = a3)
+ asVar <- est[2]^2*.ALrlsVar(b = b/est[2], a1 = a1, a2 = a2, a3 = a3)
return(list(est = est, A1 = A1, A2 = A2, a = a, b = b, asvar = asVar))
}
Modified: branches/robast-0.7/pkg/RobLox/R/rsOptIC.R
===================================================================
--- branches/robast-0.7/pkg/RobLox/R/rsOptIC.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobLox/R/rsOptIC.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -99,7 +99,7 @@
}
}
- L2Fam <- substitute(NormLocationFamily(mean = m1, sd = s1),
+ L2Fam <- substitute(NormScaleFamily(sd = s1, mean = m1),
list(m1 = mean, s1 = sd))
return(generateIC(neighbor = ContNeighborhood(radius = r),
L2Fam = eval(L2Fam),
Modified: branches/robast-0.7/pkg/RobLox/chm/00Index.html
===================================================================
--- branches/robast-0.7/pkg/RobLox/chm/00Index.html 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobLox/chm/00Index.html 2008-11-25 10:41:15 UTC (rev 218)
@@ -10,7 +10,7 @@
<param name="keyword" value=".. contents">
</object>
-<h2>Help pages for package ‘RobLox’ version 0.6.0</h2>
+<h2>Help pages for package ‘RobLox’ version 0.6.1</h2>
<table width="100%">
Modified: branches/robast-0.7/pkg/RobLox/chm/RobLox.chm
===================================================================
(Binary files differ)
Modified: branches/robast-0.7/pkg/RobRex/DESCRIPTION
===================================================================
--- branches/robast-0.7/pkg/RobRex/DESCRIPTION 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobRex/DESCRIPTION 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,15 +1,15 @@
Package: RobRex
-Version: 0.7.0
-Date: 2008-10-06
+Version: 0.7
+Date: 2008-11-25
Title: Optimally robust influence curves for regression and scale
-Description: functions for the determination of optimally
- robust influence curves in case of linear regression
- with unknown scale and standard normal distributed errors
- where the regressor is random.
+Description: functions for the determination of optimally robust
+ influence curves in case of linear regression with unknown
+ scale and standard normal distributed errors where the
+ regressor is random.
Depends: R (>= 2.4.0), ROptRegTS(>= 0.5.0)
Author: Matthias Kohl <Matthias.Kohl at stamats.de>
Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
LazyLoad: yes
-License: GPL version 2 or later
+License: LGPL-3
URL: http://www.stamats.de/RobASt.htm
-Packaged: Mon Aug 6 08:18:03 2007; kohl
+Packaged: Mon Aug 6 08:18:03 2007; kohl
Modified: branches/robast-0.7/pkg/RobRex/inst/scripts/example.R
===================================================================
--- branches/robast-0.7/pkg/RobRex/inst/scripts/example.R 2008-11-25 07:40:28 UTC (rev 217)
+++ branches/robast-0.7/pkg/RobRex/inst/scripts/example.R 2008-11-25 10:41:15 UTC (rev 218)
@@ -1,4 +1,5 @@
library(RobRex)
+options("newDevice"=TRUE)
###############################################################################
## start of tests
More information about the Robast-commits
mailing list