Generate a lambda path sequence in descending order, equally or log-spaced.
getLamPath(max, min, len, log = FALSE)
numeric vector of lambdas
numeric, maximum lambda value
numeric, minimum lambda value
numeric/int, length of lambda path
logical, should the lambda path be log-spaced
getMaxCov
## Generate the data with huge:
library(huge)
set.seed(10010)
p <- 40 ; n <- 100
dat <- huge.generator(n, p, "hub", verbose=FALSE, v=.1, u=.3)
## Theoretical lamda max is the maximum abs value of the empirical covariance matrix
maxCov <- getMaxCov(dat$data)
lams <- getLamPath(maxCov, 5e-2*maxCov, len=40)
Run the code above in your browser using DataLab