Create a stacked band plot in SAS

January 31, 2018
By
Create a stacked band plot in SAS

This article shows how to construct a "stacked band plot" in SAS, as shown to the right. (Click to enlarge.) You are probably familiar with a stacked bar chart in which the cumulative amount of some quantity is displayed by stacking the contributions of several groups. A canonical example is

The post Read more »

Building a better flu map!

January 30, 2018
By

The flu seems to be especially potent this year. "How potent is it," you might ask? ... Well, let's plot some data on a map to help find out! Here in the US, the Centers for Disease Control and Prevention (CDC) compiles data about diseases, and provide...
Read more »

A better way to view flu data

January 29, 2018
By

Have you, or someone you know, gotten the flu this year? Word on the street is that this year's flu might be particularly bad, and the data seem to be corroborating that so far. You don't want to take my word for it? -- well then, let's have a look [.....
Read more »

Jedi SAS Tricks – The Double vs. Decimal Dilemma

January 29, 2018
By

I ran across an interesting conundrum the other day. The intent was to compare the value of X to a list of desired values, and if X matched one of the values in the list, set Flag to 1, otherwise set Flag to 0.  I wrote and executed this test program, ...
Read more »

How to use random-number generators in SAS

January 29, 2018
By
How to use random-number generators in SAS

What is a random number generator? What are the random-number generators in SAS, and how can you use them to generate random numbers from probability distributions? In SAS 9.4M5, you can use the STREAMINIT function to select from eight random-number generators (RNGs), including five new RNGs. After choosing an RNG,

The post Read more »

Type I error rates in two-sample t-test by simulation

January 28, 2018
By

What do you do when analyzing data is fun, but you don't have any new data? You make it up.

This simulation tests the type I error rates of two-sample t-test in R and SAS. It demonstrates efficient methods for simulation, and it reminders the reader not to take the result of any single...
Read more »

North Korea’s 117 missile tests

January 25, 2018
By

Data doesn't always have to be 'big data' to be interesting. For example, I recently ran across a small, but very interesting, database containing all of North Korea's missile tests. The data was a bit difficult to digest in the formats provided, therefore I decided to try my hand at

The post Read more »

Use lists to pass parameters to SAS/IML functions

January 24, 2018
By
Use lists to pass parameters to SAS/IML functions

A popular way to use lists in the SAS/IML language is to pack together several related matrices into a single data structure that can be passed to a function. Imagine that you have written an algorithm that requires a dozen different parameters. Historically, you would have to pass those parameters

The post Read more »

How to test PROC HTTP and the JSON library engine

January 23, 2018
By

Using SAS with REST APIs is fun and rewarding, but it's also complicated. When you're dealing with web services, credentials, data parsing and security, there are a lot of things that can go wrong. It's useful to have a simple program that verifies that the "basic plumbing" is working before

The post Read more »

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.