graph

12月 142020
 

Do you need to see how long patients have been treated for? Would you like to know if a patient’s dose has changed, or if the patient experienced any dose interruptions? If so, you can use a Napoleon plot, also known as a swimmer plot, in conjunction with your exposure data set to find your answers. We demonstrate how to find the answer in our recent book SAS® Graphics for Clinical Trials by Example.

You may be wondering what a Napoleon plot is? Have you ever heard of the map of Napoleon’s Russian campaign? It was a map that displayed six types of data, such as troop movement, temperature, latitude, and longitude on one graph (Wikipedia). In the clinical setting, we try to mimic this approach by displaying several different types of safety data on one graph: hence, the name “Napoleon plot.” The plot is also known as a swimmer plot because each patient has a row in which their data is displayed, which looks like swimming lanes.

Code

Now that you know what a Napoleon plot is, how do you produce it? In essence, you are merely writing GTL code to produce the graph you need. In order to generate a Napoleon plot, some key GTL statements that are used are DISCRETEATTRMAP, HIGHLOWPLOT, SCATTERPLOT and DISCRETELEGEND. Other plot statements are used, but the statements that were just mentioned are typically used for all Napoleon plot. In our recent book, one of the chapters carefully walks you through each step to show you how to produce the Napoleon plot. Program 1, below, gives a small teaser of some of the code used to produce the Napoleon Plot.

Program 1: Code for Napoleon Plot That Highlights Dose Interruptions

	   discreteattrmap name = "Dose_Group";
            value "54" / fillattrs = (color = orange) 
                         lineattrs = (color = orange pattern = solid);     
            value "81" / fillattrs = (color = red) 
                         lineattrs = (color = red pattern = solid);
         enddiscreteattrmap;
 
         discreteattrvar attrvar = id_dose_group var = exdose attrmap = "Dose_Group";
 
         legenditem type = marker name = "54_marker" /
            markerattrs = (symbol = squarefilled color = orange)
            label = "Xan 54mg";
 
         < Other legenditem statements >
 
 
	     layout overlay / yaxisopts = (type = discrete 
                                         display = (line label)     
                                         label = "Patient")
 
	        highlowplot y = number 
                          high = eval(aendy/30.4375) 
                          low = eval(astdy/30.4375) / 
                 group = id_dose_group                       
                 type = bar 
                 lineattrs = graphoutlines 
                 barwidth = 0.2;
		 scatterplot y = number x = eval((max_aendy + 10)/30.4375) /      
                 markerattrs = (symbol = completed size = 12px);               
		 discretelegend "54_marker" "81_marker" "completed_marker" /  
                 type = marker  
                 autoalign = (bottomright) across = 1                          
                 location = inside title = "Dose";
         endlayout;

Output

Without further ado, Output 1 shows you an example of a Napoleon plot. You can see that there are many patients, and so the patient labels have been suppressed. You also see that the patient who has been on the study the longest has a dose delay indicated by the white space between the red and orange bars. While this example illustrates a simple Napoleon plot with only two types, dose exposure and treatment, the book has more complex examples of swimmer plots.

Output 1: Napoleon Plot that Highlights Dose Interruptions

Napoleon plot with orange and red bars showing dose exposure and treatment

How to create a Napoleon plot with Graph Template Language (GTL) was published on SAS Users.

10月 022018
 

Over the years, the US has drilled for crude oil in several locations, such as Pennsylvania, Texas, Alaska, and the Gulf of Mexico. A few years ago, as the US started drilling more in North Dakota, there were forecasts that we would surpass Saudi Arabia in crude oil production. And recently, [...]

The post Does the US really produce the most oil now?!? appeared first on SAS Learning Post.

8月 102018
 

Elections are in the news again, therefore I have been on the lookout for interesting graphs. I recently found some graphs of the Census Current Population Survey (CPS) Voting and Registration Supplement data, and tried to improve them. Follow along if you're interested in voter data, or creating better graphs! [...]

The post Survey says! .... US voters are _________. appeared first on SAS Learning Post.

8月 102018
 

Elections are in the news again, therefore I have been on the lookout for interesting graphs. I recently found some graphs of the Census Current Population Survey (CPS) Voting and Registration Supplement data, and tried to improve them. Follow along if you're interested in voter data, or creating better graphs! [...]

The post Survey says! .... US voters are _________. appeared first on SAS Learning Post.

7月 242018
 

When you were a kid, were you intrigued by the 99-cent X-ray glasses advertised in the back of the comic books? If you ordered those glasses, you were probably disappointed. Now that you're an adult, how would you like to use computer techniques to "X-ray" your data and look for [...]

The post Using X-ray glasses to see patterns in your data! appeared first on SAS Learning Post.

4月 192018
 

There were 97 e-posters in The Quad demo room at SAS Global Forum this year. And the one that caught my eye was Ted Conway's "Periodic Table of Introductory SAS ODS Graphics Examples." Here's a picture of Ted fielding some questions from an interested user... He created a nice/fun graphic, [...]

The post A periodic table to help you with your SAS ODS graphics! appeared first on SAS Learning Post.

4月 042018
 

Being the Graph Guy, I wanted to know about all the "data visualization" presentations at the upcoming SAS Global Forum 2018 conference. I tried going through the official interface to search for such sessions, but it was difficult (impossible?) to know that I had found them all. Therefore I created [...]

The post 100+ presentations about data visualization at SAS Global Forum! appeared first on SAS Learning Post.

12月 222017
 

When I was growing up, our family had a bookcase containing a set of encyclopedias - it was where I went to obtain information and facts about various things, to impress my friends. Now that we have the Internet, Wikipedia has taken the place of encyclopedias for me - and [...]

The post What Wikipedia pages are the most popular? appeared first on SAS Learning Post.

12月 192017
 

Most of us put on a few pounds over the holidays. It's difficult not to, with the holiday dinners, and then all the special desserts, snacks, and candies. But there might also be another source of extra calories that you hadn't thought about - fast-food! Let's have a look at [...]

The post Counting fast-food calories over the holiday appeared first on SAS Learning Post.

8月 152017
 

If you know me, you probably know that I spend a lot of time on the water. I like speed paddling (dragon boat, outrigger canoe, surfski, and racing SUP), and I also have a big pontoon boat at Jordan Lake where I try to go fishing at least once a [...]

The post Tracking floods and droughts in Jordan Lake, NC appeared first on SAS Learning Post.