Computing simple Descriptive/Summary stats?

Reply
Frequent Contributor
Posts: 75

Computing simple Descriptive/Summary stats?


Hi,

I have 36 different datasets and I am in need to

1.  compute the entire descriptives such as mean, min,max, standard deviation etc like proc means for all numeric variables in each dataset and do a  Boxplot?

2. Count/ establish frequency for all character variables  in each dataset?

3. Route the output to a ODS pdf file format report.

what is the best solution/proc.I seek an expert help in establishing an optimised way to compute without having to write a 36 proc steps, which is rather tedius considering what if i have 100 tables in future. How to loop and macrotise it? An example with a code would be of great help.

Regards,

Mark

Super User
Posts: 19,822

Re: Computing simple Descriptive/Summary stats?

Do you have the code for one iteration? Do you have a naming convention for your datasets, how do you identify which need to be summarized?

You can search at lexjansen.com for macros that summarize data.

SAS Super FREQ
Posts: 8,868

Re: Computing simple Descriptive/Summary stats?

Hi:

  Reeza is correct. Before you "macrotise" a program, you have to have at least 1 working program as a model of the code you want to generate. So the place to start, when you want to "macrotise" a process so it is repeatable is with a working SAS program.

  These papers might help you get started using SAS macro variables and writing simple SAS Macro programs:

https://support.sas.com/resources/papers/proceedings13/120-2013.pdf

and

http://www2.sas.com/proceedings/sugi28/056-28.pdf

cynthia

Super User
Posts: 10,035

Re: Computing simple Descriptive/Summary stats?

make a macro contains proc means to get what you need ,then use call execute to go through all of these 36 tables.

Ask a Question
Discussion stats
  • 3 replies
  • 190 views
  • 0 likes
  • 4 in conversation