ridgePathS {rags2ridges} | R Documentation |
Visualize the regularization path
Description
Function that visualizes the regularization paths of the nonredundant elements of a regularized precision matrix against the (range of the) penalty parameter.
Usage
ridgePathS(
S,
lambdaMin,
lambdaMax,
step,
type = "Alt",
target = default.target(S),
plotType = "pcor",
diag = FALSE,
vertical = FALSE,
value,
verbose = TRUE
)
Arguments
S |
Sample covariance |
lambdaMin |
A |
lambdaMax |
A |
step |
An |
type |
A |
target |
A target |
plotType |
A |
diag |
A |
vertical |
A |
value |
A |
verbose |
A |
Details
The function visualizes the regularization path of the individual elements
of a regularized precision matrix against the penalty parameter. The range
of the penalty parameter is given by [lambdaMin
,lambdaMax
].
The penalty parameter must be positive such that lambdaMin
must be a
positive scalar. The maximum allowable value of lambdaMax
depends on
the type of ridge estimator employed. For details on the type of ridge
estimator one may use (one of: "Alt", "ArchI", "ArchII") see
ridgeP
.
Regularization paths may be visualized for (partial) correlations,
covariances and precision elements. The type of element for which a
visualization of the regularization paths is desired can be indicated by the
argument plotType
. When vertical = TRUE
a vertical line is
added at the constant value
. This option can be used to assess
whereabouts the optimal penalty obtained by, e.g., the routines
optPenalty.LOOCV
or optPenalty.aLOOCV
, finds
itself along the regularization path.
Author(s)
Wessel N. van Wieringen, Carel F.W. Peeters <carel.peeters@wur.nl>
See Also
ridgeP
, covML
,
optPenalty.LOOCV
, optPenalty.aLOOCV
,
default.target
Examples
## 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)
## Visualize regularization paths
ridgePathS(Cx, .001, 50, 200, plotType = "pcor")