In the Clinical Research domain, there is often the need to display lab values by treatment or test and it is often useful to view this data along with reference lines showing the normal ranges. The obvious way is to use reference lines to denote the normal ranges. SGPLOT Code: proc sgplot data=band; scatter x=x y=y
English
Many SAS procedures can produce ODS statistical graphics as naturally as they produce tables. Did you know that it is possible to obtain the numbers underlying an ODS statistical graph? This post shows how. Suppose that a SAS procedure creates a graph that displays a curve and that you want
My sleep patterns are erratic (and somewhat torturous) – they range from sleeping solidly for eight hours a clip to me wandering aimlessly about the house at 3am. Unfortunately, the latter was the reality during the wee hours of Friday, July 20; I was up watching ESPN (my typical late
Hopefully you know that a gif animation can be used for more than just showing a cartoon animal doing cute tricks! Being a savvy data-meister, I'm sure you are also aware that you can use gif animations to see how data changes over time. But perhaps you didn't know you could
If you need to calculate the mean, sum, standard deviation, or frequency count for a variable, you'll find it pretty easy to accomplish in SAS Enterprise Guide. The corresponding tasks in the menus have names like "Summary Statistics" or "One-way Frequencies". Obvious, right? Often, researchers or students have a quest
I received the following question: In the DATA step I always use the ** operator to raise a values to a power, like this: x**2. But on your blog I you use the ## operator to raise values to a power in SAS/IML programs. Does SAS/IML not support the **
Fire department operations are very complex, with multi-faceted missions that include not only fire prevention and suppression, but emergency response and fire inspections. These must be coordinated with area growth and development decisions, and water system management decisions. When a fire or an emergency occurs, the right equipment, with the right people,
When working with "big data" you usually have too many points to view in a plot, and end up subsetting or summarizing the data. But now, in SAS 9.3, you have an alternative! For example, the following scatter plot of 10,000+ points is just a visual "blob": But using a new
Last week I wrote an article in which I pointed out that many SAS programmers write a simulation in SAS by writing a macro loop. This approach is extremely inefficient, so I presented a more efficient technique. Not only is the macro loop approach slow, but there are other undesirable
Thanks to Illumino, the citizens of Datapolis are still able to get their medicine and Frackture is being kept at bay; however we both have our hands full and a new crisis is on the horizon. Our data scientists and engineers have informed me that a new evil force is
Poster presentations are a great opportunity to present in a less formal, less stressful format than the full session, but the poster presentation still gives you a great opportunity for professional feedback and a chance to go to a great conference. Well, good news! You still have time to submit
When comparing results by category and group, putting the items to be compared close together usually leads to a graph that is easier to decode. Take the case of the data (simulated) shown below. Here we have population by age group and sex. To compare the population by sex, it is
With the London 2012 Olympics around the corner, there are sure to be reports or rumors of performance-enhancing drug use among some athletes. It turns out that using manufactured chemicals to give yourself an edge is frowned upon in the athletic community. However, as a SAS user you should avail
If you've heard anything from SAS in recent months, then you've heard about high-performance analytics and the new SAS Visual Analytics offering. SAS has taken the high-performance analytics message around the world in a series of recent "road shows". From the start, this project has enjoyed a different development process
We've introduced the topic of the Four E's and discussed the role of analytics in Enforcement and Engineering. Now let's delve into Emergency Response. A quick emergency response can make all the difference in saving the lives of crash victims. Many vehicles can now communicate directly with emergency responders immediately after
Over the past few years, and especially since I posted my article on eight tips to make your simulation run faster, I have received many emails (often with attached SAS programs) from SAS users who ask for advice about how to speed up their simulation code. For this reason, I
A SAS Professionals attendee and Twitter follower named Marco asks for help: ..struggling to find a method with custom tasks in EG to be able to list the datasets in a library, can you help please? Sure, no problem. This is easy-peasy-lemon-squeezy. First, make sure that you have a reference
I have blogged about three different SAS/IML techniques that iterate over categories and process the observations in each category. The three techniques are as follows: Use a WHERE clause on the READ statement to read only the observations in the ith category. This is described in the article "BY-group processing
A key element of graphs used for analysis of safety data for clinical research is the inclusion of statistical data (or tables) about the study that are aligned with the x axis of the graph. A common example of this comes from the paper "Graphical Approaches to the Analysis of
The dictionary defines excellence as the quality or state of excelling or something in which one excels. Here at SAS, we get our definition of excellence from the stories we hear – stories from you, about you. These stories are here – in the SAS Circle of Excellence. The Circle of
Most management literature and studies posit that organizations with a clear mission and work objectives, understood by all levels of the organization, are the most productive. The key to that success is effectively communicating the mission, agreeing on key performance indicators and giving employees at all levels access to relevant
When you are working with probability distributions (normal, Poisson, exponential, and so forth), there are four essential functions that a statistical programmer needs. As I've written before, for common univariate distributions, SAS provides the following functions: the PDF function, which returns the probability density at a given point the CDF
"Welcome to the English summer." "In the US you have climate. In England we have Weather." These are just two of the familiar phrases I heard yesterday during the SAS Professionals Convention held at SAS UK in Marlow. The weather changed from sun to dark clouds to rain and even
Suppose that you have two data vectors, x and y, with the same number of elements. How can you rearrange the values of y so that they have the same relative order as the values of x? In other words, find a permutation, π, of the elements of y so
Update 24Nov2015: The methods in this post no longer work for Twitter, as Twitter has discontinued support for its "share count" API that was used within the Twitter share buttons. But the Facebook method still works, and I've described a method for counting LinkedIn shares on another post. As of
I've been working on a new book about Simulating Data with SAS. In researching the chapter on simulation of multivariate data, I've noticed that the probability density function (PDF) of multivariate distributions is often specified in a matrix form. Consequently, the multivariate density can usually be computed by using the
Spark lines, made popular by Edward Tufte, provide a way to visualize trends in a concise space, often inline with the rest of the narrative or data. Previously, I posted an article on Spark Plots in which I created different plot types, some of which included multiple graphs and data in each row. For such
Earlier this month SAS announced some really big news: DataFlux®, which has delivered market-leading data management solutions to customers for more than a decade, is now fully integrated into the SAS organization. The combination of the two brands helps customers build an integrated information management strategy supporting data management and
I just received this note in my inbox and wanted to make sure you also have all up-to-the-minute details about the SAS Professionals Convention: Dear SAS Professional, This year's SAS Professionals Convention is just over a week away. Although we've sold out of tickets for Tuesday, places are still available for
When I need to graph a function of two variables, I often choose to use a contour plot. A surface plot is probably easier for many people to understand, but it has several disadvantages when compared to a contour plot. For example, the following statements in SAS/IML Studio displays a