NOTE: DS2, SQL Within a SET Statement

Earlier this week, I suggested taking a look at DS2 (“the DATA step evolved”) as a learning opportunity for the New Year. I listed the advantages that DS2 offers over the traditional DATA step. One of those was the ability to use SQL within a SET state…

Mathematical squiggles in SAS

John D. Cook shared a picture of “pretty squiggles” on his blog, as well as a prose description of the mathematics behind it. I’m more of a programmer than a mathematician, but I’ve attempted to transcribe his description into a SAS program. I used DATA step to generate the point […]

Time to trade in your jalopy macro?

Suppose you have an old jalopy that’s perfectly reliable.  Your jalopy gets you where you wanna go: no frills; no drama. Do you trade your old wheels in for a racecar that accelerates like crazy and corners like it’s on rails? Or stick with what’s old…

Dummy coding in SAS

Here is a macro to generate binary features (also called dummy coding) from a nominal variable (also called a categorical variable, such as eye color). The automation saves time and avoids mistakes when there are many possible values to a category or …