06-29-2017 06:33 AM - last edited on 06-29-2017 06:59 AM by RW9
I hope to get a data quality report which includes the following indicators:
Could anyone show me the respective code in SAS proc print, or proc freq, or other useful SAS procedure?
06-29-2017 06:58 AM - edited 06-29-2017 07:00 AM
Most of what you want can be gained from a proc means procedure:
06-29-2017 07:20 AM
Without some test data (in the form of a datastep) I can only give generals. Percents are just count() / N, so you can do these in a datastep. You may need to proc freq your data to get counts, merge that on.
06-29-2017 07:32 AM
Hi, my dataset is like this:
The following is the code I use:
proc means data=table n mean min max std q1 q3 qrange median nmiss ;
proc freq data=table;
But the results for numeric variables do not include the percentages. Could you help me, as I want to get all those results in one report.
06-29-2017 08:06 AM
Sorry, I don't have time to write a whole report for you. Use those procedures, then merge the required data together, and datastep to calculate any further numbers you need.
06-29-2017 10:18 AM
One thing to consider for percentages is what is the numerator and denominator to be used. I don't believe you have specified that in any way clear enough. Likely the way will be to create the appropriate Sums in Proc means/summary and then in a data step calculate the percentages.
Or perhaps Proc Report or Tabulate using the data for a report will allow the percentage calculations.