Skip to content

Inefficiency of SAS Programming

13 messages · Gerard M. Keogh, Greg Snow, Jim Lemon +5 more

#
Yes Greg,

but if you're buying SAS they'll throw in IML pretty cheaply - SAS think
it's only for a few nerds out there who wan to do funny stuff.

G


                                                                           
             Greg Snow                                                     
             <Greg.Snow at imail.                                             
             org>                                                       To 
             Sent by:                  "Gerard M. Keogh"                   
             r-help-bounces at r-         <GMKeogh at justice.ie>, Frank E       
             project.org               Harrell Jr                          
                                       <f.harrell at vanderbilt.edu>          
                                                                        cc 
             27/02/2009 19:05          "r-help-bounces at r-project.org"      
                                       <r-help-bounces at r-project.org>, R   
                                       list <r-help at stat.math.ethz.ch>     
                                                                   Subject 
                                       Re: [R] Inefficiency of SAS         
                                       Programming                         
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




But SAS/IML is not part of base SAS, it costs extra, so there is a good
chance that a user that has SAS will not be able to run code that uses
SAS/IML.

I have known of SAS programmers who know IML well that still write
matrix/vector tools using macros or proc transpose so that a user without
IML can still use the code (the fact that the code that started this thread
was found on a website, suggests that it was meant for general use rather
than something only used internally where you know what add-ons will be
available).

Just another way that R makes life easier for both programmer and user.


--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
______________________________________________
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.
#
This does not really address my point.  Yes, if the few nerds who want to do funny stuff are the ones making the purchase, then there is a good chance (but still not guaranteed) that they will get IML, but do all companies that buy SAS actually think about that, or do they just see the extra price (no matter how low), or not even think to look at that piece because the person making the purchase does not really the funny things you can do with it.

If you want your SAS code to be able to be run by anyone with SAS, you cannot assume that they have IML.  If you want your R code to be run by anyone, you cannot make your code dependent on packages/tools that are not available for all platforms.
#
Ajay,

I think this is somewhat unnecessary!

For regular SAS users PROC SUMMARY/MEANS is the data manipulation staple. A
SAS user interested in R will look at "Intro to R" and find it recommends
"tapply" for data manipulation jobs. This is a problem - tapply just isn't
simple and obvious.

A better option would be for the "Intro to R" to link to Bob Muenchen's
original 80-page document "R for SAS and SPSS users", page 52 where the
"summarize" function is described.

Gerard



                                                                           
             Ajay ohri                                                     
             <ohri2007 at gmail.c                                             
             om>                                                        To 
                                       Greg Snow <Greg.Snow at imail.org>     
             03/03/2009 04:58                                           cc 
                                       "Gerard M. Keogh"                   
                                       <GMKeogh at justice.ie>,               
                                       "r-help-bounces at r-project.org"      
                                       <r-help-bounces at r-project.org>, R   
                                       list <r-help at stat.math.ethz.ch>     
                                                                   Subject 
                                       Re: [R] Inefficiency of SAS         
                                       Programming                         
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




for an " inefficient " language , it sure has dominated the predictive
analytics world for 3 plus decades.

I referred once to intellectual?jealousy?between newton and liebnitz.

i am going ahead and creating the R package called "Anne".

It basically is meant only for SAS users who want to learn R ,
without?upsetting?the schedule of the corporate users.

Simply put , it is a wrapper on SAS language using the function
command...ie procunivariate function in "Anne" package would call the
summary function and so on...

Regards,

Ajay

