Re: [R] lasso/lars error

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu, 02 Aug 2007 16:48:14 +0100 (BST)

This looks like a question for the package maintainer (as the posting guide said), as was the one you referred to. Please bear in mind

> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

Anyone who is going to be able to help will need such an example.

It seems that a reply like this needs to go on the archive for future reference.

On Thu, 2 Aug 2007, Jake Michaelson wrote:

> 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_at_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.
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help_at_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.
Received on Thu 02 Aug 2007 - 16:38:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 02 Aug 2007 - 17:33:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.