Language Reference

MVE Call

CALL MVE (sc, coef, dist, opt, x <, s> ) ;

This subroutine is supported only by the IML procedure.

The MVE subroutine computes the robust estimation of multivariate location and scatter, defined by minimizing the volume of an ellipsoid that contains h points.

The MVE subroutine computes the minimum volume ellipsoid estimator. These robust locations and covariance matrices can be used to detect multivariate outliers and leverage points. For this purpose, the MVE subroutine provides a table of robust distances.

In the following discussion, N is the number of observations and n is the number of regressors. The input arguments to the MVE subroutine are as follows:

opt

refers to an options vector with the following components (missing values are treated as default values):

opt[1]

specifies the amount of printed output. Higher option values request additional output and include the output of lower values.

0

prints no output except error messages.

1

prints most of the output.

2

additionally prints case numbers of the observations in the best subset and some basic history of the optimization process.

3

additionally prints how many subsets result in singular linear systems.

The default is opt[1]=0.

opt[2]

specifies whether the classical, initial, and final robust covariance matrices are printed. The default is opt[2]=0. The final robust covariance matrix is always returned in coef.

opt[3]

specifies whether the classical, initial, and final robust correlation matrices are printed or returned. The default is opt[3]=0.

0

does not return or print.

1

prints the robust correlation matrix.

2

returns the final robust correlation matrix in coef.

3

prints and returns the final robust correlation matrix.

opt[4]

specifies the quantile h used in the objective function. The default is opt[5]= h equals left-bracket StartFraction upper N plus n plus 1 Over 2 EndFraction right-bracket. If the value of h is specified outside the range StartFraction upper N Over 2 EndFraction plus 1 less-than-or-equal-to h less-than-or-equal-to StartFraction 3 upper N Over 4 EndFraction plus StartFraction n plus 1 Over 4 EndFraction, it is reset to the closest boundary of this region.

opt[5]

specifies the number upper N Subscript normal upper R normal e normal p of subset generations. This option is the same as described previously for the LMS and LTS subroutines. Due to computer time restrictions, not all subset combinations can be inspected for larger values of N and n. If opt[5] is zero or missing, the default number of subsets is taken from the following table.

n 1 2 3 4 5 6 7 8 9 10
upper N Subscript normal l normal o normal w normal e normal r 500 50 22 17 15 14 0 0 0 0
upper N Subscript normal u normal p normal p normal e normal r 10 Superscript 6 1414 182 71 43 32 27 24 23 22
upper N Subscript normal upper R normal e normal p 500 1000 1500 2000 2500 3000 3000 3000 3000 3000

n 11 12 13 14 15
upper N Subscript normal l normal o normal w normal e normal r 0 0 0 0 0
upper N Subscript normal u normal p normal p normal e normal r 22 22 22 23 23
upper N Subscript normal upper R normal e normal p 3000 3000 3000 3000 3000

If the number of cases (observations) N is smaller than upper N Subscript normal l normal o normal w normal e normal r, as given in the table, then all possible subsets are used; otherwise, upper N Subscript normal upper R normal e normal p subsets are chosen randomly. This means that an exhaustive search is performed for opt[5]equals negative 1. If N is larger than upper N Subscript normal u normal p normal p normal e normal r, a note is printed in the log file that indicates how many subsets exist.

x

refers to an upper N times n matrix bold upper X of regressors. Missing values are not permitted in x.

s

refers to an n plus 1 vector that contains n plus 1 observation numbers of a subset for which the objective function should be evaluated, where n is the number of parameters. In other words, the MVE algorithm computes the minimum volume of the ellipsoid that contains the observation numbers contained in s.

The MVE subroutine returns the following values:

sc

is a column vector that contains the following scalar information:

sc[1]

the quantile h used in the objective function

sc[2]

number of subsets generated

sc[3]

number of subsets with singular linear systems

sc[4]

number of nonzero weights w Subscript i

sc[5]

lowest value of the objective function upper F Subscript normal upper M normal upper V normal upper E attained (volume of smallest ellipsoid found)

sc[6]

Mahalanobis-like distance used in the computation of the lowest value of the objective function upper F Subscript normal upper M normal upper V normal upper E

sc[7]

the cutoff value used for the outlier decision

coef

is a matrix with n columns that contains the following results in its rows:

coef[1,]

location of ellipsoid center

coef[2,]

eigenvalues of final robust scatter matrix

coef[3:2+n,]

the final robust scatter matrix for opt[2]=1 or opt[2]=3

coef[2+n+1:2+2n,]

the final robust correlation matrix for opt[3]=1 or opt[3]=3

dist

is a matrix with N columns that contains the following results in its rows:

dist[1,]

Mahalanobis distances

dist[2,]

robust distances based on the final estimates

dist[3,]

weights (1 for small robust distances; 0 for large robust distances)

Example