www.decisionstats.com
On Tue, Mar 3, 2009 at 9:20 AM, Greg Snow <Greg.Snow at imail.org> wrote:
This does not really address my point. ?Yes, if the few nerds who want to
  do funny stuff are the ones making the purchase, then there is a good
  chance (but still not guaranteed) that they will get IML, but do all
  companies that buy SAS actually think about that, or do they just see the
  extra price (no matter how low), or not even think to look at that piece
  because the person making the purchase does not really the funny things
  you can do with it.

  If you want your SAS code to be able to be run by anyone with SAS, you
  cannot assume that they have IML. ?If you want your R code to be run by
  anyone, you cannot make your code dependent on packages/tools that are
  not available for all platforms.

  --
  Gregory (Greg) L. Snow Ph.D.
  Statistical Data Center
  Intermountain Healthcare
  greg.snow at imail.org
  801.408.8111


  > -----Original Message-----
  > From: Gerard M. Keogh [mailto:GMKeogh at justice.ie]
  > Sent: Monday, March 02, 2009 3:22 AM
  > To: Greg Snow
  > Cc: Frank E Harrell Jr; R list; r-help-bounces at r-project.org
  > Subject: Re: [R] Inefficiency of SAS Programming
  >
  > Yes Greg,
  >
  > but if you're buying SAS they'll throw in IML pretty cheaply - SAS
  > think
  > it's only for a few nerds out there who wan to do funny stuff.
  >
  > G
  >
  >
  >
  > ? ? ? ? ? ? ?Greg Snow
  > ? ? ? ? ? ? ?<Greg.Snow at imail.
  > ? ? ? ? ? ? ?org>
  > To
  > ? ? ? ? ? ? ?Sent by: ? ? ? ? ? ? ? ? ?"Gerard M. Keogh"
  > ? ? ? ? ? ? ?r-help-bounces at r- ? ? ? ? <GMKeogh at justice.ie>, Frank E
  > ? ? ? ? ? ? ?project.org ? ? ? ? ? ? ? Harrell Jr
  > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<f.harrell at vanderbilt.edu>
  >
  > cc
  > ? ? ? ? ? ? ?27/02/2009 19:05 ? ? ? ? ?"r-help-bounces at r-project.org"
  > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<r-help-bounces at r-project.org>,
  > R
  > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?list <r-help at stat.math.ethz.ch>
  >
  > Subject
  > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Re: [R] Inefficiency of SAS
  > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Programming
  >
  >
  >
  >
  >
  >
  >
  >
  >
  >
  > But SAS/IML is not part of base SAS, it costs extra, so there is a good
  > chance that a user that has SAS will not be able to run code that uses
  > SAS/IML.
  >
  > I have known of SAS programmers who know IML well that still write
  > matrix/vector tools using macros or proc transpose so that a user
  > without
  > IML can still use the code (the fact that the code that started this
  > thread
  > was found on a website, suggests that it was meant for general use
  > rather
  > than something only used internally where you know what add-ons will be
  > available).
  >
  > Just another way that R makes life easier for both programmer and user.
  >
  >
  > --
  > 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 Gerard M. Keogh
  > > Sent: Friday, February 27, 2009 7:19 AM
  > > To: Frank E Harrell Jr
  > > Cc: r-help-bounces at r-project.org; R list
  > > Subject: Re: [R] Inefficiency of SAS Programming
  > >
  > > Yes Frank, I accept your point but nevertheless IML is the proper
  > place
  > > for
  > > matrix work in SAS - mixing macro-level logic and computation is
  > > another
  > > question - R is certainly more seemless in this respect.
  > >
  > > Gerard
  > >
  > >
  > >
  > > ? ? ? ? ? ? ?Frank E Harrell
  > > ? ? ? ? ? ? ?Jr
  > > ? ? ? ? ? ? ?<f.harrell at vander
  > > To
  > > ? ? ? ? ? ? ?bilt.edu> ? ? ? ? ? ? ? ? "Gerard M. Keogh"
  > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<GMKeogh at justice.ie>
  > > ? ? ? ? ? ? ?27/02/2009 13:55
  > > cc
  > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?R list <r-
  > > help at stat.math.ethz.ch>,
  > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?r-help-bounces at r-project.org
  > >
  > > Subject
  > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Re: [R] Inefficiency of SAS
  > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Programming
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
  > >
