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)
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.
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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.