Posts Tagged ‘ Statistical Graphics ’

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

A funnel plot for immunization rates

November 26, 2018
By
A funnel plot for immunization rates

Last week my colleague, Robert Allison, visualized data regarding immunization rates for kindergarten classes in North Carolina. One of his graphs was a scatter plot that displayed the proportion of unimmunized students versus the size of the class for 1,885 kindergarten classes in NC. This scatter plot is the basis

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on A funnel plot for immunization rates

Define custom color ramps by using the RANGEATTRMAP statement in GTL

November 12, 2018
By
Define custom color ramps by using the RANGEATTRMAP statement in GTL

The SGPLOT procedure enables you to use the value of a response variable to color markers or areas in a graph. For example, you can use the COLORRESPONSE= option to define a variable whose values will be used to color markers in a scatter plot or cells in a heat

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Define custom color ramps by using the RANGEATTRMAP statement in GTL

Visualize the feasible region for a constrained optimization

November 7, 2018
By
Visualize the feasible region for a constrained optimization

When solving optimization problems, it is harder to specify a constrained optimization than an unconstrained one. A constrained optimization requires that you specify multiple constraints. One little typo or a missing minus sign can result in an infeasible problem or a solution that is unrelated to the true problem. This

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Visualize the feasible region for a constrained optimization

A trick to plot groups in PROC SGPLOT

October 31, 2018
By
A trick to plot groups in PROC SGPLOT

A useful feature in PROC SGPLOT is the ability to easily visualize subgroups of data. Most statements in the SGPLOT procedure support a GROUP= option that enables you to overlay plots of subgroups. When you use the GROUP= option, observations are assigned attributes (colors, line patterns, symbols, ...) that indicate

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on A trick to plot groups in PROC SGPLOT

Chi-square tests for proportions in one-way tables

October 1, 2018
By
Chi-square tests for proportions in one-way tables

Programmers on a SAS discussion forum recently asked about the chi-square test for proportions as implemented in PROC FREQ in SAS. One person asked the basic question, "how do I test the null hypothesis that the observed proportions are equal to a set of known proportions?" Another person said that

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Chi-square tests for proportions in one-way tables

Distances on rectangular grids

September 10, 2018
By
Distances on rectangular grids

Given a rectangular grid with unit spacing, what is the expected distance between two random vertices, where distance is measured in the L1 metric? (Here "random" means "uniformly at random.") I recently needed this answer for some small grids, such as the one to the right, which is a 7 x 6

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Distances on rectangular grids

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

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.