Consider results for Brownlee (1965) stackloss data. The three explanatory variables correspond to measurements for a plant that oxidizes ammonia to nitric acid on 21 consecutive days:

  • x 1 air flow to the plant

  • x 2 cooling water inlet temperature

  • x 3 acid concentration

The response variable y Subscript i contains the permillage of ammonia lost (stackloss). These data are also given by Rousseeuw and Leroy (1987).

        /* X1  X2  X3   Y    Stackloss data */
 aa = { 1  80  27  89  42,
        1  80  27  88  37,
        1  75  25  90  37,
        1  62  24  87  28,
        1  62  22  87  18,
        1  62  23  87  18,
        1  62  24  93  19,
        1  62  24  93  20,
        1  58  23  87  15,
        1  58  18  80  14,
        1  58  18  89  14,
        1  58  17  88  13,
        1  58  18  82  11,
        1  58  19  93  12,
        1  50  18  89   8,
        1  50  18  86   7,
        1  50  19  72   8,
        1  50  19  79   8,
        1  50  20  80   9,
        1  56  20  82  15,
        1  70  20  91  15 };

Rousseeuw and Leroy (1987) cite a large number of papers where this data set was analyzed and state that most researchers "concluded that observations 1, 3, 4, and 21 were outliers"; some people also reported observation 2 as an outlier.

By default, subroutine MVE chooses only 2,000 randomly selected subsets in its search. There are in total 5,985 subsets of 4 cases out of 21 cases, as shown in Figure 261, which is produced by the following statements:

a = aa[, 2:4];
opt = j(8, 1, .);
opt[1] = 2;              /* ipri */
opt[2] = 1;              /* pcov: print COV */
opt[3] = 1;              /* pcor: print CORR */
opt[5] = -1;             /* nrep: use all subsets */

call mve(sc, xmve, dist, opt, a);

The first part of the output (Figure 261) shows the classical scatter and correlation matrix, along with the means of each variable.

Figure 261: Classical Estimates of Scatter and Location

Classical Covariance Matrix
 VAR1VAR2VAR3
VAR184.05714285722.65714285724.571428571
VAR222.6571428579.99047619056.6214285714
VAR324.5714285716.621428571428.714285714

Classical Correlation Matrix
 VAR1VAR2VAR3
VAR110.7818523330.5001428749
VAR20.78185233310.3909395378
VAR30.50014287490.39093953781

Classical Mean
VAR160.428571429
VAR221.095238095
VAR386.285714286


The second part of the output (Figure 262) shows the results of the optimization (complete subset sampling):

Figure 262: Subset Sampling and Optimal Subset

SubsetSingularBest
Criterion
Percent
149717253.31243125
299344224.08407350
448967165.83005375
5985138165.634363100

Observations of Best Subset
7101420

Initial MVE Location
Estimates
VAR158.5
VAR220.25
VAR387

Initial MVE Scatter Matrix
 VAR1VAR2VAR3
VAR134.82901474928.41314361162.32560534
VAR228.41314361138.03695031858.659393261
VAR362.3256053458.659393261267.63348175


The third part of the output (Figure 263) shows the optimization results after local improvement:

Figure 263: Robust Estimates of Scatter and Location

Robust MVE Location Estimates
VAR156.705882353
VAR220.235294118
VAR385.529411765

Robust MVE Scatter Matrix
 VAR1VAR2VAR3
VAR123.4705882357.573529411816.102941176
VAR27.57352941186.31617647065.3676470588
VAR316.1029411765.367647058832.389705882

Eigenvalues of Robust
Scatter Matrix
VAR146.597431018
VAR212.155938483
VAR33.423101087

Robust Correlation Matrix
 VAR1VAR2VAR3
VAR110.62202695010.5840361335
VAR20.622026950110.375278187
VAR30.58403613350.3752781871


The final output (Figure 264) presents a table that contains the classical Mahalanobis distances, the robust distances, and the weights that identify the outlying observations (that is leverage points when explaining y with these three regressor variables):

Figure 264: Distances and Weights

Classical Distances and Robust (Rousseeuw) Distances
Unsquared Mahalanobis Distance and
Unsquared Rousseeuw Distance of Each Observation
NMahalanobis DistancesRobust DistancesWeight
12.2536035.5283950
22.3247455.6373570
31.5937124.1972350
41.2718981.5887341.000000
50.3033571.1893351.000000
60.7728951.3080381.000000
71.8526611.7159241.000000
81.8526611.7159241.000000
91.3606221.2266801.000000
101.7459971.9362561.000000
111.4657021.4935091.000000
121.8415041.9130791.000000
131.4826491.6599431.000000
141.7787851.6892101.000000
151.6902412.2301091.000000
161.2919341.7675821.000000
172.7000162.4310211.000000
181.5031551.5233161.000000
191.5932211.7101651.000000
200.8070540.6751241.000000
212.1767613.6572810

MinRes 1st Qu. Median Mean 3rd Qu. MaxRes
0.67512449961.50841207611.71592420542.22829601742.08318266585.6373573538


Last updated: July 20, 2026