SAS author’s tip: What is Clinical Endpoint Committee data?

This week’s author tip is from Jack Shostak’s new book SAS Programming in the Pharmaceutical Industry, Second Edition.

Shostak has been using SAS for nearly 30 years. In that time, he’s co-authored two other books, Common Statistical Methods for Clinical Research with SAS Examples, Third Edition, and Implementing CDISC Using SAS: An End-to-End Guide.

(The following excerpt is from SAS Press author Jack Shostak’s book, “SAS Programming in the Pharmaceutical Industry, Second Edition”. Copyright © 2014, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (Please note that results may vary depending on your version of SAS software.)

Clinical Endpoint Committee (CEC) Data

It is often the case that the endpoint/event form captures data that are not entirely objective because they contain some level of clinical judgment. For instance, when precisely is a cold cured, was an event truly a myocardial infarction, or did any given event truly occur? The clinical site investigator may decide, using his or her clinical judgment, that a given event occurred, but often it is necessary to have an independent assessment of that event by another physician. This independent review helps to ensure that events are reported in a consistent way across multiple clinical sites for a clinical trial. Usually what happens is that a condition on the regular case report form “triggers” the release of a CEC form to be sent to the CEC. The CEC then takes the CEC form and verifies whether or not an actual event occurred based on the data available in the patient’s clinical records at the given site. A sample CEC form follows:

CEC Data

In this CEC form, “event” would be replaced by some clinical finding such as “myocardial infarction,” “stroke,” “seizure,” or the like. Once again, this form is extremely simplified, and there are usually a number of associated data variables captured that help to support the existence of the event.

The biggest problem for the statistical programmer when using CEC data is reconciling these data against the regular CRF endpoint/event data. This can be a difficult task, especially when you consider that a patient may have more than one event on a given day. Fortunately, because the endpoint/event data are so critical to a clinical trial, the quality of the reconciliation from the CEC form to the CRF form is not often relegated to some form of fuzzy data join. Usually there will be a definitive linkage via a key mapping data set that links the CEC event data to the CRF event data. However, if that key data set does not exist, then the statistical programmer must prepare for some difficult programming. It is also worth noting that the data from the adverse event forms, laboratory forms, and other forms, as well as a specific “event” form, may in fact trigger clinical events. This may add to the complexity of the reconciliation programming.

Post a Comment

Make yourself known at the 2015 regional conferences

ShelleySessoms

The U.S. Regional SAS Users Group Conferences are smaller, intimate conferences where you can show off your SAS expertise. The conference coordinators are always looking for strong presenters and keynote speakers. Many of our authors use these conferences to gather immediate feedback on their book topic. And let’s not forget about the promotional opportunities. You can be like Art Carpenter and proudly wear your “SAS Author. Ask Me About My Book” button.

If you’re ready to be noticed at a regional conference, our web site gives you an overview of how to become a SAS author. And we’re always here to answer your questions and help you get started.

We’re looking for SAS authors now. And if you submit a book proposal by early October, we will review that proposal, get feedback to you as quickly as possible, and, if your proposal is accepted, get your project started. Then your book can be either sold or promoted at the regional conferences in 2015.

Now’s the time to think about your 2015 conference presentations. Let’s get that book idea started and you’ll already have a talk or two prepared. And, we’ll even give you a fancy Author button to wear, too!

Contact us today to get started.

Post a Comment

SAS author's tip: Combining macro variables with text

This week’s author tip is from Michele Burlew and her new book SAS Macro Programming Made Easy, Third Edition. Burlew chose this tip because she says it’s important to understand how SAS determines where a macro variable reference starts and stops, and often a delimiter is needed to tell SAS when to stop.

We hope you find this tip helpful. You can also read an excerpt from Burlew’s book online.

When you combine macro variable references with text or with other macro variable references, you can create new macro variable references. These new macro variable references are resolved before the SAS language statements in which they are placed are tokenized.

A concatenation operator is not needed to combine macro variables with text. However, periods (.) act as delimiters of macro variable references and might be needed to delimit a macro variable reference that precedes text.

When placing text before a macro variable reference or when combining macro variable references, you do not have to separate the references and text with a delimiter.

%let mosold=4;
%let level=12;
data book&mosold&level;
  set books.ytdsales(where=(month(datesold)=&mosold));
  attrib over&level length=$3 label="Cost > $&level";
  if cost > &level then over&level='YES';
  else over&level='NO';
run;

When you follow a macro variable reference with text, you must place a period at the end of the macro variable reference to terminate the reference. The macro processor recognizes that a period signals the end of a macro variable name and determines that the name of the macro variable is the text between the ampersand and the period. While not required unless you follow a macro variable reference with text, all macro variable references can be terminated with periods.

%let prefix=QUESTION;
proc freq data=books.survey;
  tables &prefix1 &prefix2 &prefix3 &prefix4 &prefix5;
run;

After resolving the macro variable references, the program becomes:

proc freq data=books.survey;
  tables &prefix1 &prefix2 &prefix3 &prefix4 &prefix5;
run;

The program is revised below.  This newer version contains the necessary delimiters that tell the macro processor when the macro variable references end. Now the macro variable references resolve as desired, and the text that follows the references is concatenated to the results of the resolution.

%let prefix=QUESTION;
proc freq data=books.survey;
  tables &prefix.1 &prefix.2 &prefix.3 &prefix.4 &prefix.5;
run;

The macro processor substitutes QUESTION for the &PREFIX macro variable reference. After macro variable resolution, the program becomes:

proc freq data=books.survey;
   tables QUESTION1 QUESTION2 QUESTION3 QUESTION4 QUESTION5;
run;

The excerpt is from SAS Press author Michele Burlew’s book “SAS Macro Programming Made Easy, Third Edition” Copyright © 2014, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software).

