I'm having the exact problem outlined in a previous post from 2005 - unfortunately the post was never answered:
http://tolstoy.newcastle.edu.au/R/help/05/10/15055.html When running: lm2=lars(x2,y,type="lasso",use.Gram=F) I get an error: Error in if (zmin < gamhat) { : missing value where TRUE/FALSE needed ...when running lasso via lars() on a 67x3795 set of predictors. I hacked the lars() function to print out the zmin, gamhat, and also z1 values (used to calculate zmin) - it seems that the error comes up during the lasso process when all the z1's are negative - unfortunately I have no idea what this means. This leads to both zmin and gamhat being NA. The error can be worked around by forcing max.steps to some low value, but this isn't an ideal solution. I hope this post won't suffer the same fate as the previous one on the same topic. If I can provide any more useful information please let me know. Thanks, Jake > sessionInfo() R version 2.5.0 (2007-04-23) i686-pc-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" [7] "base" other attached packages: lars randomForest corpcor cairoDevice "0.9-7" "4.5-18" "1.4.5" "2.3" [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.