title: glmnet not converging for lambda.min from cv.glmnet
body: <p>I ran a 20-fold <code>cv.glmnet</code> lasso model to obtain the "optimal" value for lambda. However, when I attempt to reproduce the results from <code>glmnet()</code>, the I get an error that reads:</p>
  
  <pre><code>Warning messages:
  1: from glmnet Fortran code (error code -1); Convergence for 1th lambda
     value not reached after maxit=100000 iterations; solutions for larger 
     lambdas returned 
  2: In getcoef(fit, nvars, nx, vnames) :
     an empty model has been returned; probably a convergence issue
  </code></pre>
  
  <p>My code reads as such:</p>
  
  <pre><code>set.seed(5)
  cv.out &lt;- cv.glmnet(x[train,],y[train],family="binomial",nfolds=20,alpha=1,parallel=TRUE)
  coef(cv.out)
  bestlam &lt;- cv.out$lambda.min
  lasso.mod.best &lt;- glmnet(x[train,],y[train],alpha=1,family="binomial",lambda=bestlam)
  </code></pre>
  
  <p>Now, the value of <code>bestlam</code> above is <code>2.976023e-05</code> so perhaps this is causing the problem? Is it a rounding issue on the value of lambda? Is there a reason why I can't reproduce the results directly from the <code>glmnet()</code> function? If I use a vector of lambda values in the similar range to this value of <code>bestlam</code>, I do not have any issues. </p>