# Posts Tagged ‘ Tips and Techniques ’

## 5 tips for customizing legends in PROC SGPLOT in SAS

December 3, 2018
By

When a graph includes several markers or line styles, it is often useful to create a legend that explains the relationship between the data and the symbols, color, and line styles in the graph. The SGPLOT procedure does a good job of automatically creating and placing a legend for most

Tags: , ,
Posted in SAS | Comments Off on 5 tips for customizing legends in PROC SGPLOT in SAS

## Select ODS tables by using wildcards and regular expressions in SAS

November 19, 2018
By

You might know that you can use the ODS SELECT statement to display only some of the tables and graphs that are created by a SAS procedure. But did you know that you can use a WHERE clause on the ODS SELECT statement to display tables that match a pattern?

Tags: , ,
Posted in SAS | Comments Off on Select ODS tables by using wildcards and regular expressions in SAS

## Transpose blocks to reshape data

October 22, 2018
By

A SAS programmer asked how to rearrange elements of a matrix. The rearrangement he wanted was rather complicated: certain blocks of data needed to move relative to other blocks, but the values within each block were to remain unchanged. It turned out that the mathematical operation he needed is called

Tags: , ,
Posted in SAS | Comments Off on Transpose blocks to reshape data

## The intersection of multiple sets

October 8, 2018
By

This article compares several ways to find the elements that are common to multiple sets. I test which method is the fastest in the SAS/IML language. However, all algorithms are intrinsically fast, which raises an important question: when is it worth the time and effort to optimize an algorithm? The

Tags: , ,
Posted in SAS | Comments Off on The intersection of multiple sets

## Linearly spaced vectors in SAS

September 17, 2018
By

The SAS/IML language and the MATLAB language are similar. Both provide a natural syntax for performing high-level computations on vectors and matrices, including basic linear algebra subroutines. Sometimes a SAS programmer will convert an algorithm from MATLAB into SAS/IML. Because the languages are not identical, I am sometimes asked, "what

Tags: , ,
Posted in SAS | Comments Off on Linearly spaced vectors in SAS

## Plot curves for levels of two categorical variables in SAS

August 8, 2018
By

The SGPLOT procedure in SAS makes it easy to create graphs that overlay various groups in the data. Many statements support the GROUP= option, which specifies that the graph should overlay group information. For example, you can create side-by-side bar charts and box plots, and you can overlay multiple scatter

Tags: , , ,
Posted in SAS | Comments Off on Plot curves for levels of two categorical variables in SAS

## The top 10 posts from The DO Loop in 2017

January 3, 2018
By

I wrote more than 100 posts for The DO Loop blog in 2017. The most popular articles were about SAS programming tips, statistical data analysis, and simulation and bootstrap methods. Here are the most popular articles from 2017 in each category. General SAS programming techniques INTCK and INTNX: Do you

Tags: , , ,
Posted in SAS | Comments Off on The top 10 posts from The DO Loop in 2017

## Visualize multivariate regression models by slicing continuous variables

December 18, 2017
By

Slice, slice, baby! You've got to slice, slice, baby! When you fit a regression model that has multiple explanatory variables, it is a challenge to effectively visualize the predicted values. This article describes how to visualize the regression model by slicing the explanatory variables. In SAS, you can use the

Tags: , ,
Posted in SAS | Comments Off on Visualize multivariate regression models by slicing continuous variables

## Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.