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 the Editor of the Risk Management Knowledge Exchange at SAS, Managing Editor of sascom Magazine and Editor of the SAS Tech Report. Tubbs has developed a comprehensive portfolio of strategic business and marketing communications during her career spanning 15 years of magazine, marketing and agency work.

Leave A Reply

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

Back to Top