LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 26 Jan 2010 00:42:04 -0800
Reply-To:     wolfgang <cmat.wolfgang@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         wolfgang <cmat.wolfgang@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: Is Regression Using Proc IML Faster?
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

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


Back to: Top of message | Previous page | Main SAS-L page