Thanks for your reply Mehmet. I've found that the problem was that I
didn't scale the lambda value. My original example did not follow the
instruction not to give a single lambda value, but that in itself
wasn't the problem. Example shown below.
library(glmnet)
library(MASS)
set.seed(1)
n <- 20
This is interesting, can you post your lm.ridge solution as well? I
suspect in glmnet, you need to use model.matrix with intercept, that
could be the reason.
-m
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/m
2 matches
Mail list logo