Monday, April 11, 2016

SAS/IML compared to R , will call SAS/STAT or SAS/ETS procedures when you need a specialized analysis

http://www.stat.washington.edu/fritz/WinterStat302_2015/SASLec9.pdf

SAS/IML compared to R


http://stats.stackexchange.com/questions/5682/sas-iml-compared-to-r
I was wondering if anyone had experience with SAS/IML and R, and can give some pointers as to the relative advantages/disadvantages of the two. I've used R extensively for programming and statistical analyses, but haven't had much experience with IML. However, as this company is a SAS shop, I'm likely to have to use it (the alternative is to program everything in base SAS, which sometimes leads to true horrors).
Thanks
shareimprove this question

3 Answers


up vote13down voteaccepted
Full disclosure: I work at SAS.
The IML blog is http://blogs.sas.com/iml.
Both languages are matrix-vector languages with a rich run-time library and the ability to write your own functions. For data analysis tasks and matrix computations, they both provide the neccessary tools to help you analyze your data.
The SAS/IML syntax is very similar to the SAS DATA step, so it appeals to SAS programmers. You can also call all of the SAS DATA step functions, and you can call any SAS procedure from within SAS/IML by using the SUBMIT/ENDSUBMIT statements. The SAS/IML Studio application is very nice for developing programs and for creating graphics.
The R community creates and shares a large number of packages, including packages written by top academic researchers. New statistical methods appear in R very quickly. The R community has many help and discussion lists.
The SAS/IML language does not contain every statistical analysis (as a built-in function) because the assumption is that you will call SAS/STAT or SAS/ETS procedures when you need a specialized analysis. For example, SAS/IML does not have functions for mixed modelling, but you can prepare the data in SAS/IML, call the MIXED or GLIMMIX procedure, and then use IML some more to manipulate or modify the output from the procedure.
In chapter 11 (and 16) of my book, I show how to call R from SAS/IML, transfer data back and forth, and generally show how to get the best of both worlds.
shareimprove this answer

You might want to pick up (or look at) a copy of Rick Wicklin's book: Statistical Programming with SAS IML software
He also has a blog about IML.
And, on SAS' site, there is a section about IML:
And you will want IMLStudio, which offers a multiple window view that is much easier to integrate with Base SAS than the old IML was.
I have used Base SAS and SAS Stat a lot. I've only barely looked at IML. But, from what I've seen, your knowledge of R should help.
shareimprove this answer
  
Good info. But you may want to update that link to Wicklin's book =) For example, to:support.sas.com/publishing/authors/wicklin.html – Wolfgang Dec 23 '10 at 21:02

I have never used it, but I know for new versions of IML, you can call R routines. Maybe start by looking at http://support.sas.com/rnd/app/studio/statr.pdf.
shareimprove this answer

No comments:

Post a Comment