Posts Tagged ‘ Data Analysis ’

Add a prediction ellipse to a scatter plot in SAS

July 21, 2014
By
Add a prediction ellipse to a scatter plot in SAS

It is common in statistical graphics to overlay a prediction ellipse on a scatter plot. This article describes two easy ways to overlay prediction ellipses on a scatter plot by using SAS software. It also describes how to overlay multiple prediction ellipses for subpopulations. What is a prediction ellipse? A […]

Read more »

How to create and detect an empty matrix

July 18, 2014
By
How to create and detect an empty matrix

An empty matrix is a matrix that has zero rows and zero columns. At first "empty matrix" sounds like an oxymoron, but when programming in a matrix language such as SAS/IML, empty matrices arise surprisingly often. Sometimes empty matrices occur because of a typographical error in your program. If you […]

Read more »

A log transformation of positive and negative values

July 14, 2014
By
A log transformation of positive and negative values

In my four years of blogging, the post that has generated the most comments is "How to handle negative values in log transformations." Many people have written to describe data that contain negative values and to ask for advice about how to log-transform the data. Today I describe a transformation […]

Read more »

Create custom tick marks for axes on the log scale

July 11, 2014
By
Create custom tick marks for axes on the log scale

In my previous blog post, I showed how to use log axes on a scatter plot in SAS to better visualize data that range over several orders of magnitude. Because the data contained counts (some of which were zero), I used a custom transformation x → log10(x+1) to visualize the […]

Read more »

Scatter plots with logarithmic axes…and how to handle zeros in the data

July 9, 2014
By
Scatter plots with logarithmic axes…and how to handle zeros in the data

If you are trying to visualize numerical data that range over several magnitudes, conventional wisdom says that a log transformation of the data can often result in a better visualization. This article shows several ways to create a scatter plot with logarithmic axes in SAS and discusses some of the […]

Read more »

An easy way to expand data by using frequencies

July 7, 2014
By
An easy way to expand data by using frequencies

A few years ago I blogged about how to expand a data set by using a frequency variable. The DATA step in the article was simple, but the SAS/IML function was somewhat complicated and used a DO loop to expand the data. (Although a reader later showed how to avoid […]

Read more »

Create standard statistical graphs from SAS/IML

June 30, 2014
By
Create standard statistical graphs from SAS/IML

Last week I showed how to use the SUBMIT and ENDSUBMIT statements in the SAS/IML language to call the SGPLOT procedure to create ODS graphs of data that are in SAS/IML vectors and matrices. I also showed how to create a SAS/IML module that hides the details and enables you […]

Read more »

Creating ODS graphics from the SAS/IML language

June 23, 2014
By
Creating ODS graphics from the SAS/IML language

As you develop a program in the SAS/IML language, it is often useful to create graphs to visualize intermediate results. I do this all the time in my preferred development environment, which is SAS/IML Studio. In SAS/IML Studio, you can write a single statement to create a scatter plot, bar […]

Read more »

Approximating a distribution from published quantiles

June 18, 2014
By
Approximating a distribution from published quantiles

A colleague asked me an interesting question: I have a journal article that includes sample quantiles for a variable. Given a new data value, I want to approximate its quantile. I also want to simulate data from the distribution of the published data. Is that possible? This situation is common. […]

Read more »

Aborting a SAS/IML program upon encountering an error

March 3, 2014
By
Aborting a SAS/IML program upon encountering an error

A colleague sent me an interesting question: What is the best way to abort a SAS/IML program? For example, you might want to abort a program if the data is singular or does not contain a sufficient number of observations or variables. As a first attempt would be to try [...]

Read more »


Subscribe

Email:

  Subscribe