Posts Tagged ‘ Tips and Techniques ’

5 tips for customizing legends in PROC SGPLOT in SAS

December 3, 2018
By
5 tips for customizing legends in PROC SGPLOT in SAS

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

The post Read more »

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?

The post Read more »

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
Transpose blocks to reshape data

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

The post Read more »

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

The intersection of multiple sets

October 8, 2018
By
The intersection of multiple sets

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

The post Read more »

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

Linearly spaced vectors in SAS

September 17, 2018
By
Linearly spaced vectors in SAS

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

The post Read more »

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
Plot curves for levels of two categorical variables in SAS

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

The post Read more »

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
The top 10 posts from The DO Loop in 2017

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

The post Read more »

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
Visualize multivariate regression models by slicing continuous variables

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

The post Read more »

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.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.