Of course you know how to create graphs ... But do you often find that preparing the data to plot is often the hardest part? Well then, this blog post is for you! I'll be demonstrating how to import Excel data into SAS, transpose the data, use what wer...

Read more »

Tags: debt, education, excel, IMPORT, proc transpose, Uncategorized

Posted in SAS | Comments Off on Import Excel data, transpose, and plot it!

"Code golf" is a fun programming pastime that challenges you to solve a problem with the least amount of code possible. Like regular golf, the goal is to use fewest code "strokes" to hit the mark. Here's a recent challenge that was posted to me via Twitter. @cjdinger @SASJedi got

The post Read more »

Tags: code golf, SAS Communities, Uncategorized

Posted in SAS | Comments Off on SAS code golf: find the max digit in a string of digits

This article shows how to implement balanced bootstrap sampling in SAS. The basic bootstrap samples with replacement from the original data (N observations) to obtain B new samples. This is called "uniform" resampling because each observation has a uniform probability of 1/N of being selected at each step of the

The post Read more »

Tags: Bootstrap and Resampling, Uncategorized

Posted in SAS | Comments Off on Balanced bootstrap resampling in SAS

The Base SAS DATA step has been a powerful tool for many years for SAS programmers. But as data sets grow and programmers work with massively parallel processing (MPP) computing environments such as Teradata, Hadoop or the SAS High-Performance Analytic...

Read more »

Tags: learn sas, SAS Books, sas programming, Uncategorized

Posted in SAS | Comments Off on What DS2 can do for the DATA step

My colleague Robert Allison recently blogged about using the diameter of Texas as a unit of measurement. The largest distance across Texas is about 801 miles, so Robert wanted to find the set of all points such that the distance from the point to Texas is less than or equal

The post Read more »

Tags: Just for Fun, Math, Uncategorized

Posted in SAS | Comments Off on Offset regions: Find all points within a specified distance from a polygon

The United States declared independence in 1776, and we celebrate it on July 4th every year. But the land areas that make up the United States today weren't necessarily the same as they were back then. So I thought it would be interesting to create a m...

Read more »

Tags: county, history, map, Uncategorized

Posted in SAS | Comments Off on How old is your county?

In a previous article, I showed how to find the intersection (if it exists) between two line segments in the plane. There are some fun problems in probability theory that involve intersections of line segments. One is "What is the probability that two randomly chosen chords of a circle intersect?"

The post Read more »

Tags: simulation, Statistical Thinking, Uncategorized

Posted in SAS | Comments Off on The probability that two random chords of a circle intersect

Back in high school, you probably learned to find the intersection of two lines in the plane. The intersection requires solving a system of two linear equations. There are three cases: (1) the lines intersect in a unique point, (2) the lines are parallel and do not intersect, or (3)

The post Read more »

Tags: Math, Matrix Computations, Uncategorized

Posted in SAS | Comments Off on The intersection of two line segments