[R] Inefficiency of SAS Programming

Thomas Levine thomas.levine at gmail.com
Fri Feb 27 15:45:05 CET 2009


I had enrolled in a statistics course this semester, but after the
first class, I dropped it because it uses SAS. This thread makes me
quite glad.

Tom!

On Fri, Feb 27, 2009 at 8:48 AM, Frank E Harrell Jr
<f.harrell at vanderbilt.edu> wrote:
> Wensui Liu wrote:
>>
>> Thanks for pointing me to the SAS code, Dr Harrell
>> After reading codes, I have to say that the inefficiency is not
>> related to SAS language itself but the SAS programmer. An experienced
>> SAS programmer won't use much of hard-coding, very adhoc and difficult
>> to maintain.
>> I agree with you that in the SAS code, it is a little too much to
>> evaluate predictions. such complex data step actually can be replaced
>> by simpler iml code.
>
> Agreed that the SAS code could have been much better.  I programmed in SAS
> for 23 years and would have done it much differently.  But you will find
> that the most elegant SAS program re-write will still be a far cry from the
> elegance of R.
>
> Frank
>
>>
>> On Thu, Feb 26, 2009 at 5:57 PM, Frank E Harrell Jr
>> <f.harrell at vanderbilt.edu> wrote:
>>>
>>> If anyone wants to see a prime example of how inefficient it is to
>>> program
>>> in SAS, take a look at the SAS programs provided by the US Agency for
>>> Healthcare Research and Quality for risk adjusting and reporting for
>>> hospital outcomes at http://www.qualityindicators.ahrq.gov/software.htm .
>>>  The PSSASP3.SAS program is a prime example.  Look at how you do a vector
>>> product in the SAS macro language to evaluate predictions from a logistic
>>> regression model.  I estimate that using R would easily cut the
>>> programming
>>> time of this set of programs by a factor of 4.
>>>
>>> Frank
>>> --
>>> Frank E Harrell Jr   Professor and Chair           School of Medicine
>>>                    Department of Biostatistics   Vanderbilt University
>>>
>>> ______________________________________________
>>> 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.
>>>
>>
>>
>>
>
>
> --
> Frank E Harrell Jr   Professor and Chair           School of Medicine
>                     Department of Biostatistics   Vanderbilt University
>
> ______________________________________________
> 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