help robmvhttp://github.com/benjann/robmv/

Title

robmv -- Robust multivariate estimation of location and covariance

Syntax

Classical (non-robust) estimator

robmv classic varlist [if] [in] [weight]
[, classic_options general_options ]

M estimator

robmv m varlist [if] [in] [weight]
[, m_options general_options ]

S estimator

robmv s varlist [if] [in] [weight]
[, s_options general_options ]

MM estimator

robmv mm varlist [if] [in] [weight]
[, mm_options general_options ]

Minimum Volume Ellipsoid (MVE) estimator

robmv mve varlist [if] [in] [weight]
[, mve_options general_options ]

Minimum Covariance Determinant (MCD) estimator

robmv mcd varlist [if] [in] [weight]
[, mcd_options general_options ]

Stahel-Donoho estimator

robmv sd varlist [if] [in] [weight]
[, sd_options general_options ]

Generate robust distances, outliers, etc., after estimation

predict [type] newvar [if] [in] [,
predict_options ]

varlist may contain factor variables; see fvvarlist.

pweights, aweights, iweights, and fweights are
allowed; see weight

(exception: robmv mcd and robmv mve do
not allow fweights)

general_options Description

Main
correlation report correlations instead of covariances

Standard errors/CIs
vce(vcetype) vcetype may
be analytic (the default), cluster clustvar,
bootstrap or jackknife

svy[(subpop)] take account
of survey design as set by svyset, optionally restricting
computations to subpop

nose suppress computation of standard errors and confidence
intervals

ifgenerate(names) stores the values of the
influence functions

replace allows overwriting existing variables

