Computing rates and proportions is a common task in data analysis. When you are computing several proportions, it is helpful to visualize how the rates vary among subgroups of the population. Examples of proportions that depend on subgroups include: Mortality rates for various types of cancers Incarceration rates by race
Search Results: sgplot (964)
You've probably heard of the stupid 'challenges' where people usually end up hurting themselves (cinnamon challenge, Carolina reaper pepper challenge, etc). I thought it might be more helpful to society to have a challenge that could actually help people, rather than hurting them! Therefore I came up with the Halloween
The EFFECT statement is supported by more than a dozen SAS/STAT regression procedures. Among other things, it enables you to generate spline effects that you can use to fit nonlinear relationships in data. Recently there was a discussion on the SAS Support Communities about how to interpret the parameter estimates
The SAS Championship golf tournament is happening this week, here in Cary, North Carolina! If you're following along and watching the scores, you might wonder how they're doing compared to past years, and what kind of scores it generally takes to win. Follow along as I plot the data from
As a fellow student, I know that making sure you get the right books for learning a new skill can be tough. To get you started off right, I would like to share the top SAS books that professors are requesting for students learning SAS. With this inside sneak-peek, you
In a previous article, I mentioned that the VLINE statement in PROC SGPLOT is an easy way to graph the mean response at a set of discrete time points. I mentioned that you can choose three options for the length of the "error bars": the standard deviation of the data,
It is always great to read an old paper or blog post and think, "This task is so much easier in SAS 9.4!" I had that thought recently when I stumbled on a 2007 paper by Wei Cheng titled "Graphical Representation of Mean Measurement over Time." A substantial portion of
We've had record high 90+ degree temperatures here in the southeast US this past week (September / October), and it has made me appreciate having an air conditioner. Indeed, air conditioners were pretty much invented here in North Carolina (see Eric Cramer). They are used in pretty much every building
I frequently see questions on SAS discussion forums about how to compute the geometric mean and related quantities in SAS. Unfortunately, the answers to these questions are sometimes confusing or even wrong. In addition, some published papers and web sites that claim to show how to calculate the geometric mean
Lately we've been hearing a lot about "record low unemployment" in the news. Being a data guy, I wanted to see it for myself. Follow along as I create some custom unemployment graphs from the official data for California and New York (two of our most populous states). Or, if
In a scatter plot that displays many points, it can be important to visualize the density of the points. Scatter plots (indeed, all plots that show individual markers) can suffer from overplotting, which means that the graph does not indicate how many observations are at a specific (x, y) location.
A moving average is a statistical technique that is used to smooth a time series. My colleague, Cindy Wang, wrote an article about the Hull moving average (HMA), which is a time series smoother that is sometimes used as a technical indicator by stock market traders. Cindy showed how to
I often use axis tables in PROC SGPLOT in SAS to add a table of text to a graph so that the table values are aligned with the data. But axis tables are not the only way to display tabular data in a graph. You can also use the TEXT
As we're in the thick of hurricane season, I'm sure some of my fellow map-makers are wanting to create their own custom hurricane maps. In this blog post, I step you through the process, so you'll know where to find all the pieces, and how to put them together. I
An important application of the dot product (inner product) of two vectors is to determine the angle between the vectors. If u and v are two vectors, then cos(θ) = (u ⋅ v) / (|u| |v|) You could apply the inverse cosine function if you wanted to find θ in
A few examples to demonstrate some of the common output-related problems with ODS Graphics Procedures. If your graphical output does not appear as you wanted, consider the options that you are using and make sure that you are using the correct option.
What is this math good for, anyway? –Every student, everywhere I am a professional applied mathematician, yet many of the mathematical and statistical techniques that I use every day are not from advanced university courses but are based on simple ideas taught in high school or even in grade school.
Flying drones was a new & exciting hobby, and very cool fad a few years ago. In recent years, the drone manufacturers have added some really nice features to make the drones easier to fly and more capable ... but the government also added some new rules that have curbed
Do you want to bin a numeric variable into a small number of discrete groups? This article compiles a dozen resources and examples related to binning a continuous variable. The examples show both equal-width binning and quantile binning. In addition to standard one-dimensional techniques, this article also discusses various techniques
When my colleague, Robert Allison, blogged about visualizing the Mandelbrot set, I was reminded of a story from the 1980s, which was the height of the fractal craze. A research group in computational mathematics had been awarded a multimillion-dollar grant to purchase a supercomputer. When the supercomputer arrived and got
SAS supports more than 25 common probability distributions for the PDF, CDF, QUANTILE, and RAND functions. Of course, there are infinitely many distributions, so not every possible distribution is supported. If you need a less-common distribution, I've shown how to extend the functionality of Base SAS (by using PROC FCMP)
The mosaic plot is a graphical visualization of a frequency table. In previous articles, I showed how to create a mosaic plot in SAS by using PROC FREQ and how to define a template in the Graph Template Language (GTL) by using the MOSAICPARM statement. This article shows how to
I think it's time to replace my 2008 Prius. It has served me well, been basically maintenance-free, and gotten good gas mileage ... so, why not just get a newer Prius? Well, I've got the itch to get back into an SUV for my daily driver (I had a Bronco
When fitting a least squares regression model to data, it is often useful to create diagnostic plots of the residuals versus the explanatory variables. If the model fits the data well, the plots of the residuals should not display any patterns. Systematic patterns can indicate that you need to include
My article about deletion diagnostics investigated how influential an observation is to a least squares regression model. In other words, if you delete the i_th observation and refit the model, what happens to the statistics for the model? SAS regression procedures provide many tables and graphs that enable you to
In these modern times, my utility bill has a bar chart so I can see how my current consumption compares to my historical usage. I decided to create my own version of this utility bill bar chart, and make a few improvements along the way. If you're into SGplot bar
In this 'Rosetta Graph' example, I demonstrate how to control bar chart colors in Gchart and SGplot. But first, here's a little diversion... some artwork in my office here at SAS. There's a *lot* of artwork hanging around at SAS, but this particular painting wasn't created by the SAS artists
A family of curves is generated by an equation that has one or more parameters. To visualize the family, you might want to display a graph that overlays four of five curves that have different parameter values, as shown to the right. The graph shows members of a family of
Statistical programmers and analysts often use two kinds of rectangular data sets, popularly known as wide data and long data. Some analytical procedures require that the data be in wide form; others require long form. (The "long format" is sometimes called "narrow" or "tall" data.) Fortunately, the statistical graphics procedures
Marathons seem to be popular these days, therefore I decided to dive into some data and find a way to apply analytics. You might find this interesting if you're a fan of marathons - or if you like seeing the details behind cool graphing techniques! Before we get started, here's