Posts Tagged ‘ Tips and Techniques ’

Use the EFFECTPLOT statement to visualize regression models in SAS

June 22, 2016
By
Use the EFFECTPLOT statement to visualize regression models in SAS

Graphs enable you to visualize how the predicted values for a regression model depend on the model effects. You can gain an intuitive understanding of a model by using the EFFECTPLOT statement in SAS to create graphs like the one shown at the top of this article. Many SAS regression

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Use the EFFECTPLOT statement to visualize regression models in SAS

How to write CONTRAST and ESTIMATE statements in SAS regression procedures

June 6, 2016
By

I got several positive comments about a recent tip, "How to fit a variety of logistic regression models in SAS." A reader asked if I knew any other similar resources about statistical analysis in SAS. Absolutely! One gem that comes to mind is "Examples of writing CONTRAST and ESTIMATE statements."

The post Read more »

Tags: ,
Posted in SAS | Comments Off on How to write CONTRAST and ESTIMATE statements in SAS regression procedures

Ten tips before you run an optimization

May 11, 2016
By

Optimization is a primary tool of computational statistics. SAS/IML software provides a suite of nonlinear optimizers that makes it easy to find an optimum for a user-defined objective function. You can perform unconstrained optimization, or define linear or nonlinear constraints for constrained optimization. Over the years I have seen many

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Ten tips before you run an optimization

Four ways to create a design matrix in SAS

February 24, 2016
By
Four ways to create a design matrix in SAS

SAS programmers sometimes ask, "How do I create a design matrix in SAS?" A design matrix is a numerical matrix that represents the explanatory variables in regression models. In simple models, the design matrix contains one column for each continuous variable and multiple columns (called dummy variables) for each classification

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Four ways to create a design matrix in SAS

A simple trick to include (and order!) all categories in SGPLOT legends

February 17, 2016
By
A simple trick to include (and order!) all categories in SGPLOT legends

Last week Sanjay Matange wrote about a new SAS 9.4m3 option that enables you to show all categories in a graph legend, even when the data do not contain all the categories. Sanjay's example was a chart that showed medical conditions classified according to the scale "Mild," "Moderate," and "Severe."

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on A simple trick to include (and order!) all categories in SGPLOT legends

Compute a moving average in SAS

January 27, 2016
By
Compute a moving average in SAS

A common question on SAS discussion forums is how to compute a moving average in SAS. This article shows how to use PROC EXPAND and contains links to articles that use the DATA step or macros to compute moving averages in SAS. In a previous post, I explained how to

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Compute a moving average in SAS

Arrange matrices and graphs in a gridded layout

December 2, 2015
By
Arrange matrices and graphs in a gridded layout

Last week my colleague Chris Hemedinger published a blog post that described how to use the ODS LAYOUT GRIDDED statement to arrange tables and graphs in a panel. The statement was introduced in SAS 9.4m1 (December 2013). Gridded layout is supported for HTML, POWERPOINT, and the PRINTER family of destinations

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Arrange matrices and graphs in a gridded layout

Trap and cap: Avoid division-by-zero and domain errors when evaluating functions

November 4, 2015
By
Trap and cap: Avoid division-by-zero and domain errors when evaluating functions

Statistical programmers often need to evaluate complicated expressions that contain square roots, logarithms, and other functions whose domain is restricted. Similarly, you might need to evaluate a rational expression in which the denominator of the expression can be zero. In these cases, it is important to avoid evaluating a function

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Trap and cap: Avoid division-by-zero and domain errors when evaluating functions

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.