I have a very basic question concerning a glmnet plot, but somehow am not able to explain it to myself.

Currently, I work through the glmnet vignette.

I stumbled upon the following example:

cvfit = cv.glmnet(x, y)

enter image description here

Note that the minimum lambda found is 0.08307. This value should be represented at the x-axis of the plot at the left dotted vertical line.

However, when I calculate, I get $\log(0.08307)= -1.080555$.

This is different to (ca.) -2.5 shown by the plot.

Any ideas why the plot shows other values? What am I getting wrong here?

  • $\begingroup$ I think you'll get more answers if you edit your question and state explicitly that this is about the R package glmnet (web.stanford.edu/~hastie/glmnet/glmnet_alpha.html), and give a small reproducible example (i.e. a small, self-contained piece of code that produces the problem you describe) $\endgroup$
    – Adrian
    Jun 3, 2016 at 9:40
  • $\begingroup$ Thx for the advice. $\endgroup$
    – Toby_Shoby
    Jun 3, 2016 at 10:01

1 Answer 1


In statistics, unless otherwise specified, "log" usually means the natural logarithm. Your mistake was that you calculated the base-10 logarithm instead. The natural log of 0.08307 is about -2.49.

  • 1
    $\begingroup$ Thank you very much, I knew it was something pretty basic. $\endgroup$
    – Toby_Shoby
    Jun 3, 2016 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.