Tips and techniques - What’s the difference?

1

In this blog and in the book Statistical Programming with SAS/IML Software, I present tips and techniques for writing efficient SAS/IML programs for data analysis, simulation, matrix computations, and other topics of interest to statistical programmers.

When I was writing my book, one of the reviewers commented that he wasn’t sure why some advice was labeled a "tip" whereas other advice was labeled a "technique."

A tip is general advice. For example, "brush your teeth every day" is a good tip for oral hygiene. A technique describes the specific algorithm for brushing your teeth: angle your brush at 45 degrees, brush gently using short strokes, and so on.

The same distinction applies to programming tips and techniques. Techniques are usually illustrated by SAS/IML statements or pseudo-code. For example, I think every SAS/IML programmer needs to know the following tip:

Tip: Use the LOC function to identify observations that satisfy some criteria.

A related technique shows you how to analyze the observations after they are found:

Technique: If c is a categorical variable, then the following SAS/IML statements analyze all observations in each category of c:

uC = unique(c);
do i = 1 to nrow(uC);
   idx = loc(c = uC[i]); /** idx contains obs in i_th category **/
   /** ...analyze those observations here... **/
end;
Share

About Author

Rick Wicklin

Distinguished Researcher in Computational Statistics

Rick Wicklin, PhD, is a distinguished researcher in computational statistics at SAS and is a principal developer of SAS/IML software. His areas of expertise include computational statistics, simulation, statistical graphics, and modern methods in statistical data analysis. Rick is author of the books Statistical Programming with SAS/IML Software and Simulating Data with SAS.

1 Comment

  1. Pingback: Enumerating levels of a classification variable - The DO Loop

Leave A Reply

Back to Top