Reporting
level(#) set confidence level; default is level(95)

noheader suppress output header

notable suppress output table

display_options standard
reporting options as described in
[R] estimation options

classic_options Description

normcoll do not remove collinear variables

m_options Description

Main
k(#) set custom tuning constant

ptrim(#) set winsorizing percentage

Consistency correction
c(#) set custom consistency correction factor

cemp use alternative approach to compute consistency correction factor

Algorithm
tolerance(#) tolerance for reweighting algorithm; default is
tolerance(1e-10)

iterate(#) maximum number of iterations;
default is as set by set maxiter

relax do not return error if convergence is not reached

s_options Description

Main
bp(#) breakdown point, in percent; default is bp(50)

whilferty obtain tuning constant using Wilson-Hilferty transformation

k(#) custom tuning constant

Algorithm
nsamp(#) number of trial candidates; default is nsamp(20)

csteps(#) improvement steps applied to each trial
candidate; default is csteps(2)

nkeep(#) number of candidates kept for final refinement;
default is nkeep(5)

tolerance(#) tolerance for refinements; default is
tolerance(1e-10)

iterate(#) maximum number of iterations; default is as set by set maxiter

relax do not return error if convergence is not reached

noee do not use exact enumeration even if feasible

mm_options Description

efficiency(#) desired efficiency, in percent; default is efficiency(95)

location set location efficiency rather than shape efficiency

s_options options as for robreg s

mve_options Description

Main
noreweight report raw MVE estimate without reweighting step

bp(#) breakdown point, in percent; default is bp(50)

alpha(#) reweighting cutoff, in percent; default is alpha(2.5)

Consistency correction
calpha(#) set custom consistency factor for raw MVE estimate

cdelta(#) set custom consistency factor for reweighted estimate

Algorithm
nsamp(#) number of trial candidates; default is nsamp(500)

noee do not use exact enumeration even if feasible

mcd_options Description

Main
noreweight report raw MCD estimate without reweighting step

bp(#) breakdown point, in percent; default is bp(50)

alpha(#) reweighting cutoff, in percent; default is alpha(2.5)

Consistency correction
calpha(#) set custom consistency factor for raw MCD estimate

cdelta(#) set custom consistency factor for reweighted estimate

nosmall omit additional small sample correction

Algorithm
nsamp(#) number of trial candidates; default is nsamp(500)

csteps(#) concentration steps applied to each trial
candidate; default is csteps(2)

nkeep(#) number of candidates kept for final refinement;
default is nkeep(10)

nsub(#) minimum subsample size; default is max(p*50, 300); type nsub(.) to omit subsampling

ksub(#) maximum number of subsamples; default is ksub(5)

tolerance(#) tolerance for final refinement; default is
tolerance(1e-10)

iterate(#) maximum number of iterations;
default is as set by set maxiter

relax do not return error if convergence is not reached

noee do not use exact enumeration even if feasible

nounivar use standard algorithm even if p=1

sd_options Description

Main
huber use a Huber-type rather than rectangular function
to down-weight outliers

alpha(#) outlier percentage under normality; default is alpha(2.5)

asymmetric[(#)] compute generalized SD distances

cutoff(#) set custom cutoff value for outlier identification

nofit do not compute the location and covariance estimate

Generate
generate(names) store SD distances, outlier
indicator, and weights

replace allow overwriting existing variables

Algorithm
nsamp(#) number of trial candidates; default is nsamp(500)

nmax(#) maximum number of invalid candidates before aborting; default is max(1000,nsamp())

expand expand invalid candidates by adding observations (not recommended)

noee do not use exact enumeration even if feasible

nostd omit standardization (not recommended)

controls(spec) partial out effects of covariates

predict_options Description

Main
distance generate robust distances; the default

rd synonym for distance

outlier[(#)] generate outlier indicator

inlier[(#)] generate inlier indicator

Additional M options
weights generate W1 weights

Additional MVE/MCD options
subset generate best H-subset indicator

noreweight use raw MVE/MCD estimate

noscale use unscaled raw MVE/MCD estimate

Description

robmv provides a number of robust multivariate estimators of location
and covariance.

robmv classic computes the classical (non-robust) estimate of
location and covariance. Results are the same as computed by standard
commands such as correlate.

robmv m computes an M estimate of location and covariance using a
Huber weighting function as suggested by Lopuhaä (1989). Singular
solutions are handled as suggested by Maronna et al. (2006, p. 184-185).

robmv s computes an S estimate of
location and covariance (Lopuhaä 1989) using the FastS algorithm
as described in Hubert et al. (2013).

robmv mm computes an MM estimate of location and covariance
(Salibian-Barrera et al. 2006).

robmv mve computes the Minimum Volume Ellipsoid (MVE) estimator
of location and covariance. By default, the one-step reweighted estimate
is reported instead of the raw MVE estimate. The estimation algorithm employs
and improvement step as suggested by Maronna et al. (2006, p. 198). In case
of an exact-fit situation (that is, when the variance matrix in the best
H-subset is singular due to local collinearity among the variables) the
means and covariances are based on all observations that lie on the
hyperplane and the corresponding hyperplane equation is reported.

robmv mcd computes the Minimum Covariance Determinant (MCD) estimator
of location and covariance. By default, the one-step reweighted estimate
is reported instead of the raw MCD estimate. A fast algorithm as suggested
by Rousseeuw and Van Driessen (1999) is used for computation of the MCD
estimate. Consistency correction as given in Croux and Haesbroeck (1999) is
applied. Furthermore, by default, small sample bias is corrected as
suggested by Pison et al. (2002). In case of an exact-fit situation
(that is, when the variance matrix in the best H-subset is singular
due to local collinearity among the variables) the means and covariances
are based on all observations that lie on the hyperplane and
the corresponding hyperplane equation is reported.

robmv sd computes the Stahel-Donoho estimator of
location and covariance as discussed, for example, by Maronna and
Yohai (1995). It also supports the modified Stahel-Donoho estimator for
skewed and/or heavy-tailed distributions suggested by Verardi and
Vermandele (2016).

predict can be used after robmv to generate variables
identifying outliers, containing robust distances, etc.

Dependencies

robmv requires moremata; see
ssc describe moremata.
In addition, the asymmetric option of robmv sd requires robbox; see
ssc describe robbox.

General options

Main

correlation specifies that correlations be reported instead of
variances and covariances.

Standard errors/CIs

vce(vcetype) determines how standard errors and confidence intervals
are computed. vcetype may be

analytic
cluster clustvar
bootstrap [, bootstrap_options]
jackknife [, jackknife_options]

vce(analytic), the default, computes standard errors based on influence
functions. Likewise, vce(cluster clustvar) computes standard
errors based on influence function allowing for intragroup correlation,
where clustvar specifies to which group each observation belongs. For
bootstrap and jackknife estimation, see help vce_option.

vce(analytic) and vce(cluster) are currently not supported by
robmv mcd, robmv mve, and robmv sd. No standard errors will
be estimated by these subcommands.

svy[(subpop)] causes the survey design to be taken
into account for variance estimation. The data need to be set up for survey
estimation; see help svyset. Only one of svy() and vce()
is allowed. Specify subpop to restrict survey
estimation to a subpopulation, where subpop is

[varname] [if]

The subpopulation is defined by observations for which varname!=0 and
for which the if condition is met. See help svy and
[SVY] subpopulation estimation for more information on subpopulation
estimation.

The svy option of robmv only works if the variance
estimation method is set to Taylor linearization by svyset (the
default). For other variance estimation methods you can use the usual svy
prefix command.

svy() is currently not supported by
robmv mcd, robmv mve, and robmv sd. No standard errors will
be estimated by these subcommands.

nose suppresses the computation of standard errors and confidence
intervals.

ifgenerate(names) stores the influence functions that were used
to compute the standard errors, where names is either a list of (new) variable names
or stub* to create names stub1,
stub2, etc. ifgenerate() has no effect if specified together
with nose, vce(bootstrap), or vce(jackknife).

replace allows ifgenerate() to overwrite existing variables.

Reporting

level(#) specifies the confidence level, as a percentage, for
confidence intervals. The default is level(95) or as set by
set level.

noheader suppresses the output header; only the coefficient table is
displayed.

notable suppresses the coefficient table.

display_options are standard reporting options such as cformat(),
pformat(), sformat(), or coeflegend. See
[R] estimation options.

Additional options for robmv classic

normcoll requests that collinear variables will be included in the
estimation. The default is to remove collinear variables.

Additional options for robmv m

Main

k(#) sets the tuning constant for the Huber objective function.
Unless ptrim() is specified (see below), the default is to set the
tuning constant to k = sqrt(p+1), where p is the number of variables, so
that the maximum asymptotic breakdown point of bp = min(1/k^2, 1-p/k^2) is
reached (see Lopuhaä 1989). Note that k() must be larger than
sqrt(p) for the M estimate to exist.

ptrim(#) sets the percentage of winsorizing. If ptrim() is
specified, the tuning constant is set to k = sqrt(invchi2tail(p,
ptrim/100)), where p is the number of variables. Setting ptrim(0)
will return the classical location and covariance estimate (no
winsorizing). Note that ptrim() must be smaller than
chi2tail(p,p)*100, where p is the number of variables, for the M estimate
to exist. Only one of ptrim() and k() is allowed.

Consistency correction

c(#) specifies a custom consistency correction factor by which
the raw estimate be rescaled. The default is to rescale the
estimate so that it provides a consistent estimate of the mean and
covariance matrix for normally distributed data (see option cemp
below).

cemp specifies that the normal consistency correction factor
is estimated empirically (equation 6.22 in Maronna et al. 2006). The
default is to derive the normal consistency correction factor
numerically (equation 6.21 in Maronna et al. 2006). Use the cemp
option should the default algorithm fail (unlikely to happen).

Algorithm

tolerance(#) sets the tolerance for the reweighting algorithm.
When the maximum relative change in the location and covariance estimate
is less than or equal to tolerance(), convergence is
achieved. The default is tolerance(1e-10).

iterate(#) specifies the maximum number of iterations for the
reweighting algorithm. If convergence is not reached within
iterate() iterations, the algorithm stops and returns error. The
default is as set by set maxiter.

relax causes the algorithm to return the current results
instead of returning error if convergence is not reached within
iterate() iterations.

Additional options for robmv s

Main

bp(#) sets the breakdown point (in percent) with # in [1,50]. The
default is bp(50).

whilferty obtains the tuning constant corresponding to the desired
breakdown point by applying the Wilson-Hilferty transformation to the tuning
constant of the univariate biweight function. The default is to obtain the
tuning constant by finding value k that solves bp = b /
(k^2/6), where bp is the desired breakdown point and b is
the Gaussian consistency parameter of the scale optimization problem.

k(#) sets the tuning constant to a custom value. Only one of
k() and bp() is allowed. The procedure used to compute the
breakdown point corresponding to k() depends on whether whilferty
is specified or not.

Algorithm

nsamp(#) specifies the number of trial candidates to be evaluated in the
search algorithm. The default is nsamp(20).

csteps(#) sets the number of improvement steps (C-steps) applied when
evaluating the trial candidates. The default is csteps(2).

nkeep(#) sets the number of best trial candidates kept for final
refinement. The default is nkeep(5).

tolerance(#) sets the tolerance for the candidate scale refinements
and the final refinement of the best candidates. When the relative
change in the scale from one iteration to the next is less than or equal
to tolerance(), convergence is achieved. The default is tolerance(1e-10).

iterate(#) specifies the maximum number of iterations for the candidate scale refinements
and the final refinement of the best candidates. If convergence is not reached within
iterate() iterations, the algorithm stops and returns error. The
default is as set by set maxiter.

relax causes the algorithm to use the current results
instead of returning error if convergence is not reached within
iterate() iterations.

noee specifies that enumeration of random trials is used even if
exact enumeration of all possible candidates would be feasible. The
algorithms uses exact enumeration of all possible (p+1)-subsets if comb(N,
p+1) <= nsamp(). Otherwise, nsamp() random (p+1)-subsets are
enumerated. Given the low default value of nsamp(), exact enumeration
will only be used in very small samples. Set nsamp() to comb(N, p+1),
to enforce exact enumeration of (p+1)-subsets.

Additional options for robmv mm

efficiency(#) sets the desired gaussian efficiency (in percent) with #
in [70,100). The default is efficiency(95).

location requests that efficiency() sets the location
efficiency. The default is to set the shape efficiency.

s_options are additional options as for robreg s.

Additional options for robmv mve

Main

noreweight causes the raw MVE estimate to be reported instead of
the one-step reweighted estimate. The one-step reweighted estimate
is computed from the observations whose robust distances based on the
raw MVE fit are smaller than invchi2(p, 0.975), where p is the number
of variables. The one-step reweighted estimate has better efficiency
properties than the raw MVE estimate.

bp(#) sets the approximate breakdown point (in percent) with # being
an integer number between 0 and 50. The default is bp(50). The breakdown
point determines the size of the H-subset, that is, the number of
observations in the subset that identifies the MVE fit. The size of
the H-subset is computed as

h = floor((N - p - 1)*(1 - bp/100) + p + 1)

where N is the sample size, p is the number of variable and bp is the
specified breakdown point (in percent). In case of a breakdown point of 50%
this simplifies to h = floor((N + p + 1)/2). Note that in case of
weights, the H-subset will be constructed from the raw observations
ignoring weights. That is, the breakdown point should be interpreted in
terms of a percentage of the raw observations and not in terms of a
percentage of the sum of weights.

alpha(#) sets the cutoff, in percent, used to determine the weights for the
reweighted estimate. The weights are set to one for observations with squared
distanced smaller than invchi2(p, 1-alpha/100) and zero else, where p is the
number of variables. The default is alpha(2.5).

Consistency correction

calpha(#) specifies a custom consistency factor by which the initial
MVE estimate be rescaled. The default is to rescale the estimate so that it
provides a consistent estimate of the mean and covariance matrix for
normally distributed data. The default consistency factor is computed as
median(d2)/invchi2(p, 0.5), where d2 are the squared robust distances based
on the initial MVE fit an p is the number of variables.

cdelta(#) specifies a custom consistency factor by which
the one-step reweighted estimate be rescaled. The default is to rescale the
estimate so that it provides a consistent estimate of the mean and
covariance matrix for normally distributed data. The default consistency
factor is computed as (W/N)/chi2(p+2, invchi2(p, W/N)), where p
is the number of variables, N is the sample size, and W is the number of
observations on which the reweighted estimate is based
(see option noreweight above).

Algorithm

nsamp(#) specifies the number of trial candidates to be evaluated in the
search algorithm. The default is nsamp(500).

noee specifies that enumeration of random trials is used even if
exact enumeration of all possible candidates would be feasible. The
algorithms uses exact enumeration of all possible (p+1)-subsets if comb(N,
p+1) <= nsamp(). Otherwise, nsamp() random (p+1)-subsets are
enumerated. Given the low default value of nsamp(), exact enumeration
will only be used in very small samples. Set nsamp() to comb(N, p+1),
to enforce exact enumeration of (p+1)-subsets.

Additional options for robmv mcd

Main

noreweight causes the raw MCD estimate to be reported instead of
the one-step reweighted estimate. The one-step reweighted estimate
is computed from the observations whose robust distances based on the
raw MCD fit are smaller than invchi2(p, 0.975), where p is the number
of variables. The one-step reweighted estimate has better efficiency
properties than the raw MCD estimate.

bp(#) sets the approximate breakdown point (in percent) with # being
an integer number between 0 and 50. The default is bp(50). The breakdown
point determines the size of the H-subset, that is, the number of
observations in the subset that identifies the MCD fit. The size of
the H-subset is computed as

h = floor((N - p - 1)*(1 - bp/100) + p + 1)

where N is the sample size, p is the number of variable and bp is the
specified breakdown point (in percent). In case of a breakdown point of 50%
this simplifies to h = floor((N + p + 1)/2). The relationship between h and
the desired breakdown point is only approximate, as the breakdown point of
the MCD estimate is given as (N - h + 1)/N. The larger the sample size, the
better h realizes the desired breakdown point. Note that in case of
weights, the H-subset will be constructed from the raw observations
ignoring weights. That is, the breakdown point should be interpreted in
terms of a percentage of the raw observations and not in terms of a
percentage of the sum of weights.

alpha(#) sets the cutoff, in percent, used to determine the weights for the
reweighted estimate. The weights are set to one for observations with squared
distanced smaller than invchi2(p, 1-alpha/100) and zero else, where p is the
number of variables. The default is alpha(2.5).

Consistency correction

calpha(#) specifies a custom consistency factor by which
the initial MCD estimate be rescaled. The default is to rescale the
estimate so that it provides a consistent estimate of the mean and
covariance matrix for normally distributed data. The default consistency
factor is computed as (h/N)/chi2(p+2, invchi2(p, h/N)), where p
is the number of variables, N is the sample size, and h is the size of the
H-subset (see option bp() above).

cdelta(#) specifies a custom consistency factor by which
the one-step reweighted estimate be rescaled. The default is to rescale the
estimate so that it provides a consistent estimate of the mean and
covariance matrix for normally distributed data. The default consistency
factor is computed as (W/N)/chi2(p+2, invchi2(p, W/N)), where p
is the number of variables, N is the sample size, and W is the number of
observations on which the reweighted estimate is based
(see option noreweight above).

nosmall specifies that the additional small sample correction suggested
by Pison et al. (2002) be omitted.

Algorithm

nsamp(#) specifies the number of trial candidates to be evaluated in the
search algorithm for the best H-subset. The default is nsamp(500).

csteps(#) sets the number of concentration steps (C-steps) applied when
evaluating the trial candidates. The default is csteps(2).

nkeep(#) sets the number of best trial candidates kept for final
refinement. The default is nkeep(10).

nsub(#) specifies the subsample size used by the search algorithm in
case of a large sample size N. The default is max(p*50, 300), where p is
the number of variables. If N >= 2*nsub() the algorithm splits the
sample into subsamples for the enumeration of the trial candidates. Up to
ksub() subsamples are constructed (see below). For example, if
nsub() is set to 300, ksub() is set to 5, and N = 10000, then 5
subsamples of size 300 are drawn (without replacement) from the 10000
observations and in each of these subsample nsamp()/5 trial
candidates are enumerated. From each subsample the nkeep() best
candidates are kept for further evaluation. The 5 subsamples are then
merged together to a subsample of size 5*300 = 1500 observations and the
5*nkeep() candidates are evaluated. The nkeep() best candidates
from the merged sample are then refined util convergence in the full sample
to identify the best solution. If N < 2*nsub(), no subsampling is
applied, that is, all nsamp() candidates are enumerated in the full
sample. If 2*nsub() <= N <= ksub()*nsub(), the data is
split into as many subsamples as possible using a minimum subsample size of
nsub() observations. For example, if N = 800 and nsub() is set
to 300, then the data is split into two subsamples with 400 observations
and in each of the subsample nsamp()/2 trial candidates are
enumerated. See Rousseeuw and Van Driessen (1999) for a more detailed
description of the algorithm.

Specify nsub(.) to omit subsampling and evaluate all nsamp()
trial candidates in the full sample irrespective of the sample size.

ksub(#) sets the maximum number of subsamples used by the
large-N algorithm; see the nsub() option above. The default is
ksub(5). ksub() must be equal to 2 or larger.

tolerance(#) sets the tolerance for the final refinement of the best
candidates. When the relative change in the determinant from one iteration
to the next is less than or equal to tolerance(), convergence is
achieved. The default is tolerance(1e-10).

iterate(#) specifies the maximum number of iterations for the final
refinement of the best candidates. If convergence is not reached within
iterate() iterations, the algorithm stops and returns error. The
default is as set by set maxiter.

relax causes the algorithm to return the current results
instead of returning error if convergence is not reached within
iterate() iterations. Use this option together with
iterate() if you want to restrict the number of C-steps in the
final refinement.

noee specifies that enumeration of random trials is used even if
exact enumeration of all possible candidates would be feasible. The
algorithms uses exact enumeration of all possible H-subsets if comb(N, h)
<= nsamp() and uses exact enumeration of all possible (p+1)-subsets
if comb(N, p+1) <= nsamp(). Otherwise, nsamp() random
(p+1)-subsets are enumerated (while expanding singular subsets until
nonsingular or until reaching size h). Given the low default value of
nsamp(), exact enumeration will only be used in very small samples.
Set nsamp() to comb(N, h) or comb(N, p+1), to enforce exact
enumeration of H-subsets or (p+1)-subsets, respectively.

nounivar specifies that the standard search algorithm is used even if
only one variable is analyzed. The default is to use an exact enumeration
algorithm for univariate data in this case.

Additional options for robmv sd

Main

huber requests that a Huber-type function is used to down-weight
the outliers when computing the location and covariance estimate. By default,
a rectangular function is used, which is equivalent to excluding the outliers.

alpha(#) sets the expected percentage of observations that will be classified
as outliers under normal conditions. The default is alpha(2.5). alpha()
has no effect if cutoff() is specified.

asymmetric[(#)] computes generalized SD distances
and determines the cutoff point for outlier identification based on
Tukey's g-and-h distribution (employing command robbox) as suggested by
Verardi and Vermandele (2016). #
sets the breakdown point, in percent, that is used when fitting the
g-and-h distribution; the default is 10. # has no effect if
cutoff() is specified.

cutoff(#) specifies a custom cutoff value for outlier
identification. By default, if asymmetric is omitted, the cutoff value
is set to sqrt(invchi2(p, 1 - alpha()/100)), where p is the
number of variables. If asymmetric is specified, the default is to
determine the cutoff value corresponding to alpha() based on
Tukey's g-and-h distribution.

nofit omits the computation of the location and covariance estimate. Use
this option if you are only interested in the Stahel-Donoho distances, but not
in the location and covariance estimate. The Stahel-Donoho distances can be
stored by the generate() option.

Generate

generate(names) store a variable containing the
SD distances, an outlier indicator, and a variable containing the weights
used to compute the location and covariance estimate. names may contain
one to three names, depending on whether you only want to store the distances,
the distances and the outlier indicators, or the distances, outlier indicator,
and weights.

replace allows generate() to overwrite existing variables.

Algorithm

nsamp(#) specifies the number of candidates (p-subsets) to be evaluated in the
search algorithm. The default is nsamp(500).

nsmax(#) specifies the maximum number of candidates that are allowed to
be infeasible (within each single search for a trial candidate) before aborting
with error. The default is max(1000,nsamp()).

expand expands infeasible candidates by adding observations to the subset
until the candidate becomes feasible. Specifying expand is not recommended.

noee specifies that enumeration of random subsets is used even if
exact enumeration of all possible subsets would be feasible. The
algorithms uses exact enumeration of all possible subsets if comb(N,
p) <= nsamp(). Otherwise, nsamp() random subsets are
enumerated.

nostd omits standardization of the data for the enumeration
algorithm. Specifying nostd is not recommended.

controls(varlist[, options]) partials out the
effects of varlist from the SD distances within each projection;
varlist may contain factor variables; see fvvarlist.
options determine whether to include the controls in the final
location and covariance estimate and set the details of the Huber M
estimator used to partial out the effects of the controls; the options are
as follows:

include includes the variables specified in controls() in the
final location and covariance estimate. The default is to include
only the main variables.

efficiency(#) sets the gaussian efficiency of the M estimator, in percent. #
must be within [63.7,99.9]. The default is 100 - alpha().

k(#) sets the tuning constant of the M estimator. Only one of
efficiency() and k() is allowed.

tolerance(#) set the tolerance of the M estimator. The default is
tolerance(1e-10).

iterate(#) set the maximum number of iterations of the M
estimator. The default is as set by set maxiter

Options for predict

Main

distance generates a variable containing robust distances. This is
the default.

rd is a synonym for distance.

outlier[(#)] generates a 0/1 variable identifying
outliers (1 = outlier, 0 = inlier). Optional argument # specifies the
percentage of observations classified as outliers in normal data. That is,
observations with squared distances greater than or equal to
invchi2(p, 1-#/100), were p is the number of variables, are classified
as outliers. Argument # must be in [0,50]; the default is 2.5.

inlier[(#)] generates a 0/1 variable identifying
inliers (1 = inlier, 0 = outlier). Optional argument # specifies the
percentage of observations classified as inliers in normal data. That is,
observations with squared distances smaller than invchi2(p, #/100),
were p is the number of variables, are classified as inliers; all other
observations are classified as outliers. Argument # must be in
[50,100]; default is 97.5.

Additional M options

weights generates a variable containing the W1 weights of the
M fit.

Additional MVE/MCD options

subset generates a 0/1 variable identifying the best H-subset in the
estimation sample. Observations outside e(sample)
will be set to missing.

noreweight specifies that the raw MVE/MCD estimate be used for
determining robust distances, ouliers, and inliers. If available (that is,
unless option noreweight was specified during estimation), the
default is to base computations on the one-step reweighted estimate.

noscale specifies that the unscaled raw MVE/MCD estimate be used for
determining robust distances, ouliers, and inliers. The unscaled
raw MVE/MCD estimate is equal to the raw MVE/MCD estimate before applying
consistency or small-sample correction factors.

Examples

. sysuse auto
. robmv classic price mpg weight length
. robmv m price mpg weight length
. robmv s price mpg weight length
. robmv mm price mpg weight length
. robmv mve price mpg weight length
. robmv mcd price mpg weight length
. robmv sd price mpg weight length

Saved results

robmv stores the following in e():

Scalars

e(N) number of observations

e(nvars) number of variables included in the location and covariance estimate

e(rnk) rank of covariance matrix

e(N_clust) number of clusters (only if vce(cluster) is specified)

e(df_r) sample degrees of freedom (only if e(V) is stored)

e(rank) rank of e(V)

Macros

e(cmdline) command as typed

e(cmd) robmv

e(subcmd) name of subcommand

e(predict) robmv_p

e(depvar) Cov or Corr

e(valist) names of variables included in the location and covariance estimate

e(valist0) names of variables including base levels and omitted terms

e(correlation) correlation or empty

e(wtype) weight type

e(wexp) weight expression

e(vce) vcetype specified in vce()

e(vcetype) title used to label Std. Err.

e(clustvar) name of cluster variable

e(title) title in estimation output

e(properties) b V or b

Matrices

e(b) estimates

e(V) sampling variance of estimates (only if supported)

e(mu) location estimates

e(Cov) covariance estimates

e(Corr) correlation estimates

Functions

e(sample) marks estimation sample

robmv m additionally stores the following in e():

Scalars

e(bp) limiting value of breakdown point

e(ptrim) winsorizing percentage

e(k) tuning constant of the Huber objective function

e(c) consistency correction factor

e(tolerance) tolerance for reweighting algorithm

e(iterate) maximum number of iterations for reweighting algorithm

e(niter) executed number of iterations

Macros

e(relax) relax or empty

robmv s and robmv mm additionally store the following in e():

Scalars

e(bp) breakdown point

e(k) tuning constant

e(delta) normal consistency parameter

e(nsamp) number of trial candidates

e(csteps) number of C-steps for trial candidates

e(nkeep) number of best candidates for final refinement

e(tolerance) tolerance for refinements

e(iterate) maximum number of iterations for refinements

e(scale) scale estimate

e(efficiency) efficiency, in percent (robreg mm only)

e(k_m) tuning constant of M step (robreg mm only)

e(niter) executed number of M step iterations (robreg mm only)

Macros

e(whilferty) whilferty or empty

e(noee) noee or empty

e(method) random or exact

e(relax) relax or empty

e(efftype) shape or location (robreg mm only)

robmv mve additionally stores the following in e():

Scalars

e(h) size of H-subset

e(bp) requested breakdown point

e(calpha) consistency factor for raw MVE estimate

e(cdelta) consistency factor for reweighted estimate (unless noreweight was specified)

e(nsamp) number of trial candidates

e(nhyper) number of observations on hyperplane if H-subset is collinear; 0 else

e(MVE) (normalized) scale of initial MVE estimate

Macros

e(noreweight) noreweight or empty

e(noee) noee or empty

e(method) classical, random, or exact

Matrices

e(mu0) unscaled raw MVE location estimate

e(Cov0) unscaled raw MVE covariance estimate

e(Corr0) unscaled raw MVE correlation estimate

e(gamma) coefficients of hyperplane equation (if H-subset is collinear)

robmv mcd additionally stores the following in e():

Scalars

e(h) size of H-subset

e(bp) requested breakdown point

e(calpha) consistency factor for raw MCD estimate

e(salpha) small sample correction factor for raw MCD estimate

e(cdelta) consistency factor for reweighted estimate (unless noreweight was specified)

e(sdelta) small sample correction factor for reweighted estimate (unless noreweight was specified)

e(nsamp) number of trial candidates

e(nsub) (minimum) size of subsamples for large-N algorithm

e(ksub) number of subsamples uses by large-N algorithm; 0 else

e(nmerged) size of merged subsamples

e(csteps) (maximum) number of C-steps for trial candidates

e(nkeep) number of best candidates for final refinement

e(tolerance) tolerance for final refinement

e(iterate) maximum number of iterations for final refinement

e(nhyper) number of observations on hyperplane if H-subset is collinear; 0 else

e(MCD) determinant of unscaled raw MCD estimate

Macros

e(noreweight) noreweight or empty

e(nosmall) nosmall or empty

e(noee) noee or empty

e(method) classical, univar, random, exact-h, or exact-p

e(nounivar) nounivar or empty

e(relax) relax or empty

Matrices

e(mu0) unscaled raw MCD location estimate

e(Cov0) unscaled raw MCD covariance estimate

e(Corr0) unscaled raw MCD correlation estimate

e(gamma) coefficients of hyperplane equation (if H-subset is collinear)

robmv sd additionally stores the following in e():

Scalars

e(nsamp) number of trial candidates

e(nmax) setting of nmax()

e(nskip) number of discarded candidates

e(alpha) outlier percentage under normality

e(cutoff) cutoff value for outlier identification

e(Nout) number of observations classified as outliers

Macros

e(method) uniform, random or exact

e(asymmetric) asymmetric or empty

e(xvars) names of main variables

e(controls) names of control variables

e(include) include or empty

e(noee) noee or empty

e(expand) expand or empty

e(nostd) nostd or empty

e(wftype) huber or rectangle

e(nofit) nofit or empty

e(generate) names of generated variables

If robmv sd is specified with option nofit, only a reduced set
of results is stored.

If the svy option is specified, various additional results as described in
help svy are stored.

References

Croux, C., G. Haesbroeck (1999). Influence Function
and Efficiency of the Minimum Covariance Determinant Scatter Matrix
Estimator. Journal of Multivariate Analysis 71: 161 190.

Hubert, M., P.J. Rousseeuw, D. Vanpaemel, T. Verdonck (2013). A deterministic algorithm
for S-estimators and MM-estimators of multivariate location and scatter. KU Leuven. Available
from http://wis.kuleuven.be/stat/robust/papers/2013/dets-technicalreport.pdf.

Lopuhaä, H. P. (1989). On the Relation Between S-Estimators and
M-Estimators of Multivariate Location and Covariance. The Annals of
Statistics 17: 1662-1683.

Maronna, R.A., D.R. Martin, V.J. Yohai (2006). Robust Statistics.
Theory and Methods. Chichester: John Wiley & Sons.

Maronna, R.A., V.J. Yohai (1995). The Behavior of the Stahel-Donoho Robust
Multivariate Estimator. Journal of the American Statistical Association 90(429): 330-341.

Pison, G., S. Van Aelst, G. Willems (2002). Small sample corrections for
LTS and MCD. Metrika 55: 111-123.

Rousseeuw, P.J., K. Van Driessen (1999). A Fast Algorithm for the
Minimum Covariance Determinant Estimator. Technometrics 41(3): 212-223.

Salibian-Barrera, M., S. Van Aelst, G. Willems (2006). Principal Components Analysis
Based on Multivariate MM Estimators With Fast and Robust Bootstrap. Journal of
the American Statistical Association 101(475):1198-1211.

Verardi, V., C. Vermandele (2016). Outlier identification
for skewed and/or heavy-tailed unimodal multivariate distributions. Journal de
la Société Française de Statistique 157(2): 90-114.

Authors

Ben Jann (University of Bern),
Vincenzo Verardi (University of Namur and Universite libre de Bruxelles),
Catherine Vermandele (Universite libre de Bruxelles)

Support: ben.jann@soz.unibe.ch

Thanks for citing this software as follows:

Jann, B., V. Verardi, C. Vermandele (2021). robmv: Stata module for robust
multivariate estimation of location and covariance. Available from
http://ideas.repec.org/c/boc/bocode/s458895.html.

Also see

Online: help for
correlate,
robreg,
robstat,
robbox