| ridgePathS | R Documentation |
Function that visualizes the regularization paths of the nonredundant elements of a regularized precision matrix against the (range of the) penalty parameter.
ridgePathS(
S,
lambdaMin,
lambdaMax,
step,
type = "Alt",
target = default.target(S),
plotType = "pcor",
diag = FALSE,
vertical = FALSE,
value,
verbose = TRUE
)
S |
Sample covariance |
lambdaMin |
A |
lambdaMax |
A |
step |
An |
type |
A |
target |
A target |
plotType |
A |
diag |
A |
vertical |
A |
value |
A |
verbose |
A |
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.
Wessel N. van Wieringen, Carel F.W. Peeters <carel.peeters@wur.nl>
ridgeP, covML,
optPenalty.LOOCV, optPenalty.aLOOCV,
default.target
## 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.