Post a Comment

You, and your book, can stand out at JSM 2015

It’s easy to get lost in the crowd of thousands of Joint Statistical Meeting (JSM) attendees. How can you make yourself stand out in a sea of statisticians? You could prepare an outstanding, standing-room-only presentation, give a half-day workshop, or present a poster. But what if you did all those things, and showed off a SAS book that you authored? SAS Press can help make that happen.

Our web site gives you an overview of how to become a SAS author. And we’re always here to answer your questions and help you get started.

We’re looking for statistical authors now. And if you submit a book proposal by early September, we will review that proposal, get feedback to you as quickly as possible, and, if your proposal is accepted, get your project started. Then your book can be promoted at JSM 2015.

If you’re ready to be a stand-out at JSM, let’s get started. Statistical books from SAS are big hits with our readers. Make sure you’re listed as one of our statistical experts. And together, we’ll get you ready to be the hit of the conference!

Contact us today to get started.

**If you need a little more time, tune in next week to learn what you need to do to have your book ready by the U.S. Regional SAS Users Group Conferences in 2015.**

DSC_7082_small

Post a Comment

SAS author’s tip: Getting an accurate picture of claims data

This week’s author tip is from Matthew Gillingham and his new book SAS Programming with Medicare Administrative Data. Gillingham has been programming in SAS for 15 years and has spent 10 of those years specifically dealing with health care use, cost and quality measurement.

Here’s Gillingham’s tip for you:

To gain a complete picture of each Medicare beneficiary’s medical history, use claims data for beneficiaries continuously enrolled in Medicare for your study period.

Identifying beneficiaries who have been continuously enrolled in Medicare FFS (be it for a calendar year or a period prior to or following a specific medical event, like a hospitalization) is a common task in research programming with Medicare administrative data. Because Medicare administrative claims data include all FFS claims submitted on behalf of a beneficiary, and most likely will not include claims for managed care enrollees, focusing on beneficiaries who are enrolled in Medicare FFS helps to ensure that we have a complete picture of each beneficiary’s medical history for the period being studied.

SAS Programming with Medicare Administrative Data shows you how to determine the impact of a demonstration program on payment, utilization, and quality. In order to do so comprehensively, you must limit the population you’re studying to those beneficiaries who have been continuously enrolled in Medicare FFS for the period of time being studied (in the case of my book, for all twelve months of the calendar year) to help ensure that you have an accurate picture of their claims data during that time. To accomplish this task, use the following code.

/* STEP 6.1: BUILD CONTINUOUS ENROLLMENT INFORMATION IN 2010 MBSF FILE */
data enr.contenr_2010;
    set src.mbsf_ab_2010;
	length contenrl_ab_2010 contenrl_hmo_2010 $5.;
	/* FLAG BENEFICIARIES WITH PARTS A AND B OR HMO COVERAGE */
    if bene_hi_cvrage_tot_mons=12 and bene_smi_cvrage_tot_mons=12 then contenrl_ab_2010='ab'; else contenrl_ab_2010='noab'; 
    if bene_hmo_cvrage_tot_mons=12 then contenrl_hmo_2010='hmo'; else contenrl_hmo_2010='nohmo'; 
 
	/* FLAG BENEFICIARIES THAT DIED IN 2010 */
	if death_dt ne . then death_2010=1; else death_2010=0;
