Posts Tagged ‘ data analysis ’

Grouping observations based on quantiles

September 24, 2012
By
Grouping observations based on quantiles

Sometimes it is useful to group observations based on the values of some variable. Common schemes for grouping include binning and using quantiles. In the binning approach, a variable is divided into k equal intervals, called bins, and each observation is assigned to a bin. In this scheme, the size
Read more »

Tags: , ,
Posted in SAS | Comments Off

Visualizing congressional representation by state and time

September 19, 2012
By
Visualizing congressional representation by state and time

With the US presidential election looming, all eyes are on the Electoral College. In the presidential election, each state gets as many votes in the Electoral College as it has representatives in both congressional houses. (The District of Columbia also gets three electors.) Because every state has two senators, it
Read more »

Tags: , ,
Posted in SAS | Comments Off

Visualizing US commute times and congestion

September 10, 2012
By
Visualizing US commute times and congestion

Robert Allison posted a map that shows the average commute times for major US cities, along with the proportion of the commute that is attributed to traffic jams and other congestion. The data are from a CEOs for Cities report (Driven Apart, 2010, p. 45). Robert use SAS/GRAPH software to
Read more »

Tags: , ,
Posted in SAS | Comments Off

What is the difference between categories and groups in PROC SGPLOT?

August 22, 2012
By
What is the difference between categories and groups in PROC SGPLOT?

The other day I was using PROC SGPLOT to create a box plot and I ran a program that was similar to the following: proc sgplot data=sashelp.cars; title "Box Plot: Category = Origin"; vbox Horsepower / category=origin; run; An hour or so later I had a need for another box
Read more »

Tags: , ,
Posted in SAS | Comments Off

Discriminating Fisher’s iris data by using the petal areas

August 9, 2012
By
Discriminating Fisher’s iris data by using the petal areas

I've seen analyses of Fisher's iris data so often that sometimes I feel like I can smell the flowers' scent. However, yesterday I stumbled upon an analysis that I hadn't seen before. The typical analysis is shown in the documentation for the CANDISC procedure in the SAS/STAT documentation. A (canonical)
Read more »

Tags: , ,
Posted in SAS | Comments Off

A statistically beautiful Father’s Day

June 18, 2012
By
A statistically beautiful Father’s Day

To celebrate special occasions like Father's Day, I like to relax with a cup of coffee and read the newspaper. When I looked at the weather page, I was astonished by the seeming uniformity of temperatures across the contiguous US. The weather map in my newspaper was almost entirely yellow
Read more »

Tags: , ,
Posted in SAS | Comments Off

For each observation, find the variable that contains the minumum value

May 21, 2012
By
For each observation, find the variable that contains the minumum value

The other day I encountered an article in the SAS Knowledge Base that shows how to write a macro that "returns the variable name that contains the maximum or minimum value across an observation." Some people might say that the macro is "clever." I say it is complicated. This is
Read more »

Tags: , ,
Posted in SAS | Comments Off

Expand data by using frequencies

May 4, 2012
By
Expand data by using frequencies

A reader asked: I want to create a vector as follows. Suppose there are two given vectors x= and f=. Here f indicates the frequency vector. I hope to generate a vector c=. I am trying to use the REPEAT function
Read more »

Tags: , , ,
Posted in SAS | Comments Off

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.

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.