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.