SAS

Blogs on the SAS software

Is ODS graphics enabled? Use automatic macro variables to determine the state of SAS

March 27, 2017
By
Is ODS graphics enabled? Use automatic macro variables to determine the state of SAS

Did you know that you can check a SAS macro variable to see if ODS graphics is enabled? The other day I wanted to write a SAS program that creates a graph only if ODS graphics is enabled. The solution is to check the SYSODSGRAPHICS macro variable, which is automatically [...] The post Is ODS graphics enabled? Use automatic macro variables to determine the state of SAS appeared first on…

Read more »

Data tables: Nonmatrix data structures in SAS/IML

March 22, 2017
By
Data tables: Nonmatrix data structures in SAS/IML

Prior to SAS/IML 14.2, every variable in the Interactive Matrix Language (IML) represented a matrix. That changed when SAS/IML 14.2 introduced two new data structures: data tables and lists. This article gives an overview of data tables. I will blog about lists in a separate article. A matrix is a [...] The post Data tables: Nonmatrix data structures in SAS/IML appeared first on The DO Loop.

Read more »

Discover information about SAS formats… programmatically

March 20, 2017
By
Discover information about SAS formats… programmatically

SAS formats are very useful and can be used in a myriad of creative ways. For example, you can use formats to display decimal values as a fraction. However, SAS supports so many formats that it is difficult to remember details about the format syntax, such as the default field [...] The post Discover information about SAS formats... programmatically appeared first on The DO Loop.

Read more »

Forrester’s 2017 Take on Tools for Data Science

March 16, 2017
By
Forrester’s 2017 Take on Tools for Data Science

In my ongoing quest to track The Popularity of Data Science Software, I’ve updated the discussion of the annual report from Forrester, which I repeat here to save you from having to read through the entire document. If your organization … Continue reading →

Read more »

LEAVE and CONTINUE: Two ways to control the flow in a SAS DO loop

March 15, 2017
By
LEAVE and CONTINUE: Two ways to control the flow in a SAS DO loop

SAS programmers who have experience with other programming languages sometimes wonder whether the SAS language supports statements that are equivalent to the "break" and "continue" statements in other languages. The answer is yes. The LEAVE statement in the SAS DATA step is equivalent to the "break" statement. It provides a [...] The post LEAVE and CONTINUE: Two ways to control the flow in a SAS DO loop appeared first on…

Read more »

Jobs for “Data Science” Up 7-fold, for “Statistician” Down by Half

March 14, 2017
By
Jobs for “Data Science” Up 7-fold, for “Statistician” Down by Half

The Bureau of Labor Statistics projects that jobs for statisticians will grow by 34% between 2014 and 2024. However, according to the nation’s largest job web site, the number of companies looking for “statisticians” is actually in sharp decline. Those … Continue reading →

Read more »

Find your birthday in the digits of pi

March 13, 2017
By
Find your birthday in the digits of pi

It is time for Pi Day, 2017! Every year on March 14th (written 3/14 in the US), geeky mathematicians and their friends celebrate "all things pi-related" because 3.14 is the three-decimal approximation to pi. This year I use SAS software to show an amazing fact: you can find your birthday [...] The post Find your birthday in the digits of pi appeared first on The DO Loop.

Read more »

Find a pattern in a sequence of digits

March 10, 2017
By
Find a pattern in a sequence of digits

I recently needed to solve a fun programming problem. I challenge other SAS programmers to solve it, too! The problem is easy to state: Given a long sequence of digits, can you write a program to count how many times a particular subsequence occurs? For example, if I give you [...] The post Find a pattern in a sequence of digits appeared first on The DO Loop.

Read more »

Display output conditionally with PROC DOCUMENT

March 8, 2017
By
Display output conditionally with PROC DOCUMENT

Suppose you have several discrete variables. You want to conduct a frequency analysis of these variables and print the results, but ONLY for variables that have three or more levels. In other words, you want to conditionally display some results, but you don't know which variables satisfy the condition until [...] The post Display output conditionally with PROC DOCUMENT appeared first on The DO Loop.

Read more »

Reorder the output from a BY-group analysis in SAS

March 6, 2017
By
Reorder the output from a  BY-group analysis in SAS

After reading my article about how to use BY-group processing to run 1000 regression models, a SAS programmer asked whether it is possible to reorder the output of a BY-group analysis. The answer is yes: you can use the DOCUMENT procedure to replay a portion of your output in any [...] The post Reorder the output from a BY-group analysis in SAS appeared first on The DO Loop.

Read more »


Subscribe

Email:

  Subscribe