4 min read

Best of SAS: A Personal Nomination 2012

There SAS applications/procedures/features were not necessarily available since 2012. This year I paid special attention to them when began to use SAS 9.3. The following notes are  totally my personal endorsement purely based my own experience as a user:

XML File Reading: SAS XML Mapper

SAS_XML_Mapper

SAS XML Mapper itself is not an elegant tool from software design perspective (an example: I keep multiple versions because the latest version seems not carry out all the functionalities from old ones), but it is best XML file processing tool for SAS programmers like me. The sweet part of SAS XML Mapper is that you can use it to get SAS datasets directly with a automatically generated XML mapping file. I use it to import XML files from

CDISC ODM based files like define.xml

metadata querying results (XML) returned by SAS Metadata Server

and it works pretty well and I just can’t live without it!

Graphics Facility: ODS Graphics

ODS Graphics is the raising star among SAS products family since its advent and I also fall into love with her. This system contains

five procedures with “SG” in names,

a template language(GTL), and

two GUI tools, ODS Graphics Editor, and ODS Graphics Designer

in Base SAS and ODS Statistical Graphics in SAS/STAT (and in SAS/QC which I didn’t check out). ODS Graphics just makes SAS graph  much beautiful and graphics task much fun (and elegant!).

Btw, it may not be a fair game but still nice to check out a SAS ODS graph and some random pick up R graphs:

This is from Rick Wicklin with 3 lines of codes including one “RUN” statement:

proc sgscatter data=sashelp.iris; 
matrix SepalLength--PetalLength /group=Species diagonal=(histogram kernel);
run;

SAS_corr2

and this is the R homepage graph(and the R codes):

R_Graphics

and this is R Graph Gallery homepage:

r_graph_gallery

I must say SAS ODS Graphics rocks!

Statistical Procedure: PROC TTEST and PROC FREQ

In this category I list two because they are equally extremely relevant and important for me as statistical SAS programmer.

PROC TTEST makes equivalence test (which is extremely popular in clinical research) much more accessible by adding a TOST(two one-side test) option. Years ago SAS programmers might use PROC MIXED or other methods for this kind of statistical test(I also took a note on this topic, see here).

The new on PROC FREQ I checked out is to support much richer methods on calculating confidence intervals for binomial proportion (my note here) and confidence intervals for difference between independent binomial proportions (my note here) which are also extremely important in clinical research and I programmed a lot.

Report Writing: ODS Report Writing Interface

My first SAS version was 9.1.3 where PROC REPORT is the primary SAS reporting writing tool (with ODS) while PROC TABULATE not in fashion anymore (and you may merely hear the arguments among these two procedures since then). I used PROC REPORT for all my production work for reporting since recently I tried the ODS Report Writing Interface in a project for non-rectangular tables. It’s great and everyone was happy!

Basically it is an ODS enhanced DATA NULL reporting writing method (DATA NULL with FILE PRINT statements: it’s an even older way for me);a new ODS output object declared within DATA NULL:

dcl odsout obj();

I like this kind of reporting method: you can control your report line by line and cell by cell (although with more lines of structured codes!).

Metadata Querying Tool: PROC METADATA

In this category, the other two strong candidates are JAVA interface and SAS Data Step Functions. I like PROC Metadata against JAVA because it holds the same full functionality (while SAS Data Step Functions, no yet) while I can still work in SAS to produce reports (just add a new line to start to use ODS Report Writing Interface:)). Furthermore, I feel much comfortable working with SAS!

PROC Metadata uses XML as inputs and outputs: it may be not admirable compared to Data Step Functions. Since I use SAS XML Mapper, it’s not a problem anymore!

Documentation

I like the totally new SAS help and documentation system both online and offline since SAS 9.3.

First in Base SAS, lots of files were separated from “SAS Language Dictionary”,

SAS_Docs_offline

and in all procedures guide, the tab view looks great:

SAS_Docs