Compute coefficients at a given level of penalty
computeCoefficients(x, lambda, mode = "fraction")
A list containing
Index of non-zeros coefficients.
non-zeros coefficients.
a LarsParth object
If mode ="norm", lambda represents the l1-norm of the coefficients with which we want to predict. If mode="fraction", lambda represents the ratio l1-norm/(l1-norm maximal) of the LarsPath object of the coefficients with which we want to predict).
"fraction" or "norm" or "lambda".
Quentin Grimonprez
dataset <- simul(50, 10000, 0.4, 10, 50, matrix(c(0.1, 0.8, 0.02, 0.02), nrow = 2))
result <- HDlars(dataset$data[1:40, ], dataset$response[1:40])
coeff <- computeCoefficients(result, 0.3, "fraction")
Run the code above in your browser using DataLab