[Robast-commits] r938 - branches/robast-1.1/pkg/RobAStBase/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Sep 20 03:17:05 CEST 2017
Author: ruckdeschel
Date: 2017-09-20 03:17:04 +0200 (Wed, 20 Sep 2017)
New Revision: 938
Modified:
branches/robast-1.1/pkg/RobAStBase/R/kStepEstimator.R
Log:
RobAStBase bug fix in kStepEstimator in case when IC is no ContIC: example code:
require(RobLox)
x <- rnorm(30)
(est0 <- MDEstimator(x, ParamFamily = NormLocationScaleFamily()))
IC.Tu1 <- rlsOptIC.Tu1(r = 0.5)
(est1 <- kStepEstimator(x, IC.Tu1, est0, steps = 1))
Modified: branches/robast-1.1/pkg/RobAStBase/R/kStepEstimator.R
===================================================================
--- branches/robast-1.1/pkg/RobAStBase/R/kStepEstimator.R 2017-04-23 12:19:10 UTC (rev 937)
+++ branches/robast-1.1/pkg/RobAStBase/R/kStepEstimator.R 2017-09-20 01:17:04 UTC (rev 938)
@@ -2,6 +2,7 @@
## k-step estimator
###############################################################################
+setMethod("neighborRadius","ANY",function(object)NA)
### no dispatch on top layer -> keep product structure of dependence
kStepEstimator <- function(x, IC, start = NULL, steps = 1L,
@@ -271,7 +272,8 @@
}else{
if(steps > 1)
stop("slot 'modifyIC' of 'IC' is 'NULL'!")
- upd <- updateStep(u.theta,theta,IC, L2Fam, Param, withModif = FALSE)
+ upd <- updateStep(u.theta,theta,IC, L2Fam, Param,withPreModif = FALSE,
+ withPostModif = TRUE)
theta <- upd$theta
u.theta <- upd$u.theta
var0 <- upd$var
@@ -316,6 +318,7 @@
asBias <- neighborRadius(IC)*Risks(IC)$asBias
else
asBias <- neighborRadius(IC)*Risks(IC)$asBias$value
+ if(is.na(asBias)) asBias <- NULL
}else{
if(is(IC, "HampIC")){
r <- neighborRadius(IC)
More information about the Robast-commits
mailing list