Friday's Innovation Inspiration: Calculating frequencies in PROC MEANS

0

In pharmaceutical research, analysts often want to see the number of respondents who are at each site and the treatment they receive.  Apparently, there's more than one way to produce correct results when you are using the PROC MEANS procedure.

In Janet Willis' paper, Do You Have Too Much Class?, (awarded Best Poster at SESUG 2012), she explains, "Using recycled code, working under tight timelines and not knowing your data are a few things that can lead to errors in your results."

Her examples include:

  • PROC MEANS with CLASS and TYPES statements - "If you have more than one variable that you want this count for and your data contains missing values for any of these variables you need to proceed with caution.
  • PROC MEANS with CLASS and TYPES statements and MISSING OPTION - "Include the MISSING option when using CLASS and TYPES statements in PROC MEANS to avoid erroneous results due to missing values."
  • PROC MEANS with the CLASS and VAR statement - "Using the VAR statement instead of TYPES reduces the number of variables in your CLASS statement."

Download Willis' paper for the complete explanation and sample code. 

 

 

Share

About Author

Waynette Tubbs

Editor, Marketing Editorial

Waynette Tubbs is a seasoned technology journalist specializing in interviewing and writing about how leaders leverage advanced and emerging analytical technologies to transform their B2B and B2C organizations. In her current role, she works closely with global marketing organizations to generate content about artificial intelligence (AI), generative AI, intelligent automation, cybersecurity, data management, and marketing automation. Waynette has a master’s degree in journalism and mass communications from UNC Chapel Hill.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top