run;

In Step 6.2, we output the following frequency distribution of the enrollment flags we created in Step 6.1, the results of which are illustrated by Output 6.1:

/* STEP 6.2: FREQUENCY OF CONTINUOUS ENROLLMENT VARIABLES */
ods html file="C:\Users\mgillingham\Desktop\SAS Book\FINAL_DATA\ODS_OUTPUT\Gillingham_fig6_2_ENRL.html" 
image_dpi=300 style=GrayscalePrinter;
ods graphics on / imagefmt=png;
title "VARIABLES USED TO DETERMINE CONTINUOUS ENROLLMENT IN 2010 DATA";
proc freq data=enr.contenr_2010; 
    tables contenrl_ab_2010 contenrl_hmo_2010 death_2010 / missing; 
run;
ods html close;

Output 6.1: Continuous Enrollment Variables

Gillingham_1Finally, in Step 6.3 we create our file of continuously enrolled beneficiaries by delimiting the ENR.CONTENR_2010 file created in Step 6.1 by the enrollment flags we defined in that same step. A beneficiary is defined as continuously enrolled in Medicare Parts A and B in calendar year 2010 if the value of CONTENRL_AB_2010 is equal to ‘AB,’ the value of CONTENRL_HMO_2010 is equal to ‘NOHMO,’ and the value of DEATH_2010 is not equal to 1. We keep only these records.

/* STEP 6.3: CREATE A 2010 ENROLLMENT FILE OF ONLY CONTINUOUSLY ENROLLED BENEFICIARIES */
data enr.contenr_2010_fnl;
    set enr.contenr_2010;
	if contenrl_ab_2010='ab' and contenrl_hmo_2010='nohmo' and death_2010 ne 1;
run;

If this piqued your interest, get a copy of the book to learn more on defining continuous enrollment, or more on research programming using Medicare data.

The excerpt is from SAS Press author Matthew Gillingham’s book “SAS Programming with Medicare Administrative Data” Copyright © 2014, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software).

Post a Comment

You, too, can have a book at SAS Global Forum 2015

DSC_7083_smallYou’re walking around the bookstore at SAS Global Forum, looking at the new books and upcoming titles. There are lots of titles that look helpful, and a couple that are on your must-have list. You see SAS users and students eagerly talking with the authors, treating them like rock stars. And you think to yourself, ”wonder what it takes to be a SAS author?”

Well, wonder no more! Our web site gives you an overview of how to become a SAS author. And we’re always here to answer your questions and help you get started.

We’re signing up authors now. And if you submit a book proposal by early August (yes, that’s next month), we will review that proposal, get feedback to you as quickly as possible, and, if your proposal is accepted, get your project started. Then your book can be promoted at SAS Global Forum 2015.

If you’re ready to show the world that you’re a SAS expert, let’s get started. All it takes is an idea, a dedication to writing and a positive attitude. Together, we’ll get you ready to be the next rock star of SAS Global Forum!

Contact us today to get started.

**If next month feels a little soon to you, tune in next week to learn what you need to do to have your book ready by JSM 2015.**

Post a Comment

SAS author’s tip: Performing floating point number comparisons

The SAS author’s tip of the week blogs are back! Sorry for the short break - I’ve been working to transition into my new role as editor of the SAS Bookshelf.

We will continue to feature these helpful tips for our readers. Please let me know if there is any other content you would like to see us cover.

Now back to this week’s author tip from Jack Shostak’s new book SAS Programming in the Pharmaceutical Industry, Second Edition.

The following excerpt is from SAS Press author Jack Shostak’s book, “SAS Programming in the Pharmaceutical Industry, Second Edition”. Copyright © 2014, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (Please note that results may vary depending on your version of SAS software.)

Performing Floating-Point Comparisons

At times, you need to perform some form of floating-point number comparison. The following example illustrates such a comparison where you are setting laboratory value flags to indicate whether a lab test is above or below normal.

Program 4.15  Using the ROUND Function with Floating-Point Comparisons

**** FLAG LAB VALUE AS LOW OR HIGH;
data ADLB;
   set lb;
      if . < lbstresn < 3.15 then
         ANRIND = "L";
      else if lbstresn > 5.5 then
         ANRIND = "H";
run;

At first glance the SAS code snippet above looks fine. If the lab value is less than 3.15, then the lab value is low, and if it is greater than 5.5 then the lab value is high. The problem is that floating-point numbers are stored on computers as approximations of the value that you may see in a SAS printout. In other words, 3.15 might be stored as 3.1500000000000000000000000000000000012, which might make the program snippet above not work as hoped. To handle the floating-point comparison problem, this example can be written more safely like this:

