conditionNumber(S, lambdaMin, lambdaMax, step, type = "Alt", target = diag(1/diag(S)),
verticle = FALSE, value = 1, verbose = TRUE)
matrix
.numeric
giving the minimum value for the penalty parameter.numeric
giving the maximum value for the penalty parameter.integer
determining the number of steps in moving through the grid [lambdaMin
, lambdaMax
].character
indicating the type of ridge estimator to be used. Must be one of: "Alt", "ArchI", "ArchII".matrix
(in precision terms) for Type I ridge estimators.logical
indicating if output graph should come with a verticle line at a pre-specified value for the penalty parameter.numeric
indicating a pre-specified value for the penalty parameter.logical
indicating if intermediate output should be printed on screen.ridgeS
) are rotation equivariant: The effect of the ridge penalty on the precision estimate is equivalent to
shrinkage of the eigenvalues of the unpenalized precision estimate $\mathbf{S}^{-1}$. Maximum shrinkage implies that all eigenvalues are
forced to be equal. The spectral condition number (ratio of maximum to minimum eigenvalue) of the regularized precision matrix may
function as a heuristic in determining the (minimal) value of the penalty parameter. A matrix with a high condition number is near-singular
and its inversion is numerically unstable. Such a matrix is said to be ill-conditioned. Numerically, ill-conditioning will mean that
small changes in the penalty parameter lead to dramatic changes in the condition number. From a numerical point of view one can thus track
the range of the penalty parameter for which the regularized precision matrix is ill-conditioned. When plotting the condition number against
the penalty parameter, the point of stabilization of the former will show up as an elbow (when working in the $p > n$ situation). This
suggest the following fast heuristic (in analogy to the use of the scree plot in factor analysis) for determining the (minimal) value
of the penalty parameter: The value of the penalty parameter for which the spectral condition number starts to stabilize
may be termed an acceptable (minimal) value.
The function outputs a graph of the
spectral condition number over the range [lambdaMin
, lambdaMax
]. When verticle = TRUE
a verticle line is added
at the constant value
. This option can be used to assess if the optimal penalty obtained by, e.g., the routines optPenaltyCV
or optPenalty.aLOOCV
, has led to a precision estimate that is well-conditioned.covML
, optPenaltyCV
, optPenalty.aLOOCV
, ridgeS
## Obtain some (high-dimensional) data
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]
Cx <- covML(X)
## Assess spectral condition number across grid of penalty parameter
conditionNumber(Cx, lambdaMin = .001, lambdaMax = 25, step = 100)
Run the code above in your browser using DataLab