[Robast-commits] r139 - in branches/robast-0.6/pkg/ROptEst: . R inst/scripts man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 1 07:41:09 CEST 2008
Author: stamats
Date: 2008-08-01 07:41:09 +0200 (Fri, 01 Aug 2008)
New Revision: 139
Added:
branches/robast-0.6/pkg/ROptEst/R/roptest.R
branches/robast-0.6/pkg/ROptEst/man/roptest.Rd
Modified:
branches/robast-0.6/pkg/ROptEst/DESCRIPTION
branches/robast-0.6/pkg/ROptEst/NAMESPACE
branches/robast-0.6/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
branches/robast-0.6/pkg/ROptEst/man/getAsRisk.Rd
branches/robast-0.6/pkg/ROptEst/man/getBiasIC.Rd
branches/robast-0.6/pkg/ROptEst/man/getFiRisk.Rd
branches/robast-0.6/pkg/ROptEst/man/getFixClip.Rd
branches/robast-0.6/pkg/ROptEst/man/getFixRobIC.Rd
branches/robast-0.6/pkg/ROptEst/man/getIneffDiff.Rd
branches/robast-0.6/pkg/ROptEst/man/getInfCent.Rd
branches/robast-0.6/pkg/ROptEst/man/getInfClip.Rd
branches/robast-0.6/pkg/ROptEst/man/getInfGamma.Rd
branches/robast-0.6/pkg/ROptEst/man/getInfRobIC.Rd
branches/robast-0.6/pkg/ROptEst/man/getInfStand.Rd
branches/robast-0.6/pkg/ROptEst/man/getInfV.Rd
branches/robast-0.6/pkg/ROptEst/man/getL1normL2deriv.Rd
branches/robast-0.6/pkg/ROptEst/man/getL2normL2deriv.Rd
branches/robast-0.6/pkg/ROptEst/man/getRiskIC.Rd
branches/robast-0.6/pkg/ROptEst/man/leastFavorableRadius.Rd
branches/robast-0.6/pkg/ROptEst/man/lowerCaseRadius.Rd
branches/robast-0.6/pkg/ROptEst/man/minmaxBias.Rd
branches/robast-0.6/pkg/ROptEst/man/optIC.Rd
branches/robast-0.6/pkg/ROptEst/man/optRisk.Rd
branches/robast-0.6/pkg/ROptEst/man/radiusMinimaxIC.Rd
Log:
added keywords, added new function roptest for optimally robust estimation
Modified: branches/robast-0.6/pkg/ROptEst/DESCRIPTION
===================================================================
--- branches/robast-0.6/pkg/ROptEst/DESCRIPTION 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/DESCRIPTION 2008-08-01 05:41:09 UTC (rev 139)
@@ -1,6 +1,6 @@
Package: ROptEst
Version: 0.6.0
-Date: 2008-07-21
+Date: 2008-08-01
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
@@ -9,4 +9,3 @@
LazyLoad: yes
License: GPL version 2 or later
URL: http://robast.r-forge.r-project.org/
-Packaged: Thu Jan 3 20:00:08 2008; btm722
Modified: branches/robast-0.6/pkg/ROptEst/NAMESPACE
===================================================================
--- branches/robast-0.6/pkg/ROptEst/NAMESPACE 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/NAMESPACE 2008-08-01 05:41:09 UTC (rev 139)
@@ -25,3 +25,4 @@
"getL1normL2deriv")
exportMethods("updateNorm")
export("getL2normL2deriv")
+export("roptest")
Added: branches/robast-0.6/pkg/ROptEst/R/roptest.R
===================================================================
--- branches/robast-0.6/pkg/ROptEst/R/roptest.R (rev 0)
+++ branches/robast-0.6/pkg/ROptEst/R/roptest.R 2008-08-01 05:41:09 UTC (rev 139)
@@ -0,0 +1,77 @@
+###############################################################################
+## Optimally robust estimation
+###############################################################################
+roptest <- function(x, L2Fam, eps, eps.lower, eps.upper, initial.est,
+ neighbor = ContNeighborhood(), risk = asMSE(), steps = 1,
+ distance = CvMDist, interval, par, ...){
+ if(missing(x))
+ stop("'x' is missing with no default")
+ if(missing(L2Fam))
+ stop("'L2Fam' is missing with no default")
+ if(!is.numeric(x)){
+ if(is.data.frame(x))
+ x <- data.matrix(x)
+ else
+ x <- as.matrix(x)
+ if(!is.matrix(x))
+ stop("'x' has to be a numeric vector resp. a matrix or data.frame")
+ }
+ if(missing(eps) && missing(eps.lower) && missing(eps.upper)){
+ eps.lower <- 0
+ eps.upper <- 0.5
+ }
+ if(missing(eps)){
+ if(!missing(eps.lower) && missing(eps.upper))
+ eps.upper <- 0.5
+ if(missing(eps.lower) && !missing(eps.upper))
+ eps.lower <- 0
+ if(length(eps.lower) != 1 || length(eps.upper) != 1)
+ stop("'eps.lower' and 'eps.upper' have to be of length 1")
+ if(!is.numeric(eps.lower) || !is.numeric(eps.upper) || eps.lower >= eps.upper)
+ stop("'eps.lower' < 'eps.upper' is not fulfilled")
+ if((eps.lower < 0) || (eps.upper > 0.5))
+ stop("'eps.lower' and 'eps.upper' have to be in [0, 0.5]")
+ }else{
+ if(length(eps) != 1)
+ stop("'eps' has to be of length 1")
+ if(eps == 0)
+ stop("'eps = 0'! => use functions 'mean' and 'sd' for estimation")
+ if((eps < 0) || (eps > 0.5))
+ stop("'eps' has to be in (0, 0.5]")
+ }
+ if(!is.integer(steps))
+ steps <- as.integer(steps)
+ if(steps < 1){
+ stop("'steps' has to be some positive integer value")
+ }
+ if(length(steps) != 1){
+ stop("'steps' has to be of length 1")
+ }
+
+ if(missing(initial.est)){
+ initial.est <- MDEstimator(x = x, ParamFamily = L2Fam, distance = distance,
+ interval = interval, par = par, ...)
+ }
+ if(is.matrix(x))
+ sqrtn <- sqrt(ncol(x))
+ else
+ sqrtn <- sqrt(length(x))
+ if(missing(eps)){
+ r.lower <- sqrtn*eps.lower
+ r.upper <- sqrtn*eps.upper
+ newParam <- param(L2Fam)
+ main(newParam) <- estimate(initial.est)
+ L2FamStart <- modifyModel(L2Fam, newParam)
+ ICstart <- radiusMinimaxIC(L2Fam=L2FamStart, neighbor=neighbor, risk=risk,
+ loRad=r.lower, upRad=r.upper)
+ }else{
+ r <- sqrtn*eps
+ neighbor at radius <- r
+ newParam <- param(L2Fam)
+ main(newParam) <- estimate(initial.est)
+ L2FamStart <- modifyModel(L2Fam, newParam)
+ infMod <- InfRobModel(center = L2FamStart, neighbor=neighbor)
+ ICstart <- optIC(model=infMod, risk=risk)
+ }
+ kStepEstimator(x, IC=ICstart, start=initial.est, steps = steps)
+}
Modified: branches/robast-0.6/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
===================================================================
--- branches/robast-0.6/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R 2008-08-01 05:41:09 UTC (rev 139)
@@ -100,13 +100,13 @@
## 2. Kolmogorov(-Smirnov) minimum distance estimator
(est0 <- MDEstimator(x=x, NormLocationScaleFamily()))
-## 3. one-step estimation: radius known
-N1 <- NormLocationScaleFamily(mean=est0$estimate[1], sd=est0$estimate[2])
+## 3. k-step estimation: radius known
+N1 <- NormLocationScaleFamily(mean=estimate(est0)[1], sd=estimate(est0)[2])
N1.Rob <- InfRobModel(center = N1, neighbor = ContNeighborhood(radius = 0.5))
IC1 <- optIC(model = N1.Rob, risk = asMSE())
-(est1 <- oneStepEstimator(x, IC1, est0$estimate))
+(est1 <- kStepEstimator(x, IC1, est0, steps = 3))
-## 4. one-step estimation: radius unknown
+## 4. k-step estimation: radius unknown
## rough estimate: 1-10% contamination
## => r\in[0.1,1.0]
Modified: branches/robast-0.6/pkg/ROptEst/man/getAsRisk.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getAsRisk.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getAsRisk.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -77,7 +77,8 @@
\item{warn}{ logical: print warnings. }
\item{normtype}{ object of class \code{"NormType"}. }
}
-%\details{}
+\details{ This function is rarely called directly. It is used by
+ other functions/methods. }
\value{The asymptotic risk is computed.}
\section{Methods}{
\describe{
@@ -147,4 +148,4 @@
%\examples{}
\concept{asymptotic risk}
\concept{risk}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getBiasIC.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getBiasIC.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getBiasIC.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -19,7 +19,8 @@
\item{L2Fam}{ object of class \code{"L2ParamFamily"}. }
\item{\dots}{ additional parameters }
}
-\details{}
+\details{ This function is rarely called directly. It is used by
+ other functions/methods. }
\value{The bias of the IC is computed.}
\section{Methods}{
\describe{
@@ -45,4 +46,4 @@
\seealso{\code{\link{getRiskIC-methods}}, \code{\link[RobAStBase]{InfRobModel-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getFiRisk.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getFiRisk.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getFiRisk.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -60,4 +60,4 @@
%\examples{}
\concept{finite-sample risk}
\concept{risk}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getFixClip.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getFixClip.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getFixClip.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -46,4 +46,4 @@
\seealso{\code{\link[RobAStBase]{ContIC-class}}, \code{\link[RobAStBase]{TotalVarIC-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getFixRobIC.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getFixRobIC.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getFixRobIC.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -48,4 +48,4 @@
\seealso{\code{\link[RobAStBase]{FixRobModel-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getIneffDiff.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getIneffDiff.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getIneffDiff.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -65,4 +65,4 @@
%\note{}
\seealso{\code{\link{radiusMinimaxIC}}, \code{\link{leastFavorableRadius}}}
%\examples{}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getInfCent.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getInfCent.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getInfCent.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -83,4 +83,4 @@
\seealso{\code{\link[RobAStBase]{ContIC-class}}, \code{\link[RobAStBase]{TotalVarIC-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getInfClip.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getInfClip.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getInfClip.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -82,4 +82,4 @@
\seealso{\code{\link[RobAStBase]{ContIC-class}}, \code{\link[RobAStBase]{TotalVarIC-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getInfGamma.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getInfGamma.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getInfGamma.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -100,4 +100,4 @@
\code{\link[RobAStBase]{TotalVarIC-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getInfRobIC.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getInfRobIC.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getInfRobIC.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -151,4 +151,4 @@
\seealso{\code{\link[RobAStBase]{InfRobModel-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getInfStand.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getInfStand.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getInfStand.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -85,4 +85,4 @@
\seealso{\code{\link[RobAStBase]{ContIC-class}}, \code{\link[RobAStBase]{TotalVarIC-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getInfV.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getInfV.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getInfV.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -59,4 +59,4 @@
\seealso{\code{\link[RobAStBase]{ContIC-class}}, \code{\link[RobAStBase]{TotalVarIC-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getL1normL2deriv.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getL1normL2deriv.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getL1normL2deriv.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -33,5 +33,5 @@
##
}
\concept{L1norm}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getL2normL2deriv.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getL2normL2deriv.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getL2normL2deriv.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -20,4 +20,4 @@
##
}
\concept{L2norm}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/getRiskIC.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/getRiskIC.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/getRiskIC.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -55,4 +55,4 @@
\seealso{\code{\link[ROptEst]{getRiskIC-methods}}, \code{\link[RobAStBase]{InfRobModel-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/leastFavorableRadius.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/leastFavorableRadius.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/leastFavorableRadius.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -66,4 +66,4 @@
risk=asMSE(), rho=0.5)
}
\concept{least favorable radius}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/lowerCaseRadius.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/lowerCaseRadius.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/lowerCaseRadius.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -66,4 +66,4 @@
lowerCaseRadius(BinomFamily(size = 10), TotalVarNeighborhood(), asMSE())
}
\concept{lower case radius}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/minmaxBias.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/minmaxBias.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/minmaxBias.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -94,4 +94,4 @@
\seealso{\code{\link[RobAStBase]{InfRobModel-class}}}
%\examples{}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/optIC.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/optIC.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/optIC.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -84,4 +84,4 @@
}
\concept{robust influence curve}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/optRisk.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/optRisk.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/optRisk.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -73,4 +73,4 @@
optRisk(model = NormLocationScaleFamily(), risk = asCov())
}
\concept{risk}
-\keyword{}
+\keyword{robust}
Modified: branches/robast-0.6/pkg/ROptEst/man/radiusMinimaxIC.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/radiusMinimaxIC.Rd 2008-08-01 05:26:26 UTC (rev 138)
+++ branches/robast-0.6/pkg/ROptEst/man/radiusMinimaxIC.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -59,4 +59,4 @@
}
\concept{radius minimax influence curve}
\concept{influence curve}
-\keyword{}
+\keyword{robust}
Added: branches/robast-0.6/pkg/ROptEst/man/roptest.Rd
===================================================================
--- branches/robast-0.6/pkg/ROptEst/man/roptest.Rd (rev 0)
+++ branches/robast-0.6/pkg/ROptEst/man/roptest.Rd 2008-08-01 05:41:09 UTC (rev 139)
@@ -0,0 +1,133 @@
+\name{roptest}
+\alias{roptest}
+\title{ Optimally robust estimation }
+\description{
+ Function to compute optimally robust estimates for L2-differentiable
+ parametric families via k-step construction.
+}
+\usage{
+roptest(x, L2Fam, eps, eps.lower, eps.upper, initial.est,
+ neighbor = ContNeighborhood(), risk = asMSE(), steps = 1,
+ distance = CvMDist, interval, par, ...)
+}
+\arguments{
+ \item{x}{ sample }
+ \item{L2Fam}{ object of class \code{"L2ParamFamily"} }
+ \item{eps}{ positive real (0 < \code{eps} <= 0.5): amount of gross errors.
+ See details below. }
+ \item{eps.lower}{ positive real (0 <= \code{eps.lower} <= \code{eps.upper}):
+ lower bound for the amount of gross errors. See details below. }
+ \item{eps.upper}{ positive real (\code{eps.lower} <= \code{eps.upper} <= 0.5):
+ upper bound for the amount of gross errors. See details below. }
+ \item{initial.est}{ initial estimate for unknown parameter. If missing
+ minimum distance estimator is computed. }
+ \item{neighbor}{ object of class \code{"UncondNeighborhood"} }
+ \item{risk}{ object of class \code{"RiskType"} }
+ \item{steps}{ positive integer: number of steps used for k-steps construction }
+ \item{distance}{ distance function }
+ \item{interval}{ parameter interval for univariate parameters }
+ \item{par}{ initial parameter value for multivariate parameters.
+ If missing, the parameters of \code{L2Fam} are used. }
+ \item{\dots}{ further arguments }
+}
+\details{
+ Computes the optimally robust estimator for a given L2 differentiable
+ parametric family. The computation uses a k-step construction with an
+ appropriate initial estimate. Valid candidates are e.g. Kolmogorov(-Smirnov)
+ or von Mises minimum distance estimators (default); cf. Rieder (1994) and Kohl (2005).
+
+ If the amount of gross errors (contamination) is known, it can be
+ specified by \code{eps}. The radius of the corresponding infinitesimal
+ contamination neighborhood is obtained by multiplying \code{eps}
+ by the square root of the sample size.
+
+ 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} and \code{eps.upper}.
+
+ In case \code{eps.lower} is specified and \code{eps.upper} is missing,
+ \code{eps.upper} is set to 0.5. In case \code{eps.upper} is specified and
+ \code{eps.lower} is missing, \code{eps.lower} is set to 0.
+
+ If neither \code{eps} nor \code{eps.lower} and/or \code{eps.upper} is
+ specified, \code{eps.lower} and \code{eps.upper} are set to 0 and 0.5,
+ respectively.
+
+ If \code{eps} is missing, the radius-minimax estimator in sense of
+ Rieder et al. (2001, 2008), respectively Section 2.2 of Kohl (2005) is returned.
+}
+\value{Object of class \code{"kStepEstimate"}. }
+\references{
+ Kohl, M. (2005) \emph{Numerical Contributions to the Asymptotic Theory of Robustness}.
+ Bayreuth: Dissertation.
+
+ Rieder, H. (1994) \emph{Robust Asymptotic Statistics}. New York: Springer.
+
+ Rieder, H., Kohl, M. and Ruckdeschel, P. (2008) The Costs of not Knowing
+ the Radius. Statistical Methods and Applications \emph{17}(1) 13-40.
+
+ Rieder, H., Kohl, M. and Ruckdeschel, P. (2001) The Costs of not Knowing
+ the Radius. Submitted. Appeared as discussion paper Nr. 81.
+ SFB 373 (Quantification and Simulation of Economic Processes),
+ Humboldt University, Berlin; also available under
+ \url{www.uni-bayreuth.de/departments/math/org/mathe7/RIEDER/pubs/RR.pdf}
+}
+\author{Matthias Kohl \email{Matthias.Kohl at stamats.de}}
+%\note{}
+\seealso{ \code{\link[RobLox]{roblox}},
+ \code{\link[distrMod]{L2ParamFamily-class}}
+ \code{\link[RobAStBase]{UncondNeighborhood-class}},
+ \code{\link[distrMod]{RiskType-class}} }
+\examples{
+#############################
+## 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
+MLEstimator(x, BinomFamily(size = 25), interval = c(0, 1))
+
+## compute optimally robust estimator (known contamination)
+roptest(x, BinomFamily(size = 25), eps = 0.05, interval = c(0, 1), steps = 3)
+
+## compute optimally robust estimator (unknown contamination)
+roptest(x, BinomFamily(size = 25), eps.lower = 0, eps.upper = 0.1, interval = c(0, 1), steps = 3)
+
+
+#############################
+## 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
+MLEstimator(x, PoisFamily(), interval = c(0, 10))
+
+## compute optimally robust estimator (unknown contamination)
+roptest(x, PoisFamily(), eps.upper = 0.05, interval = c(0, 10), steps = 3)
+
+#############################
+## 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)
+
+## ML-estimate
+MLEstimator(x, NormLocationScaleFamily())
+
+## compute optimally robust estimator (known contamination)
+## takes some time
+roptest(x, NormLocationScaleFamily(), eps = 0.05, steps = 3)
+
+## compute optimally robust estimator (unknown contamination)
+## takes some time
+roptest(x, NormLocationScaleFamily(), eps.upper = 0.1, steps = 3)
+}
+\concept{k-step construction}
+\concept{optimally robust estimation}
+\keyword{robust}
More information about the Robast-commits
mailing list