How OGK turns pairwise robust covariances into a multivariate scatter estimate by rotating the data and remeasuring spread, with an exact one-pass MAD example.
Orthogonalised Gnanadesikan–Kettenring estimator
The orthogonalised Gnanadesikan–Kettenring (OGK) estimator builds a robust multivariate scatter matrix by standardising each variable, finding directions from pairwise robust covariances, estimating spread again along those directions, and transforming back. For a quant comparing vectors of asset returns or market features, this offers a way to reduce the influence of extreme observations on the estimated shape of the data cloud. A scatter estimate becomes a calibrated estimate of the covariance matrix only with appropriate scale conventions and modelling assumptions.
Maronna and Zamar’s 2002 paper introduced this construction to make robust multivariate estimation computationally practical in higher dimensions. The central move is to use a pairwise estimate for orientation, then remeasure spread in the rotated data.
Why pairwise robustness is not enough
The ordinary identity
Cov(A,B)=4Var(A+B)−Var(A−B)
suggests replacing standard deviations by a robust univariate scale s:
g(A,B)=4s(A+B)2−s(A−B)2.
This is the Gnanadesikan–Kettenring pairwise construction, implemented as covGK. Robust pairwise entries do not automatically assemble into a positive semidefinite matrix. In more than two dimensions, individually plausible entries can be mutually incompatible. OGK therefore adds a multivariate reconstruction; stopping at the pairwise matrix misses its defining step.
For an n×p data matrix X, with observations in rows, a single pass is
Here Xj,Yj,Zj denote columns. The eigenvalue decomposition supplies orthonormal columns of E. Crucially, the final matrix uses dj, not the eigenvalues in Λ. The robustbase implementation shows these standardisation, rotation and reconstruction steps directly.
Diagonalising U does not guarantee that the observed columns of Z have zero ordinary sample covariance, much less that they are independent. It provides the working directions in which OGK constructs a diagonal robust scatter estimate.
Six rows, with the scale convention exposed
Take these fictional, unitless feature pairs:
Observation
Feature 1
Feature 2
A
−2
−1
B
−1
1
C
0
−2
D
1
2
E
2
0
F
10
15
Use one pass, no reweighting, and the unscaled median absolute deviation at every scale calculation:
s(v)=mediani∣vi−mediankvk∣.
For an even number of values, each median is the arithmetic average of the two middle ordered values. There is no Gaussian consistency factor or finite-sample correction. All six rows, including F, enter every calculation; F is not removed.
Both column medians are 0.5 and both marginal MADs are 1.5, so D=1.5I. After forming Y=X/1.5,
s(Y1+Y2)=35,s(Y1−Y2)=34.
Thus U12=((5/3)2−(4/3)2)/4=1/4, giving
U=(11/41/41).
Choose eigenvectors in this order:
e−=21(−11),e+=21(11),E=(e−,e+).
Their eigenvalues in U are 3/4 and 5/4. Recomputing MAD on the two columns of Z=YE instead gives
Its eigenvalues are 2 and 3.125. Reversing eigenvector order or changing their signs leaves this reconstruction unchanged when the rotated scales follow the same convention.
Fictional six-row raw-MAD OGK example. Both marginal MADs are 1.5. Initial U has diagonal 1 and off-diagonal 0.25, with eigenvalues 0.75 and 1.25. Squared MADs after rotation are 8/9 and 25/18. The reconstructed scatter has diagonal 2.5625, off-diagonal 0.5625 and eigenvalues 2 and 3.125.
Original arithmetic illustration: OGK reuses the pairwise matrix’s directions but replaces its eigenvalues with robust spreads measured on the rotated data. All six rows enter every scale calculation.
These are raw-MAD scatter numbers. Their square roots are not calibrated standard-deviation estimates, and the matrix is not a promised default software result.
What reconstruction guarantees—and what it leaves open
Write A=DE. For any vector w,
w⊤SOGKw=j=1∑pdj((A⊤w)j)2≥0.
This proves positive semidefiniteness because each dj is a squared scale. If the marginal scales and all rotated scales are positive, A is invertible and the result is positive definite. A zero rotated scale can leave the result singular; a zero marginal scale prevents the initial division. Ties and degenerate data therefore require explicit handling before using an inverse for Mahalanobis distance.
OGK is generally not exactly affine equivariant: mixing the original features by an arbitrary invertible matrix can change the fitted scatter beyond the corresponding coordinate transformation. This is distinct from merely expressing one completed matrix in a new basis. In the declared example, replacing each pair by (x1+x2,x2) and refitting gives first diagonal entry approximately 8.006944; transforming the original fitted scatter gives 6.25. The two procedures disagree. This is an independently computed counterexample for this one-pass raw-MAD construction.
Iterations, the univariate scale choice and reweighting are further choices. The official covOGK reference documents an iteration argument with default two, a separate reweighting function, and distinct unreweighted cov and reweighted wcov outputs. Report those choices when comparing implementations. Robustness to unusual rows also does not decide whether a genuine market stress belongs in the risk question being asked.
For the linear algebra, Eigenvalues and Covariance Matrices develops orthogonal directions and their variance interpretation. The full lesson requires membership; a public preview is available.
Official R robustbase reference, covOGK, Usage, Arguments and Value, checked 30 October 2026: pairwise formula, iteration and scale choices, and separate reweighted outputs.
robustbase, R/OGK.R, covOGK standardisation/rotation/reconstruction, s_mad, covGK and reweighting blocks, checked 30 October 2026: implementation mechanics. The example above specifies its own unscaled MAD rather than calling the package defaults.