**** FLAG LAB VALUE AS LOW OR HIGH;
data ADLB;
   set lb;
      if . < round(lbstresn,.000000001) < 3.15 then
        ANRIND = "L";
      else if round(lbstresn,.000000001) > 5.5 then
	 ANRIND = "H";
run;

Notice how the “lbstresn” variable has been rounded to an arbitrary precision to the ninth decimal place. This attempts to get around the floating-point comparison problem. At the same time, it avoids rounding the “lbstresn” variable to a precision where meaningful data are lost. Whenever you perform comparisons on numbers that are not integers, you should consider using the ROUND function.

You should read the excellent SAS Technical Support Note “TS-230: Dealing with Numeric Representation Error in SAS Applications” to learn more about SAS floating-point numbers and numeric storage precision in SAS. Another good resource for rounding issues is Ron Cody’s SAS Functions by Example, Second Edition (SAS Press, 2010). Remember that floating-point storage of non-integer numbers in SAS is done by machine-based approximation, and that can cause problems in comparisons, sorts, and any other operations on those numbers.

Was this helpful? If you're interested -- Get your copy today to receive all of Jack Shostak’s tips from SAS Programming in the Pharmaceutical Industry. (You’ll also find more free, bonus content!).  You'll find a free book excerpt, example code and data, and more.

Post a Comment

Bend it like our BI Dashboard experts

Go USA! Go Germany! Go Mexico! Go Colombia! Wish you were still in it, England! That’s right, it’s World Cup time, and due to the international flavor of my family, I’ve got a number of teams I’m rooting for.

I played a little soccer (or “futbol” in our house) back in the day. I can’t say I was an expert (mediocre would be generous, really), but as I watch the games, I’m amazed at how easy the professionals make it look. Pure talent aside, imagine having a window into their knowledge of the game and the techniques they use.

You may not be able to learn from the professionals on the soccer field, but you can learn from some of the best SAS experts out there—SAS consultants.

With the new (free!) e-book, SAS Consulting® Services on SAS® BI Dashboard: Interaction Examples for Dashboard Designers, dashboard designers who have a good understanding of SAS BI Dashboard can learn how to improve their dashboards with more complex, customized features. In it, Global SAS Consultant Teri Patsilaras presents three examples that show how to build complex dashboards:

Part 1: A brush interaction example

Part 2: A client-side filter interaction example

Part 3: A server-side filter interaction example

Each of these examples blends together multiple features that ultimately produce powerful dashboards for your users.

Score a goal with an assist from SAS consultants: Get your free copy today.

Post a Comment

So what’s the big data?

There’s a lot of excitement right now around the book, Big Data, Data Mining, and Machine Learning: Value Creation for Business Leaders and Practitioners by Jared Dean, SAS Senior Director of Research and Development.

At SAS, Dean is responsible for the development of the company’s worldwide data mining solutions. His book explains how organizations can harness the power of high-performance computing architectures as well as data mining, text analytics and machine learning algorithms.

I caught up with Dean at the Analytics 2014 conference in Frankfurt, Germany to ask him why he wrote this book.


You can also read an excerpt (PDF) from the book.

Post a Comment

Three reasons to learn SAS macro facility

People tend to think of the SAS macro facility as something to tackle when you’ve reached ‘advanced programmer’ status. But macro programming can be easy to learn, and it allows you to work faster and more effectively.

Here are three reasons why you should consider learning the macro facility, even if, or perhaps especially if, you’re a beginning SAS programmer:

  1. When you use the macro facility, you can accomplish repetitive tasks quickly and efficiently. A macro program can be reused many times. Parameters passed to a macro program customize the results without having to change the code within the macro program.
  2. Macro programming can provide a more modular structure to your SAS programs. SAS language that is repetitive can be generated by macro language statements in a macro program and that macro program can be referenced in your SAS program. The main program becomes easier to read – especially if you give the macro program a meaningful name for the task it performs.
  3. A more detailed reason is that it makes it much easier to pass information between steps. For example, a PROC SQL step can summarize data and save results in macro variables. These macro variables can then be used by subsequent DATA steps and PROC steps in the same SAS session to customize the processing.

And a bonus reason – most SAS programming job descriptions ask for applicants with macro programming experience. My latest book SAS Macro Programming Made Easy, Third Edition will start you down the path to obtaining that required experience.

Post a Comment