Function for the computation of k-step estimates
Function for the computation of k-step estimates.
kStepEstimator(x, IC, start = NULL, steps = 1L, useLast = getRobAStBaseOption("kStepUseLast"), withUpdateInKer = getRobAStBaseOption("withUpdateInKer"), IC.UpdateInKer = getRobAStBaseOption("IC.UpdateInKer"), withICList = getRobAStBaseOption("withICList"), withPICList = getRobAStBaseOption("withPICList"), na.rm = TRUE, startArgList = NULL, ..., withLogScale = TRUE, withEvalAsVar = TRUE, withMakeIC = FALSE, E.argList = NULL, diagnostic = FALSE)
x |
sample |
IC |
object of class |
start |
initial estimate (for full parameter,i.e. in dimension k respective
joint length of main and nuisance part of the parameter):
either a numerical value, or an object of class |
steps |
integer: number of steps |
useLast |
which parameter estimate (initial estimate or
k-step estimate) shall be used to fill the slots |
withUpdateInKer |
if there is a non-trivial trafo in the model with matrix D, shall the parameter be updated on ker(D)? |
IC.UpdateInKer |
if there is a non-trivial trafo in the model with matrix D,
the IC to be used for this; if |
na.rm |
logical: if |
startArgList |
a list of arguments to be given to argument |
withPICList |
logical: shall slot |
withICList |
logical: shall slot |
... |
additional parameters |
withLogScale |
logical; if |
withEvalAsVar |
logical; if |
withMakeIC |
logical; if |
E.argList |
|
diagnostic |
logical; if |
Given an initial estimation start
, a sample x
and an influence curve IC
the corresponding k-step
estimator is computed.
The default value of argument useLast
is set by the
global option kStepUseLast
which by default is set to
FALSE
. In case of general models useLast
remains unchanged during the computations. However, if
slot CallL2Fam
of IC
generates an object of
class "L2GroupParamFamily"
the value of useLast
is changed to TRUE
.
Explicitly setting useLast
to TRUE
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.
If useLast
is set to TRUE
and slot modifyIC
of IC
is filled with some function (which can be
used to re-compute the IC for a different parameter), the
computation of asvar
, asbias
and IC
is
based on the k-step estimate.
Timings for the several substeps are available as attribute
timings
of the return value.
Diagnostics on the involved integrations are available if argument
diagnostic
is TRUE
. Then there is attribute diagnostic
attached to the return value, which may be inspected
and accessed through showDiagnostic
and
getDiagnostic
.
Object of class "kStepEstimate"
.
Matthias Kohl Matthias.Kohl@stamats.de,
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de
Rieder, H. (1994) Robust Asymptotic Statistics. New York: Springer.
Kohl, M. (2005) Numerical Contributions to the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
## don't run to reduce check time on CRAN if(require(ROptEst)){ ## 1. generate a contaminated sample ind <- rbinom(100, size=1, prob=0.05) x <- rnorm(100, mean=0, sd=(1-ind) + ind*9) ## 2. Kolmogorov(-Smirnov) minimum distance estimator (est0 <- MDEstimator(x=x, NormLocationScaleFamily())) ## 3. k-step estimation: radius known N1 <- NormLocationScaleFamily(mean=estimate(est0)["mean"], sd=estimate(est0)["sd"]) N1.Rob <- InfRobModel(center = N1, neighbor = ContNeighborhood(radius = 0.5)) IC1 <- optIC(model = N1.Rob, risk = asMSE()) (est1 <- kStepEstimator(x, IC1, est0, steps = 3, withPIC = TRUE)) estimate(est1) ksteps(est1) pICList(est1) start(est1) attr(est1,"timings") ## a transformed model tfct <- function(x){ nms0 <- c("mean","sd") nms <- "comb" fval0 <- x[1]+2*x[2] names(fval0) <- nms mat0 <- matrix(c(1,2), nrow = 1, dimnames = list(nms,nms0)) return(list(fval = fval0, mat = mat0)) } N1.traf <- N1; trafo(N1.traf) <- tfct N1R.traf <- N1.Rob; trafo(N1R.traf) <- tfct IC1.traf <- optIC(model = N1R.traf, risk = asMSE()) (est0.traf <- MDEstimator(x, N1.traf)) (est1.traf <- kStepEstimator(x, IC1.traf, est0, steps = 3, withIC = TRUE, withPIC = TRUE, withUpdateInKer = FALSE)) (est1a.traf <- kStepEstimator(x, IC1.traf, est0, steps = 3, withIC = TRUE, withPIC = TRUE, withUpdateInKer = TRUE)) estimate(est1.traf) ksteps(est1.traf) pICList(est1.traf) startval(est1.traf) untransformed.estimate(est1.traf) uksteps(est1.traf) ICList(est1.traf) ustartval(est1.traf) estimate(est1a.traf) ksteps(est1a.traf) pICList(est1a.traf) startval(est1a.traf) untransformed.estimate(est1a.traf) uksteps(est1a.traf) ICList(est1a.traf) ustartval(est1a.traf) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.