[Robast-commits] r350 - in branches/robast-0.7/pkg: ROptEst/R ROptEst/chm ROptEst/inst/scripts ROptEst/man ROptEstOld/chm RobAStBase RobAStBase/R RobAStBase/chm RobAStBase/man RobLox/R RobLox/chm RobLox/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 26 04:08:33 CEST 2009
Author: ruckdeschel
Date: 2009-08-26 04:08:24 +0200 (Wed, 26 Aug 2009)
New Revision: 350
Added:
branches/robast-0.7/pkg/RobAStBase/R/getboundedIC.R
branches/robast-0.7/pkg/RobAStBase/R/kStepEstimatorStart.R
branches/robast-0.7/pkg/RobAStBase/man/getBoundedIC.Rd
branches/robast-0.7/pkg/RobAStBase/man/kStepEstimatorStart-methods.Rd
Modified:
branches/robast-0.7/pkg/ROptEst/R/AllGeneric.R
branches/robast-0.7/pkg/ROptEst/R/LowerCaseMultivariate.R
branches/robast-0.7/pkg/ROptEst/R/getIneffDiff.R
branches/robast-0.7/pkg/ROptEst/R/getInfLM.R
branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R
branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asCov.R
branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asGRisk.R
branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asHampel.R
branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asUnOvShoot.R
branches/robast-0.7/pkg/ROptEst/R/getModifyIC.R
branches/robast-0.7/pkg/ROptEst/R/leastFavorableRadius.R
branches/robast-0.7/pkg/ROptEst/R/optIC.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/0ROptEst-package.html
branches/robast-0.7/pkg/ROptEst/chm/ROptEst.chm
branches/robast-0.7/pkg/ROptEst/chm/getIneffDiff.html
branches/robast-0.7/pkg/ROptEst/chm/getInfRobIC.html
branches/robast-0.7/pkg/ROptEst/chm/getModifyIC.html
branches/robast-0.7/pkg/ROptEst/chm/getinfLM.html
branches/robast-0.7/pkg/ROptEst/chm/internals.html
branches/robast-0.7/pkg/ROptEst/chm/leastFavorableRadius.html
branches/robast-0.7/pkg/ROptEst/chm/minmaxBias.html
branches/robast-0.7/pkg/ROptEst/chm/optIC.html
branches/robast-0.7/pkg/ROptEst/chm/radiusMinimaxIC.html
branches/robast-0.7/pkg/ROptEst/chm/roptest.html
branches/robast-0.7/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
branches/robast-0.7/pkg/ROptEst/man/getIneffDiff.Rd
branches/robast-0.7/pkg/ROptEst/man/getInfRobIC.Rd
branches/robast-0.7/pkg/ROptEst/man/getModifyIC.Rd
branches/robast-0.7/pkg/ROptEst/man/getinfLM.Rd
branches/robast-0.7/pkg/ROptEst/man/internals.Rd
branches/robast-0.7/pkg/ROptEst/man/leastFavorableRadius.Rd
branches/robast-0.7/pkg/ROptEst/man/minmaxBias.Rd
branches/robast-0.7/pkg/ROptEst/man/optIC.Rd
branches/robast-0.7/pkg/ROptEst/man/radiusMinimaxIC.Rd
branches/robast-0.7/pkg/ROptEst/man/roptest.Rd
branches/robast-0.7/pkg/ROptEstOld/chm/00Index.html
branches/robast-0.7/pkg/ROptEstOld/chm/EvenSymmetric.html
branches/robast-0.7/pkg/ROptEstOld/chm/FunctionSymmetry-class.html
branches/robast-0.7/pkg/ROptEstOld/chm/OddSymmetric.html
branches/robast-0.7/pkg/ROptEstOld/chm/ROptEstOld.chm
branches/robast-0.7/pkg/ROptEstOld/chm/ROptEstOld.toc
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/RobAStBaseOptions.R
branches/robast-0.7/pkg/RobAStBase/R/RobModel.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/locMEstimator.R
branches/robast-0.7/pkg/RobAStBase/R/oneStepEstimator.R
branches/robast-0.7/pkg/RobAStBase/chm/00Index.html
branches/robast-0.7/pkg/RobAStBase/chm/ALEstimate-class.html
branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.chm
branches/robast-0.7/pkg/RobAStBase/chm/RobAStBase.toc
branches/robast-0.7/pkg/RobAStBase/chm/RobAStBaseOptions.html
branches/robast-0.7/pkg/RobAStBase/chm/RobModel-class.html
branches/robast-0.7/pkg/RobAStBase/chm/comparePlot.html
branches/robast-0.7/pkg/RobAStBase/chm/infoPlot.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/locMEstimator.html
branches/robast-0.7/pkg/RobAStBase/chm/oneStepEstimator.html
branches/robast-0.7/pkg/RobAStBase/chm/plot-methods.html
branches/robast-0.7/pkg/RobAStBase/man/ALEstimate-class.Rd
branches/robast-0.7/pkg/RobAStBase/man/RobAStBaseOptions.Rd
branches/robast-0.7/pkg/RobAStBase/man/RobModel-class.Rd
branches/robast-0.7/pkg/RobAStBase/man/comparePlot.Rd
branches/robast-0.7/pkg/RobAStBase/man/infoPlot.Rd
branches/robast-0.7/pkg/RobAStBase/man/kStepEstimate-class.Rd
branches/robast-0.7/pkg/RobAStBase/man/kStepEstimator.Rd
branches/robast-0.7/pkg/RobAStBase/man/locMEstimator.Rd
branches/robast-0.7/pkg/RobAStBase/man/oneStepEstimator.Rd
branches/robast-0.7/pkg/RobAStBase/man/plot-methods.Rd
branches/robast-0.7/pkg/RobLox/R/colRoblox.R
branches/robast-0.7/pkg/RobLox/R/roblox.R
branches/robast-0.7/pkg/RobLox/R/rowRoblox.R
branches/robast-0.7/pkg/RobLox/chm/RobLox.chm
branches/robast-0.7/pkg/RobLox/chm/roblox.html
branches/robast-0.7/pkg/RobLox/chm/rowRoblox.html
branches/robast-0.7/pkg/RobLox/man/roblox.Rd
branches/robast-0.7/pkg/RobLox/man/rowRoblox.Rd
Log:
%---------------------------------------------------
% large step ....
%---------------------------------------------------
%----------------
RobAstBase:
%----------------
+plot functions gain arguments
which.lbs : select some data indices for plotting,
which.Order : select some order statistics from the remaining data for plotting (ordered; w.r.t. norm of IC) ,
return.Order : shall ordering be printed out?
+unified treatmend of NAs:
* class Estimate gains slot completecases to control for NA in the input
* slot samplesize only counts remaining cases
* samplesize accessor has argument onlycompletecases and hence can issue both remaining and original samplesize
* locMEstimator gains arg na.rm
+ for consistency mat item in trafo slot is now always matrix(1)
+ oneStepEstimator and kStepEstimator implemented anew
* oneStepEstimator and kStepEstimator no longer are generic.
* kStepEstimator
- now only uses one function
- works with non-trivial trafo
- has new arguments
withUpdateInKer : shall we update IC in ker(D)?
IC.UpdateInKer : which is the default IC to be taken for ker(D) -- default = NULL
in which case we use getBoundedIC
na.rm : unified treatment of missings
* new generic function kStepEstimatorStart to produce starting values for one/kstep
works with
- numeric
- estimate
- function (to be evaluated at data x)
* oneStepEstimator now basically calls kStepEstimator except for the case
when IC is not of class "IC", in which similar code is adapted by hand
+new function getBoundedIC to produce (arbitrarily; in fact rather large b) bounded IC as EuclRandVariable
used in kStepEstimator to give default IC to be projected on ker D.
+ new getRobAStBaseOption-s
* "all.verbose" : globally set verbose to TRUE
* "withUpdateInKer" --- what to do in kStep on ker(D)
* "IC.UpdateInKer" --- IC to use in kStep on ker(D)
+ robModel gains trafo and trafo<- methods to access/modify
slot trafo
%----------------
ROptEst:
%----------------
+ getModifyIC gains ... argument
and for signature((L2FamIC = "L2ParamFamily",
neighbor = "Neighborhood", risk ="asRisk")
inserts a verbose= getRobAStBaseOption("all.verbose")
into modifyIC-slot
+ optIC, getIneffDiff, getInfLM, getInfRob,
leastFavorableRadius, .LowerCaseMultivariate.R[TV],
radiusMinimaxIC gain default
getRobAStBaseOption("all.verbose") for argument verbose
+ inserted some new lines in /inst/scripts/NormalLocationScaleModel.R
+ roptest gains arguments withUpdateInKer, IC.UpdateInKer, na.rm
%----------------
RobLox:
%----------------
+ Roblox,colRoblox,rowRoblox gain na.rm argument
and consistently fill new slot completecases
Modified: branches/robast-0.7/pkg/ROptEst/R/AllGeneric.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/AllGeneric.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/AllGeneric.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -72,7 +72,7 @@
setGeneric("updateNorm", function(normtype, ...) standardGeneric("updateNorm"))
}
if(!isGeneric("getModifyIC")){
- setGeneric("getModifyIC", function(L2FamIC, neighbor, risk) standardGeneric("getModifyIC"))
+ setGeneric("getModifyIC", function(L2FamIC, neighbor, risk, ...) standardGeneric("getModifyIC"))
}
if(!isGeneric("cniperCont")){
setGeneric("cniperCont", function(IC1, IC2, L2Fam, neighbor, risk, ...) standardGeneric("cniperCont"))
Modified: branches/robast-0.7/pkg/ROptEst/R/LowerCaseMultivariate.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/LowerCaseMultivariate.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/LowerCaseMultivariate.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -1,6 +1,7 @@
.LowerCaseMultivariate <- function(L2deriv, neighbor, biastype,
normtype, Distr, Finfo, trafo, z.start,
- A.start, z.comp, A.comp, maxiter, tol, verbose = FALSE){
+ A.start, z.comp, A.comp, maxiter, tol,
+ verbose = getRobAStBaseOption("all.verbose")){
w <- new("HampelWeight")
@@ -74,7 +75,8 @@
.LowerCaseMultivariateTV <- function(L2deriv, neighbor, biastype,
normtype, Distr, Finfo, trafo,
- A.start, maxiter, tol, verbose = FALSE){
+ A.start, maxiter, tol,
+ verbose = getRobAStBaseOption("all.verbose")){
w <- new("BdStWeight")
k <- ncol(trafo)
Modified: branches/robast-0.7/pkg/ROptEst/R/getIneffDiff.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getIneffDiff.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/getIneffDiff.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -8,7 +8,8 @@
function(radius, L2Fam, neighbor, risk, loRad, upRad, loRisk, upRisk,
z.start = NULL, A.start = NULL, upper.b = NULL, lower.b = NULL,
MaxIter, eps, warn,
- loNorm = NULL, upNorm = NULL, verbose = FALSE, ...){
+ loNorm = NULL, upNorm = NULL,
+ verbose = getRobAStBaseOption("all.verbose"), ...){
L2derivDim <- numberOfMaps(L2Fam at L2deriv)
if(L2derivDim == 1){
neighbor at radius <- radius
Modified: branches/robast-0.7/pkg/ROptEst/R/getInfLM.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfLM.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfLM.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -6,7 +6,8 @@
neighbor, biastype, normtype, Distr,
a.start, z.start, A.start, w.start, std,
z.comp, A.comp, maxiter, tol,
- verbose, warnit = TRUE){
+ verbose = getRobAStBaseOption("all.verbose"),
+ warnit = TRUE){
LMcall <- match.call()
## initialization
@@ -98,8 +99,9 @@
getLagrangeMultByOptim <- function(b, L2deriv, risk, FI, trafo,
neighbor, biastype, normtype, Distr,
- a.start, z.start, A.start, w.start, std, z.comp, A.comp, maxiter, tol,
- verbose, ...){
+ a.start, z.start, A.start, w.start, std, z.comp,
+ A.comp, maxiter, tol,
+ verbose = getRobAStBaseOption("all.verbose"), ...){
LMcall <- match.call()
### manipulate dots in call -> set control argument for optim
Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asBias.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -5,7 +5,8 @@
risk = "asBias",
neighbor = "UncondNeighborhood"),
function(L2deriv, risk, neighbor, symm, trafo, maxiter,
- tol, warn, Finfo, verbose = FALSE, ...){
+ tol, warn, Finfo,
+ verbose = getRobAStBaseOption("all.verbose"), ...){
erg <- minmaxBias(L2deriv = L2deriv, neighbor = neighbor,
biastype = biastype(risk), symm = symm,
trafo = trafo, maxiter = maxiter,
@@ -25,7 +26,8 @@
neighbor = "UncondNeighborhood"),
function(L2deriv, risk, neighbor, Distr, DistrSymm, L2derivSymm,
L2derivDistrSymm, z.start,
- A.start, Finfo, trafo, maxiter, tol, warn, verbose = FALSE, ...){
+ A.start, Finfo, trafo, maxiter, tol, warn,
+ verbose = getRobAStBaseOption("all.verbose"), ...){
k <- ncol(trafo); p <- nrow(trafo)
if(is(neighbor,"TotalVarNeighborhood") && p>1)
@@ -165,7 +167,7 @@
biastype = "BiasType"),
function(L2deriv, neighbor, biastype, normtype, Distr,
z.start, A.start, z.comp, A.comp, Finfo, trafo, maxiter, tol,
- verbose = FALSE){
+ verbose = getRobAStBaseOption("all.verbose")){
DA.comp <- abs(trafo) %*% A.comp != 0
eerg <- .LowerCaseMultivariate(L2deriv, neighbor, biastype,
@@ -226,7 +228,7 @@
biastype = "BiasType"),
function(L2deriv, neighbor, biastype, normtype, Distr,
z.start, A.start, z.comp, A.comp, Finfo, trafo, maxiter, tol,
- verbose = FALSE){
+ verbose = getRobAStBaseOption("all.verbose")){
eerg <- .LowerCaseMultivariateTV(L2deriv = L2deriv,
neighbor = neighbor, biastype = biastype,
Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asCov.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asCov.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asCov.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -4,7 +4,7 @@
setMethod("getInfRobIC", signature(L2deriv = "UnivariateDistribution",
risk = "asCov",
neighbor = "ContNeighborhood"),
- function(L2deriv, risk, neighbor, Finfo, trafo, verbose = FALSE){
+ function(L2deriv, risk, neighbor, Finfo, trafo, verbose = getRobAStBaseOption("all.verbose")){
info <- c("optimal IC in sense of Cramer-Rao bound")
A <- trafo %*% solve(Finfo)
@@ -33,7 +33,7 @@
setMethod("getInfRobIC", signature(L2deriv = "UnivariateDistribution",
risk = "asCov",
neighbor = "TotalVarNeighborhood"),
- function(L2deriv, risk, neighbor, Finfo, trafo, verbose = FALSE){
+ function(L2deriv, risk, neighbor, Finfo, trafo, verbose = getRobAStBaseOption("all.verbose")){
info <- c("optimal IC in sense of Cramer-Rao bound")
A <- trafo %*% solve(Finfo)
b <- abs(as.vector(A))*(q(L2deriv)(1)-q(L2deriv)(0))
@@ -62,7 +62,7 @@
risk = "asCov",
neighbor = "UncondNeighborhood"),
function(L2deriv, risk, neighbor, Distr, Finfo, trafo,
- QuadForm = diag(nrow(trafo)), verbose = FALSE){
+ QuadForm = diag(nrow(trafo)), verbose = getRobAStBaseOption("all.verbose")){
Cont <- is(neighbor,"ContNeighborhood")
p <- nrow(trafo)
Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asGRisk.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asGRisk.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asGRisk.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -6,7 +6,7 @@
neighbor = "UncondNeighborhood"),
function(L2deriv, risk, neighbor, symm, Finfo, trafo, upper = NULL,
lower = NULL, maxiter, tol,
- warn, noLow = FALSE, verbose = FALSE){
+ warn, noLow = FALSE, verbose = getRobAStBaseOption("all.verbose")){
biastype <- biastype(risk)
radius <- neighbor at radius
if(identical(all.equal(radius, 0), TRUE)){
@@ -160,7 +160,8 @@
L2derivDistrSymm, Finfo, trafo, onesetLM = FALSE,
z.start, A.start, upper = NULL, lower = NULL,
OptOrIter = "iterate",
- maxiter, tol, warn, verbose = FALSE, ...){
+ maxiter, tol, warn, verbose = getRobAStBaseOption("all.verbose"),
+ ...){
mc <- match.call()
Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asHampel.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asHampel.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asHampel.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -5,8 +5,8 @@
risk = "asHampel",
neighbor = "UncondNeighborhood"),
function(L2deriv, risk, neighbor, symm, Finfo, trafo,
- upper = NULL, lower = NULL,
- maxiter, tol, warn, noLow = FALSE, verbose = FALSE,
+ upper = NULL, lower = NULL, maxiter, tol, warn, noLow = FALSE,
+ verbose = getRobAStBaseOption("all.verbose"),
checkBounds = TRUE){
biastype <- biastype(risk)
normtype <- normtype(risk)
@@ -139,8 +139,8 @@
function(L2deriv, risk, neighbor, Distr, DistrSymm, L2derivSymm,
L2derivDistrSymm, Finfo, trafo, onesetLM = FALSE,
z.start, A.start, upper = NULL, lower = NULL,
- OptOrIter = "iterate",
- maxiter, tol, warn, verbose = FALSE,
+ OptOrIter = "iterate", maxiter, tol, warn,
+ verbose = getRobAStBaseOption("all.verbose"),
checkBounds = TRUE, ...){
mc <- match.call()
Modified: branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asUnOvShoot.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asUnOvShoot.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/getInfRobIC_asUnOvShoot.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -17,7 +17,8 @@
if(is(neighbor, "ContNeighborhoood")){
res.c <- getInfRobIC(L2deriv = L2deriv, risk = asCov(),
neighbor = ContNeighborhood(radius = neighbor at radius),
- Finfo = Finfo, trafo = trafo, verbose = FALSE)
+ Finfo = Finfo, trafo = trafo,
+ verbose = getRobAStBaseOption("all.verbose"))
res$risk <- res.c$risk
}
Risk <- getAsRisk(risk = risk, L2deriv = L2deriv, neighbor = neighbor,
Modified: branches/robast-0.7/pkg/ROptEst/R/getModifyIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/getModifyIC.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/getModifyIC.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -4,17 +4,18 @@
setMethod("getModifyIC", signature(L2FamIC = "L2ParamFamily",
neighbor = "Neighborhood", risk = "asRisk"),
- function(L2FamIC, neighbor, risk){
+ function(L2FamIC, neighbor, risk, ...){
modIC <- function(L2Fam, IC){}
- body(modIC) <- substitute({ infMod <- InfRobModel(L2Fam, nghb)
- optIC(infMod, R) },
+ body(modIC) <- substitute({ verbose <- getRobAStBaseOption("all.verbose")
+ infMod <- InfRobModel(L2Fam, nghb)
+ optIC(infMod, risk=R, verbose=verbose, ...) },
list(nghb = neighbor, R = risk))
return(modIC)
})
setMethod("getModifyIC", signature(L2FamIC = "L2LocationFamily",
neighbor = "UncondNeighborhood", risk = "asGRisk"),
- function(L2FamIC, neighbor, risk){
+ function(L2FamIC, neighbor, risk, ...){
modIC <- function(L2Fam, IC){
D <- distribution(eval(CallL2Fam(IC)))
if(is(L2Fam, "L2LocationFamily") && is(distribution(L2Fam), class(D))){
@@ -35,7 +36,7 @@
setMethod("getModifyIC", signature(L2FamIC = "L2ScaleFamily",
neighbor = "ContNeighborhood", risk = "asGRisk"),
- function(L2FamIC, neighbor, risk){
+ function(L2FamIC, neighbor, risk, ...){
modIC <- function(L2Fam, IC){
ICL2Fam <- eval(CallL2Fam(IC))
if(is(L2Fam, "L2ScaleFamily") && is(distribution(L2Fam), class(distribution(ICL2Fam)))){
@@ -70,7 +71,7 @@
setMethod("getModifyIC", signature(L2FamIC = "L2ScaleFamily",
neighbor = "TotalVarNeighborhood", risk = "asGRisk"),
- function(L2FamIC, neighbor, risk){
+ function(L2FamIC, neighbor, risk, ...){
modIC <- function(L2Fam, IC){
ICL2Fam <- eval(CallL2Fam(IC))
if(is(L2Fam, "L2ScaleFamily") && is(distribution(L2Fam), class(distribution(ICL2Fam)))){
@@ -105,7 +106,7 @@
setMethod("getModifyIC", signature(L2FamIC = "L2LocationScaleFamily",
neighbor = "ContNeighborhood", risk = "asGRisk"),
- function(L2FamIC, neighbor, risk){
+ function(L2FamIC, neighbor, risk, ...){
modIC <- function(L2Fam, IC){
ICL2Fam <- eval(CallL2Fam(IC))
if(is(L2Fam, "L2LocationScaleFamily") && is(distribution(L2Fam), class(distribution(ICL2Fam)))){
Modified: branches/robast-0.7/pkg/ROptEst/R/leastFavorableRadius.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/leastFavorableRadius.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/leastFavorableRadius.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -7,7 +7,7 @@
risk = "asGRisk"),
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, verbose = FALSE){
+ tol = .Machine$double.eps^0.4, warn = FALSE, verbose = getRobAStBaseOption("all.verbose")){
if(length(rho) != 1)
stop("'rho' is not of length == 1")
if((rho <= 0)||(rho >= 1))
Modified: branches/robast-0.7/pkg/ROptEst/R/optIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/optIC.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/optIC.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -4,7 +4,7 @@
setMethod("optIC", signature(model = "InfRobModel", risk = "asRisk"),
function(model, risk, z.start = NULL, A.start = NULL, upper = 1e4,
lower = 1e-4, maxiter = 50, tol = .Machine$double.eps^0.4,
- warn = TRUE, noLow = FALSE, verbose = FALSE, ...){
+ warn = TRUE, noLow = FALSE, verbose = getRobAStBaseOption("all.verbose"), ...){
L2derivDim <- numberOfMaps(model at center@L2deriv)
ow <- options("warn")
on.exit(options(ow))
@@ -54,7 +54,8 @@
res$info <- c("optIC", res$info)
res <- c(res, modifyIC = getModifyIC(L2FamIC = model at center,
neighbor = model at neighbor,
- risk = risk))
+ risk = risk, verbose = verbose,
+ ...))
return(generateIC(model at neighbor, model at center, res))
}else{
stop("not yet implemented")
@@ -89,7 +90,7 @@
res$info <- c("optIC", res$info)
res <- c(res, modifyIC = getModifyIC(L2FamIC = model at center,
neighbor = model at neighbor,
- risk = risk))
+ risk = risk, verbose = verbose))
return(generateIC(TotalVarNeighborhood(radius = model at neighbor@radius), model at center, res))
}
}else{
@@ -104,7 +105,7 @@
setMethod("optIC", signature(model = "FixRobModel", risk = "fiUnOvShoot"),
function(model, risk, sampleSize, upper = 1e4, lower = 1e-4, maxiter = 50,
tol = .Machine$double.eps^0.4, warn = TRUE, Algo = "A",
- cont = "left", verbose = FALSE){
+ cont = "left", verbose = getRobAStBaseOption("all.verbose")){
ow <- options("warn")
on.exit(options(ow))
if(!identical(all.equal(sampleSize, trunc(sampleSize)), TRUE))
@@ -122,7 +123,7 @@
res$info <- c("optIC", res$info)
res <- c(res, modifyIC = getModifyIC(L2FamIC = model at center,
neighbor = model at neighbor,
- risk = risk))
+ risk = risk, verbose = verbose))
return(generateIC(TotalVarNeighborhood(radius = model at neighbor@radius), model at center, res))
}else{
stop("restricted to 1-dimensional parametric models")
Modified: branches/robast-0.7/pkg/ROptEst/R/radiusMinimaxIC.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/radiusMinimaxIC.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/radiusMinimaxIC.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -7,7 +7,8 @@
risk = "asGRisk"),
function(L2Fam, neighbor, risk, loRad, upRad, z.start = NULL,
A.start = NULL, upper = 1e5, lower=NULL, maxiter = 50,
- tol = .Machine$double.eps^0.4, warn = FALSE, verbose = FALSE, ...){
+ tol = .Machine$double.eps^0.4, warn = FALSE,
+ verbose = getRobAStBaseOption("all.verbose"), ...){
ow <- options("warn")
on.exit(options(ow))
if(length(loRad) != 1)
Modified: branches/robast-0.7/pkg/ROptEst/R/roptest.R
===================================================================
--- branches/robast-0.7/pkg/ROptEst/R/roptest.R 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/R/roptest.R 2009-08-26 02:08:24 UTC (rev 350)
@@ -1,10 +1,13 @@
###############################################################################
## Optimally robust estimation
###############################################################################
-roptest <- function(x, L2Fam, eps, eps.lower, eps.upper, fsCor = 1, initial.est,
+roptest <- function(x, L2Fam, eps, eps.lower, eps.upper, fsCor = 1, initial.est,
neighbor = ContNeighborhood(), risk = asMSE(), steps = 1L,
distance = CvMDist, startPar = NULL, verbose = FALSE,
- useLast = getRobAStBaseOption("kStepUseLast"), ...){
+ useLast = getRobAStBaseOption("kStepUseLast"),
+ withUpdateInKer = getRobAStBaseOption("withUpdateInKer"),
+ IC.UpdateInKer = getRobAStBaseOption("IC.UpdateInKer"),
+ na.rm = TRUE, ...){
es.call <- match.call()
if(missing(x))
stop("'x' is missing with no default")
@@ -18,6 +21,9 @@
if(!is.matrix(x))
stop("'x' has to be a numeric vector resp. a matrix or data.frame")
}
+ completecases <- complete.cases(x)
+ if(na.rm) x <- na.omit(x)
+
if(missing(eps) && missing(eps.lower) && missing(eps.upper)){
eps.lower <- 0
eps.upper <- 0.5
@@ -58,9 +64,13 @@
if(missing(initial.est))
initial.est <- MDEstimator(x = x, ParamFamily = L2Fam, distance = distance,
startPar = startPar, ...)
- if(is(initial.est, "Estimate")) initial.est <- estimate(initial.est)
+ nrvalues <- length(L2Fam at param)
+ initial.est <- kStepEstimator.start(initial.est, x = x,
+ nrvalues = nrvalues, na.rm = na.rm,
+ ...)
+
newParam <- param(L2Fam)
- main(newParam)[] <- initial.est
+ main(newParam)[] <- as.numeric(initial.est)
L2FamStart <- modifyModel(L2Fam, newParam)
if(is.matrix(x))
sqrtn <- sqrt(ncol(x))
@@ -81,14 +91,24 @@
infMod <- InfRobModel(center = L2FamStart, neighbor = neighbor)
ICstart <- optIC(model = infMod, risk = risk, verbose = verbose, ...)
}
- res <- kStepEstimator(x, IC = ICstart, start = initial.est, steps = steps, useLast = useLast)
+ res <- kStepEstimator(x, IC = ICstart, start = initial.est, steps = steps, useLast = useLast,
+ withUpdateInKer = withUpdateInKer, IC.UpdateInKer = IC.UpdateInKer,
+ na.rm = na.rm)
res at estimate.call <- es.call
Infos <- matrix(c("roptest",
paste(steps, "-step estimate for ", name(L2Fam), sep = "")),
ncol = 2)
colnames(Infos) <- c("method", "message")
- Infos <- rbind(Infos, c("roptest",
+
+ if(! distrMod:::.isUnitMatrix(trafo(L2Fam)))
+ Infos <- rbind(Infos, c("roptest",
+ paste("computation of IC",
+ ifelse(withUpdateInKer,"with","without") ,
+ "modification in ker(trafo)")))
+
+ Infos <- rbind(Infos, c("roptest",
paste("computation of IC, asvar and asbias via useLast =", useLast)))
Infos(res) <- Infos
+ res at completecases <- completecases
return(res)
}
Modified: branches/robast-0.7/pkg/ROptEst/chm/0ROptEst-package.html
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/0ROptEst-package.html 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/chm/0ROptEst-package.html 2009-08-26 02:08:24 UTC (rev 350)
@@ -1,10 +1,10 @@
<html><head><title>Optimally robust estimation</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="Rchm.css">
-</head>
-<body>
+</head><body>
-<table width="100%"><tr><td>ROptEst-package(ROptEst)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
+<table width="100%"><tr><td>ROptEst-package(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-package">
<param name="keyword" value="R: ROptEst">
<param name="keyword" value=" Optimally robust estimation">
@@ -25,31 +25,47 @@
<h3>Details</h3>
<p>
+
+</p>
<table summary="Rd table">
<tr>
- <td align="left">Package: </td> <td align="left"> ROptEst</td>
+ <td align="left">
+Package: </td><td align="left"> ROptEst</td>
</tr>
<tr>
- <td align="left"> Version: </td> <td align="left"> 0.7 </td>
+ <td align="left">
+Version: </td><td align="left"> 0.7 </td>
</tr>
<tr>
- <td align="left"> Date: </td> <td align="left"> 2009-07-16 </td>
+ <td align="left">
+Date: </td><td align="left"> 2009-07-16 </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.4), RobAStBase</td>
+ <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.4), RobAStBase</td>
</tr>
<tr>
- <td align="left"> LazyLoad: </td> <td align="left"> yes</td>
+ <td align="left">
+LazyLoad: </td><td align="left"> yes</td>
</tr>
<tr>
- <td align="left"> License: </td> <td align="left"> LGPL-3</td>
+ <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>
+ <td align="left">
+URL: </td><td align="left"> http://robast.r-forge.r-project.org/</td>
</tr>
-</table>
+<tr>
+ <td align="left">
+</td>
+</tr>
+</table><p>
+</p>
+
+
<h3>Author(s)</h3>
<p>
@@ -57,8 +73,7 @@
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>
+Maintainer: Matthias Kohl <a href="mailto:matthias.kohl at stamats.de">matthias.kohl at stamats.de</a></p>
<h3>References</h3>
@@ -117,7 +132,5 @@
}
</script>
-
<hr><div align="center">[Package <em>ROptEst</em> version 0.7 <a href="00Index.html">Index</a>]</div>
-
</body></html>
Modified: branches/robast-0.7/pkg/ROptEst/chm/ROptEst.chm
===================================================================
(Binary files differ)
Modified: branches/robast-0.7/pkg/ROptEst/chm/getIneffDiff.html
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/getIneffDiff.html 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/chm/getIneffDiff.html 2009-08-26 02:08:24 UTC (rev 350)
@@ -34,7 +34,8 @@
radius, L2Fam, neighbor, risk, loRad, upRad, loRisk, upRisk,
z.start = NULL, A.start = NULL, upper.b = NULL, lower.b = NULL,
MaxIter, eps, warn,
- loNorm = NULL, upNorm = NULL, verbose = FALSE, ...)
+ loNorm = NULL, upNorm = NULL,
+ verbose = getRobAStBaseOption("all.verbose"), ...)
</pre>
@@ -151,7 +152,7 @@
<h3>See Also</h3>
-<p><code><a href="../../ROptEst/html/radiusMinimaxIC.html">radiusMinimaxIC</a></code>, <code><a href="../../ROptEst/html/leastFavorableRadius.html">leastFavorableRadius</a></code></p>
+<p><code></code>, <code></code></p>
<script Language="JScript">
function findlink(pkg, fn) {
Modified: branches/robast-0.7/pkg/ROptEst/chm/getInfRobIC.html
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/getInfRobIC.html 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/chm/getInfRobIC.html 2009-08-26 02:08:24 UTC (rev 350)
@@ -40,53 +40,63 @@
## S4 method for signature 'UnivariateDistribution,asCov,ContNeighborhood':
getInfRobIC(L2deriv,
- risk, neighbor, Finfo, trafo, verbose = FALSE)
+ risk, neighbor, Finfo, trafo,
+ verbose = getRobAStBaseOption("all.verbose"))
## S4 method for signature 'UnivariateDistribution,asCov,TotalVarNeighborhood':
getInfRobIC(L2deriv,
- risk, neighbor, Finfo, trafo, verbose = FALSE)
+ risk, neighbor, Finfo, trafo,
+ verbose = getRobAStBaseOption("all.verbose"))
## S4 method for signature 'RealRandVariable,asCov,UncondNeighborhood':
getInfRobIC(L2deriv, risk,
neighbor, Distr, Finfo, trafo,
- QuadForm = diag(nrow(trafo)), verbose = FALSE)
+ QuadForm = diag(nrow(trafo)),
+ verbose = getRobAStBaseOption("all.verbose"))
## S4 method for signature 'UnivariateDistribution,asBias,UncondNeighborhood':
getInfRobIC(L2deriv,
risk, neighbor, symm, trafo,
- maxiter, tol, warn, Finfo, verbose = FALSE, ...)
+ maxiter, tol, warn, Finfo,
+ verbose = getRobAStBaseOption("all.verbose"), ...)
## S4 method for signature 'RealRandVariable,asBias,UncondNeighborhood':
getInfRobIC(L2deriv, risk,
neighbor, Distr, DistrSymm, L2derivSymm,
L2derivDistrSymm, z.start, A.start, Finfo, trafo,
- maxiter, tol, warn, verbose = FALSE, ...)
+ maxiter, tol, warn,
+ verbose = getRobAStBaseOption("all.verbose"), ...)
## S4 method for signature 'UnivariateDistribution,asHampel,UncondNeighborhood':
getInfRobIC(L2deriv,
- risk, neighbor, symm, Finfo, trafo, upper = NULL, lower=NULL,
- maxiter, tol, warn, noLow = FALSE, verbose = FALSE, checkBounds = TRUE)
+ risk, neighbor, symm, Finfo, trafo, upper = NULL,
+ lower=NULL, maxiter, tol, warn, noLow = FALSE,
+ verbose = getRobAStBaseOption("all.verbose"),
+ checkBounds = TRUE)
## S4 method for signature 'RealRandVariable,asHampel,UncondNeighborhood':
getInfRobIC(L2deriv, risk,
neighbor, Distr, DistrSymm, L2derivSymm,
- L2derivDistrSymm, Finfo, trafo, onesetLM = FALSE, z.start,
- A.start, upper = NULL, lower=NULL, OptOrIter = "iterate", maxiter,
- tol, warn, verbose = FALSE, checkBounds = TRUE, ...)
+ L2derivDistrSymm, Finfo, trafo, onesetLM = FALSE,
+ z.start, A.start, upper = NULL, lower=NULL,
+ OptOrIter = "iterate", maxiter, tol, warn,
+ verbose = getRobAStBaseOption("all.verbose"),
+ checkBounds = TRUE, ...)
## S4 method for signature 'UnivariateDistribution,asGRisk,UncondNeighborhood':
getInfRobIC(L2deriv,
risk, neighbor, symm, Finfo, trafo,
upper = NULL, lower = NULL,
maxiter, tol, warn, noLow = FALSE,
- verbose = FALSE)
+ verbose = getRobAStBaseOption("all.verbose"))
## S4 method for signature 'RealRandVariable,asGRisk,UncondNeighborhood':
getInfRobIC(L2deriv, risk,
neighbor, Distr, DistrSymm, L2derivSymm,
L2derivDistrSymm, Finfo, trafo, onesetLM = FALSE, z.start,
A.start, upper = NULL, lower = NULL, OptOrIter = "iterate",
- maxiter, tol, warn, verbose = FALSE, ...)
+ maxiter, tol, warn,
+ verbose = getRobAStBaseOption("all.verbose"), ...)
## S4 method for signature 'UnivariateDistribution,asUnOvShoot,UncondNeighborhood':
getInfRobIC(
Modified: branches/robast-0.7/pkg/ROptEst/chm/getModifyIC.html
===================================================================
--- branches/robast-0.7/pkg/ROptEst/chm/getModifyIC.html 2009-08-21 09:12:55 UTC (rev 349)
+++ branches/robast-0.7/pkg/ROptEst/chm/getModifyIC.html 2009-08-26 02:08:24 UTC (rev 350)
@@ -1,10 +1,10 @@
<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">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="Rchm.css">
-</head>
-<body>
+</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">
+<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">
@@ -30,25 +30,25 @@
<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)
+getModifyIC(L2FamIC, neighbor, risk,...)
+## S4 method for signature 'L2ParamFamily,Neighborhood,asRisk':
+getModifyIC(L2FamIC,
+ neighbor, risk, ...)
+## S4 method for signature 'L2LocationFamily,UncondNeighborhood,asGRisk':
+getModifyIC(L2FamIC,
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/robast -r 350
More information about the Robast-commits
mailing list