> > Gerard M. Keogh wrote:
> > > Frank,
  > > >
  > > > I can't see the code you mention - Web marshall at work - but I
  > don't
  > > think
  > > > you should be too quick to run down SAS - it's a powerful and
  > > flexible
  > > > language but unfortunately very expensive.
  > > >
  > > > Your example mentions doing a vector product in the macro language
  > -
  > > this
  > > > only suggest to me that those people writing the code need a crash
  > > course
  > > > in SAS/IML (the matrix language). SAS is designed to work on
  > records
  > > and
  > > so
  > > > is inapproprorriate for matrices - macros are only an efficient
  > code
  > > > copying device. Doing matrix computations in this way is pretty mad
  > > and
  > > the
  > > > code would be impossible never mind the memory problems.
  > > > SAS recognise that but a lot of SAS users remain familiar with IML.
  > > >
  > > > In IML by contrast there are inner, cross and outer products and a
  > > raft
  > > of
  > > > other useful methods for matrix work that R users would be familiar
  > > with.
  > > > OLS for example is one line:
  > > >
  > > > b = solve(X`X, X`y) ;
  > > > rss = sqrt(ssq(y - Xb)) ;
  > > >
  > > > And to give you a flavour of IML's capabilities I implemented a SAS
  > > version
  > > > of the MARS program in it about 6 or 7 years ago.
  > > > BTW SPSS also has a matrix language.
  > > >
  > > > Gerard
  > >
  > > But try this:
  > >
  > > PROC IML;
  > > ... some custom user code ...
  > > ... loop over j=1 to 10 ...
  > > ... ? PROC GENMOD, output results back to IML
  > > ...
  > >
  > > IML is only a partial solution since it is not integrated with the
  > PROC
  > > step.
  > >
  > > Frank
  > >
  > > >
  > > >
  > > >
  > > >
  > >
  > > > ? ? ? ? ? ? ?Frank E Harrell
  > >
  > > > ? ? ? ? ? ? ?Jr
  > >
  > > > ? ? ? ? ? ? ?<f.harrell at vander
  > > To
  > > > ? ? ? ? ? ? ?bilt.edu> ? ? ? ? ? ? ? ? R list <r-
  > > help at stat.math.ethz.ch>
  > >
  > > > ? ? ? ? ? ? ?Sent by:
  > > cc
  > > > ? ? ? ? ? ? ?r-help-bounces at r-
  > >
  > > > ? ? ? ? ? ? ?project.org
  > > Subject
  > > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[R] Inefficiency of SAS
  > > Programming
  > > >
  > >
  > > > ? ? ? ? ? ? ?26/02/2009 22:57
  > >
  > > >
  > >
  > > >
  > >
  > > >
  > >
  > > >
  > >
  > > >
  > > >
  > > >
  > > >
  > > > 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.
  > > >
  > > >
  > > >
  > > >
  > >
  > ***********************************************************************
  > > ***********
  > >
  > > > The information transmitted is intended only for the person or
  > entity
  > > to
  > > which it is addressed and may contain confidential and/or privileged
  > > material. Any review, retransmission, dissemination or other use of,
  > or
  > > taking of any action in reliance upon, this information by persons or
  > > entities other than the intended recipient is prohibited. If you
  > > received
  > > this in error, please contact the sender and delete the material from
  > > any
  > > computer. ?It is the policy of the Department of Justice, Equality
  > and
  > > Law
  > > Reform and the Agencies and Offices using its IT services to disallow
  > > the
  > > sending of offensive material.
  > > > Should you consider that the material contained in this message is
  > > offensive you should contact the sender immediately and also
  > > mailminder[at]justice.ie.
  > > >
  > > > Is le haghaidh an duine n? an eintitis ar a bhfuil s? d?rithe, agus
  > > le
  > > haghaidh an duine n? an eintitis sin amh?in, a bhearta?tear an
  > > fhaisn?is a
  > > tarchuireadh agus f?adfaidh s? go bhfuil ?bhar faoi r?n agus/n? faoi
  > > phribhl?id inti. Toirmisctear aon athbhreithni?, atarchur n? leathadh
  > a
  > > dh?anamh ar an bhfaisn?is seo, aon ?s?id eile a bhaint aisti n? aon
  > > ghn?omh
  > > a dh?anamh ar a hiontaoibh, ag daoine n? ag eintitis seachas an
  > > faighteoir
  > > beartaithe. M? fuair t? ? seo tr? dhearmad, t?igh i dteagmh?il leis
  > an
  > > seolt?ir, le do thoil, agus scrios an t-?bhar as aon r?omhaire. Is ?
  > > beartas na Roinne Dl? agus Cirt, Comhionannais agus Athch?irithe Dl?,
  > > agus
  > > na nOif?g? agus na nGn?omhaireachta? a ?s?ideann seirbh?s? TF na
  > > Roinne,
  > > seoladh ?bhair chol?il a dh?chead?.
  > > > M?s rud ? go measann t? gur ?bhar col?il at? san ?bhar at? sa
  > > teachtaireacht seo is ceart duit dul i dteagmh?il leis an seolt?ir
  > > l?ithreach agus le mailminder[ag]justice.ie chomh maith.
  > > >
  > >
  > ***********************************************************************
  > > ************
  > >
  > > >
  > > >
  > > >
  > >
  > >
  > > --
  > > 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.
  >
  > ______________________________________________
  > 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.
  >

  ______________________________________________
  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.
#
Ajay ohri wrote:
If you want to market this, Ajay, I'd suggest a name like SASsieR.

Jim
#
2009/3/3 Jim Lemon <jim at bitwrit.com.au>:
Nice name. I'd call it 'Ursas', which works on several levels:

 1. U-R-SAS.  (pun on You Are SAS, or You R-SAS)

 2. Ur-SAS. (Germanic prefix Ur- meaning 'proto' or 'primitive')[1]

 3. Ursas (from Latin 'Ursa' meaning 'bear', because it seems very few
R users can bear SAS)

Barry

[1] http://en.wiktionary.org/wiki/ur-
#
Ajay ohri wrote:
Go ahead and add to the confusion.  You've already created some by using 
  summary for procunivariate.  I created the describe function in the 
Hmisc package to replace univariate.

Frank

  
    
#
On Mar 3, 9:58?am, Ajay ohri <ohri2... at gmail.com> wrote:
=====================================
Bob Muenchen's book "R for SAS and SPSS users" provides a systematic
transition plan (if I may use that term) for SAS and SPSS users
intending to work on/migrate to R. Having been a newly transformed R
user myself, I'm inclined to believe that creating yet another package
that just houses some SAS procedures--sounding names for data
manipulation/summarization would add to fair bit of confusion.

my $.02..

-Girish
#
Ajay ohri wrote:
Why would I ever do that?  describe is a improvement on univariate, 
saving an estimated 87 +/- 87 trees per year in paper by printing what 
you need in much less space and concentrating on real descriptive 
statistics.

Frank

  
    
#
On 3/03/2009, at 5:58 PM, Ajay ohri wrote:

            
Reminds me of fortune(38).

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}