[R] input matrix for leaps algorithm
Greg Snow
Greg.Snow at imail.org
Mon Oct 4 20:35:17 CEST 2010
The regsubsets function in the leaps package can work with fewer points than variables. Though the meaning will be questionable. The lasso (lasso2 or lars packages) may be more informative for your situation.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of CZ
> Sent: Monday, October 04, 2010 8:43 AM
> To: r-help at r-project.org
> Subject: [R] input matrix for leaps algorithm
>
>
> Hello,
>
> I was trying to use the leaps algorithm for my variable selection. I
> tried
> different matrices calculated from multiple linear regression, linear
> discriminant analysis, and the basic correlation matrix as inputs to
> the
> leaps algorithm. But I always got the error message - the matrix is
> not
> positive definite.
>
> I have more variables than the number of observations/samples. I know
> this
> may be a problem. But the multiple linear regression in SAS seems to
> be
> able to handle the case when there are more variables than the number
> of
> observations. I wonder if there is a way I can still do my variable
> selection instead of reducing the number of variables. Or there may be
> something wrong with my function calls.
>
> Thank you.
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/input-
> matrix-for-leaps-algorithm-tp2954453p2954453.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org 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.
More information about the R-help
mailing list