Desktop productivity for business analysts and programmers

How do I Hide Proc Means Column headings

Reply
Occasional Contributor
Posts: 8

How do I Hide Proc Means Column headings

I am relatively new at SAS and need some help please.  I am using Proc Means in SAS Enterprise Guide (Ver 7.15) and want to substitute specific descriptions of the statistics in column headings and hide the brief headings such as "N" and "Mean."  Is there such an option?  Thanks in advance.  (See the attached example)

Super User
Posts: 6,921

Re: How do I Hide Proc Means Column headings

Posted in reply to jtorourke

There's no simple way.  I suspect that "new at SAS" means this will be of medium difficulty.  Here's the general idea.

 

First, switch from PROC MEANS to PROC SUMMARY so there will be no printed output.

 

Second, add NWAY to the end of the PROC statement,.

 

Finally, add an OUTPUT statement. You should look up some of the details here, but the basic idea is that you can specify the statistics that you want, and what variable names should be used to represent them in the output data set.  For example:

 

output out=my_stats mean=Average_Value  N=Count;

 

This creates a data set named MY_STATS holding variables Average_Value and Count.  Average_Value is the mean of your analysis variable, and Count is the N statistic.  

 

There are additional details to consider (including the AUTONAME option) if you have multiple analysis variables.

 

Finally use PROC PRINT to print the output data set MY_STATS.  That will give you a lot more control over the report that you get.

Occasional Contributor
Posts: 8

Re: How do I Hide Proc Means Column headings

Posted in reply to Astounding
Wow. Thanks much. I will give this a try.
PROC Star
Posts: 1,334

Re: How do I Hide Proc Means Column headings

Posted in reply to jtorourke

I concur with @Astounding's excellent advice. If you want to do this with the EG tasks instead of code, you can use the Describe | Summary Statistics task. In the Results tab, untick "Show statistics", and tick "Save statistics to dataset". Unfortunately, I can't think of any way to use an EG task to get a listing of the data with custom headings.

 

Tom

Occasional Contributor
Posts: 8

Re: How do I Hide Proc Means Column headings

Thanks, Tom.
Ask a Question
Discussion stats
  • 4 replies
  • 98 views
  • 0 likes
  • 3 in conversation