ridgeS call by usage of approximate
leave-one-out cross-validation. Its output includes (a.o.) the precision matrix under the optimal value of the
penalty parameter.optPenalty.aLOOCV(Y, lambdaMin, lambdaMax, step, type = "Alt", target =
diag(1/diag(covML(Y))), output = "light", graph = TRUE, verbose = TRUE)matrix. Variables assumed to be represented by columns.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.character indicating if the output is either heavy or light. Must be one of: "all", "light".logical indicating if the grid search for the optimal penalty parameter should be visualized.logical indicating if intermediate output should be printed on screen.numeric giving the optimal value of the penalty parameter.matrix representing the precision matrix of the chosen type (see ridgeS) under the optimal value of the penalty parameter.numeric vector representing all values of the penalty parameter for which approximate cross-validation was performed; Only given when output = "all".numeric vector representing the approximate cross-validated negative log-likelihoods for each value of the penalty parameter given in lambdas; Only given when output = "all".optPenaltyCV). For details on the aLOOCV negative log-likelihood score see Lian (2011) and Vujacic et al (2014).
The value of the penalty parameter that achieves the lowest aLOOCV negative log-likelihood score is deemed optimal. 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 ridgeS. The ouput consists of an object of class list
(see below). When output = "light" (default) only the optLambda and optPrec elements of the list are given.ridgeS, optPenaltyCV## 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]
## Obtain regularized precision under optimal penalty
OPT <- optPenalty.aLOOCV(X, lambdaMin = .001, lambdaMax = 25, step = 100); OPT
OPT$optLambda # Optimal penalty
OPT$optPrec # Regularized precision under optimal penaltyRun the code above in your browser using DataLab