Date: Tue, 26 Jan 2010 00:44:31 0800
ReplyTo: wolfgang <cmat.wolfgang@GMAIL.COM>
Sender: "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU>
From: wolfgang <cmat.wolfgang@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: Is Regression Using Proc IML Faster?
ContentType: text/plain; charset=ISO88591
On Jan 26, 9:42 am, wolfgang <cmat.wolfg...@gmail.com> wrote:
> Hi,
> I cannot believe that you could be faster using IML code than PROC
> REG.
> As was already said here, the main problem with IML is that you must
> load the matrix into core.
> [1] Now, PROC REG computes the X'X matrix by running observationswise
> through the data set
> and X must never be in code. That means PROC REG accumulates a lot of
> error (the condition
> of X'X is squared the condition of X) by computing X'X, but it should
> be faster than IML when doing
> the same in two steps, loading the matrix ad computing X'X.
> [2] After X'X is computed, PROC REG is using sweep, which is of course
> much slower than Cholesky.
> Here, IML could be faster when Cholesky is used. However, using
> Cholesky on a ill conditiones X'X
> may get you in trouble.
> [3] So, if X is ill conditioned, I would use either PROC ORTGOREG or
> IML.
> But if the condition of X is okay, I would use PROC REG.
>
> When computing benchmarks, the condition of X should be one factor.
> Another factor would be the form of the matrix, i.e. is Nobs >> nvar
> or is Nobs not
> much larger than nvar. These are two very different situations. Also
> running very many
> small problems or just a few very large problems should be a factor
> etc.
>
> Wolfgang
of cousrse I meant "in core" and not "in code"
