Often it is useful to view multiple responses by a common independent variable all in the same plot. SGPLOT procedure and GTL support the ability to view two responses, one each on the Y and Y2 axes by one independent variable (X) in one graph. Yes, you can also have X
Search Results: sgplot (964)
A recent question on a SAS Discussion Forum was "how can you overlay multiple kernel density estimates on a single plot?" There are three ways to do this, depending on your goals and objectives. Overlay different estimates of the same variable Sometimes you have a single variable and want to
Recently a user posted a question on the SAS/GRAPH and ODS Graphics Forum about drawing a plot with custom confidence intervals . The user has a simple data set with category, response (mean) and custom lower and upper confidence intervals. The data looks like this: Robert Allison provided the code (proc gplot +
I'm about to give you the single-most valuable piece of advice for getting the most out of your experience at SAS Global Forum 2012.
A recent post on the SAS website shows the SAS Annual Revenue History. It would be interesting to see how we could create such a graph using SG procedures, and how we could add more information and interest in the presentation. So, I started with the basic informaiton on the annual revenues provided,
Following up on the theme of graphs commonly used in many applications, here is another one that displays a horizontal bar chart with multiple data columns aligned with the bars. Recently at WUSS, a user stopped by asking how to create just such a graph. While this user wanted something more complex
Buffon's needle experiment for estimating π is a classical example of using an experiment (or a simulation) to estimate a probability. This example is presented in many books on statistical simulation and is famous enough that Brian Ripley in his book Stochastic Simulation states that the problem is "well known
Let us ring in the new year with something simple and useful. A recent question by a user over the holidays motivated this article on what is likely a commonly used graph. We want to compare the preformance of two categories along with a third measure. This could be something like "How
When I give presentations on using the SG procedures, I try to describe how you can take simple plots and layer them to create more complex graphs. I also emphasize how you must consider the output of each plot type so that, as you overlay them, you do not obscure
In Simple maps can go a long way, we discussed some techniques to create simple outline maps from map datasets in the MAPS library using GTL. Now, let us take this a step further to do something more useful with this feature. For some graphs, the map information is an essential part of the
A new book from SAS Press, "Statistical Graphics Procedures by Example" co-authored by Dan Heath and I has now been published (phew!). For both Dan and I, this was our first foray into writing a book, so it was highly educational to say the least. The key idea behind the presentation
Since this is a blog about statistical programming and analysis, I am always looking for data to analyze. As 2011 ends, I look back on the 165 blog entries that I published since 01JAN2011. This article presents the 10 most popular posts, as determined by the number of people who
Charlie Huang recently posted an article on a new way to draw maps using SGPlot procedure. The basic idea is simple, just use the SCATTER statement to plot the (x, y) points from the data sets in the MAPS library. The GROUP option can be used to color the markers for each
Recently the "SAS Sample of the Day" was a Knowledge Base article with an impressively long title: Sample 42165: Using a stored process to eliminate duplicate values caused by multiple group memberships when creating a group-based, identity-driven filter in SAS® Information Map Studio "Wow," I thought. "This is the longest
I have previously written about how to create funnel plots in SAS software. A funnel plot is a way to compare the aggregated performance of many groups without ranking them. The groups can be states, counties, schools, hospitals, doctors, airlines, and so forth. A funnel plot graphs a performance metric
I've been working with date-time data on a recent project, and I've come across a few SAS programs that have "opportunity for improvement" when it comes time to create reports. (Or maybe I haven't, and I contrived this entire blog post so that I could reference one of my favorite
The Unicode character table contains a vast array of characters and symbols that can be quite useful for making your text more descriptive in your graph. These characters can be inserted into any viewable string that you can define in the GTL or SG procedure syntax. These strings include titles,
You can still get a paper proposal in for SAS Global Forum 2012. All you need is an idea. And probably some data. And also, some techniques for analyzing that data. Oh, and some conclusions would be helpful as well. I know: you are a busy person! You might not
Welcome to this new blog on data visualization at SAS. Our goal is to engage with you on a discussion about analytical and business graphics for reporting and interactive applications. Our primary focus will be on ODS Graphics and related topics, but we look forward to a lively discussion on all things
Being able to reshape data is a useful skill in data analysis. Most of the time you can use the TRANSPOSE procedure or the SAS DATA step to reshape your data. But the SAS/IML language can be handy, too. I only use PROC TRANSPOSE a few times per year, so
"I think that my data are exponentially distributed, but how can I check?" I get asked that question a lot. Well, not specifically that question. Sometimes the question is about the normal, lognormal, or gamma distribution. A related question is "Which distribution does my data have," which was recently discussed
Normal, Poisson, exponential—these and other "named" distributions are used daily by statisticians for modeling and analysis. There are four operations that are used often when you work with statistical distributions. In SAS software, the operations are available by using the following four functions, which are essential for every statistical programmer
A popular use of SAS/IML software is to optimize functions of several variables. One statistical application of optimization is estimating parameters that optimize the maximum likelihood function. This post gives a simple example for maximum likelihood estimation (MLE): fitting a parametric density estimate to data. Which density curve fits the
I've noticed that a lot of people want to be able to draw bar charts with confidence intervals. This topic is a frequent posting on the SAS/GRAPH and ODS Graphics Discussion Forum and on the SAS-L mailing list. Consequently, this post describes how to add errors bars to a bar
It turns out that I'm not receiving the maximum potential value from my Netflix streaming service. Perhaps it's because I place too much value on sleep. With my monthly subscription, I am permitted to view Netflix content 24 hours a day, 7 days a week. In my house I have
In my previous post, I blogged about how to sample from a finite mixture distribution. I showed how to simulate variables from populations that are composed of two or more subpopulations. Modeling a response variable as a mixture distribution is an active area of statistics, as judged by many talks
Like millions of other Americans, I recently was asked to make a decision of tremendous importance to my household -- a decision that would affect the welfare of everyone in my family. That decision, of course, was whether to continue to receive Netflix movies by mail, or opt for the
Last week I showed a graph of the number of US births for each day in 2002, which shows a strong day-of-the-week effect. The graph also shows that the number of births on a given day is affected by US holidays. This blog post looks closer at the holiday effect.
Earlier today, Rick posted interesting information about which time of year the most babies are born, at least in the USA. I don't have data nearly as extensive as what's available at the NCHS, but I do have a sample of birthday records to compare against Rick's findings. My sample
In this guest blogger post, Udo Sglavo of the Advanced Analytics Division of SAS shows how to conduct time series cross-validation using SAS Forecast Server. Udo replicates the example from Rob J Hyndman's Research Tips blog. Replicating the Example In order to replicate the example in Hyndman's blog, the example