Re: [R] SparseM and Stepwise Problem

From: roger koenker <roger_at_ysidro.econ.uiuc.edu>
Date: Wed 31 Jan 2007 - 02:05:34 GMT

One simple possibility -- if you can generate the X matrix in dense form is
the coercion

        X <- as.matrix.csr(X)

Unfortunately, there is no current way to go from a formula to a sparse X
matrix without passing through a dense version of X first. Otherwise you
need to use new() to define the X matrix directly. This is usually not that
difficult, but it depends on the model....

url:    www.econ.uiuc.edu/~roger                Roger Koenker
email   rkoenker@uiuc.edu                       Department of Economics
vox:    217-333-4558                            University of Illinois
fax:    217-244-6678                            Champaign, IL 61820


On Jan 30, 2007, at 5:31 PM, davidkat@davidkatzconsulting.com wrote:

> I'm trying to use stepAIC on sparse matrices, and I need some help.
> The documentation for slm.fit suggests:
> slm.fit and slm.wfit call slm.fit.csr to do Cholesky decomposition
> and then
> backsolve to obtain the least squares estimated coefficients. These
> functions can be
> called directly if the user is willing to specify the design matrix
> in matrix.csr form.
> This is often advantageous in large problems to reduce memory
> requirements.
> I need some help or a reference that will show how to create the
> design matrix from
> data in matrix.csr form.
> Thanks for any help.
>
>
> --
> David Katz
> www.davidkatzconsulting.com
> 541 482-1137
>
> [[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.



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. Received on Wed Jan 31 13:10:01 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 31 Jan 2007 - 02:30:25 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.