How much does this big pumpkin weigh? One of the cafeterias at SAS invited patrons to post their guesses on an internal social network at SAS. There was no prize for the correct guess; it was just a fun Halloween-week activity. I recognized this as an opportunity to apply the
Search Results: sgplot (964)
Statistical programmers often need to evaluate complicated expressions that contain square roots, logarithms, and other functions whose domain is restricted. Similarly, you might need to evaluate a rational expression in which the denominator of the expression can be zero. In these cases, it is important to avoid evaluating a function
Early last year I wrote an article on how to create the "Most Frequent Adverse Events Sorted by Relative Risk" graph using the SGPLOT procedure. The key issue here is that such a graph normally displays two plots side by side, a scatter plot of the proportion values by treatment
All axis customization features are always welcome. Especially since SGPLOT statements can often be used to create non standard graphs, having the ability to customize the axes is important. This article presents ways in which you can customize the discrete axes. By default, the x axis will try to display the
Rick Wicklin created a nice example of using the SURFACEPLOTPARM statement to create a surface plot in SAS. As I read it, the question that immediately came to mind was: can I use this to create the famous SAS cowboy hat? The "cowboy hat" is a highly distributed example of
Update 02Dec2016: Beginning with SAS 9.4 Maintenance 4, there is now a JSON libname engine. Read this new article to learn more -- you might prefer it to using DS2 for this task! Thanks to the proliferation of cloud services and REST-based APIs, SAS users have been making use of
Often there is a need to display more than one response simultaneously for a bar chart, series plot or a vector plot. SAS 9.40M3 adds the options you need to get such results using two new options COLORRESPONSE and THICKRESPONSE where applicable. The Bar Chart on the right shows the frequency
The SGPLOT procedure provides great tools to create all kinds of graphs for all domains from business to clinical. However, every so often, we need to create visuals that are not exactly graphs, but more like flow or network diagrams, or something entirely unique. Some users may have tools to
A friend who teaches courses about statistical regression asked me how to create a graph in SAS that illustrates an important concept: the conditional distribution of the response variable. The basic idea is to draw a scatter plot with a regression line, then overlay several probability distributions along the line,
I think everyone can agree that being able to debug programs is an important skill for SAS programmers. That’s why Susan Slaughter and I devoted a whole chapter to it in The Little SAS® Book. I don’t know about you, but I think figuring out what’s wrong with my program
Often when the data includes some extreme difference in measures or some outliers, the plot of the data points can get skewed due to the need to accommodate the extreme outliers. The bulk of the observations get squeezed into a smaller region of the plot. While this may be useful
A few weeks back I saw a couple of posts on the Communities page from users wanting to find ways to compute the area of an general polygon and also the center of the area. I felt such features likely existed somewhere in the SAS/GRAPH set of procedures, so I asked our resident
When we first released GTL and SG Procedures back with SAS 9.2, Box Plots and Bar Charts would always treat the category axis as discrete. We realized soon enough that we need to support box plots on scaled interval axes for many clinical applications, and this was added in SAS
There are many ways to modify the graphs that SAS creates. Standard graph customization methods include template modification (which most people use to modify graphs that analytical procedures produce) and SG annotation (which most people use to modify graphs that procedures such as PROC SGPLOT produce). However, you can also
We all want to customize our graphs just so, and have our personal preferences. Over the past few releases SG Procedures and GTL have added options to customize the look and feel of our graphs. In this article, I will describe new ways in which you can customize your legends. We will also see some
Last week's post about odds ratio plots in SAS made me think about a similar plot that visualizes the parameter estimates for a regression analysis. The so-called regression coefficient plot is a scatter plot of the estimates for each effect in the model, with lines that indicate the width of
SAS 9.4 Maintenance release 3 was released on July 14. The ODS Graphics procedures include many important, useful and cool features in this release, some that have been requested by you for a while. In the next few articles, I will cover some of these features. Last time I covered
I recently read an argument by Andrew Wheeler for using a logarithmic axis for plotting odds ratios. I found his argument convincing. Accordingly, this blog post shows how to create an odds ratio plot in SAS where the ratio axis is displayed on a log scale. Thanks to Bob Derr
My colleague Robert Allison finds the most interesting data sets to visualize! Yesterday he posted a visualization of toothless seniors in the US. More precisely, he created graphs that show the estimated prevalence of adults (65 years or older) who have had all their natural teeth extracted. The dental profession
A SAS programmer wanted to plot the normal distribution and highlight the area under curve that corresponds to the tails of the distribution. For example, the following plot shows the lower decile shaded in blue and the upper decile shaded in red. An easy way to do this in SAS
Big data is a popular topic, with multiple articles about the analysis of the same. Today, "Big Data" is measured in multiple of Tera Bytes, and SAS provides special software for analysis and visualization of Big Data - Visual Analytics. When data is very big, it may be meaningless, let alone inefficient, to plot
You've probably heard of a random walk, but have you heard about the drunkard's walk? I've previously written about how to simulate a one-dimensional random walk in SAS. In the random walk, you imagine a person who takes a series of steps where the step size and direction is a
SAS/IML software is used by many SAS programmers, primarily for creating custom algorithms and macros that implement statistical analyses that are not built into any SAS procedure. I know that PROC IML is used regularly by pharmaceutical companies, by the financial and insurance industries, and by researchers in medical colleges
When ODS Graphics was first released with SAS 9.2 in 2008, a conscious effort was made to create graphs that were consistent and aesthetically pleasing out of the box. Features in the graph derive their visual attributes from the active Style. When Group classifications are in effect, the different classification
Bubble Plots provide additional ways to visualize your data. The plot supports display of multiple response characteristics of the data in one graph. Bubble plots were introduced with SAS 9.3 in GTL and SG Procedures. A bubble is drawn at each (x, y) point in the graph, and each bubble is
In my article about finding an initial guess for root-finding algorithms, I stated that Newton's root-finding method "might not converge or might converge to a root that is far away from the root that you wanted to find." A reader wanted more information about that statement. I have previously shown
The SGPLOT procedures includes features to add annotations to your graph in many different ways. Annotations provide you a flexible way to add features to your graph that are not available through the standard plot statements. Recently, I saw this graph on the web that caught my attention. Clearly, this looks like
I still remember the first time I was asked to "consult" on a statistical problem. A former physics professor had some students who had gathered data that should lie along an arc of a theoretical circle. The professor asked if there was a regression technique that could find the center
I was reading a statistics book when I encountered a histogram that caught my eye. The histogram looked similar to the one at the left. It contained a normal density estimate overlaid on a histogram, but the height of the density curve seemed too short when compared to the heights
If you have programmed with SAS in the last 15 years, you have probably had a reason to share your SAS results in PDF format. The ODS PDF destination, much like a well-designed car, has evolved over the years, offering progressively nicer features like security, enhanced image formatting and embedded