BookmarkSubscribeRSS Feed
rykwong
Quartz | Level 8

Dear SAS communities,

I need to generate a table of summary statistics like this attached example.  Would like to use proc freq for categorical and proc ttest for continuous variables.  The flexibility of switching to other procedures such as proc glm or proc npar1way is even better.

 

Does any one know of a easy to use MACRO for this purpose (just plug in location of dataset, desired list of variables to compare, class)?

 

thanks a million!

 

5 REPLIES 5
ChrisNZ
Tourmaline | Level 20

 

Microsoft-formatted files have a built-in ability to carry unwanted and nefarious payloads.

 

It is very likely that no one will take the risk to look at your excel file.

rykwong
Quartz | Level 8
sorry about that, I have included a screenshot instead of the microsoft excel
Reeza
Super User

I have a few, if you email me I can send you one. Not sure it's exactly what you want but should get you started. 

 

You can also look for papers on lexjansen.com. These are commonly called Table 1 or Table of characteristics. 

rykwong
Quartz | Level 8

thanks so much Reeza.  but how do I email you, sorry I am new to the SAS communities.


Screen Shot 2016-11-14 at 9.52.48 PM.png
ballardw
Super User

Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.

 

https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

has instructions on turning SAS data sets into data step code we can run to duplicate your data set.

 

Since your image post shows a p-value then you are apparently doing some test. What test would that be? Do you already have all those values and are just trying to show the table or do you need to generate the statistics and then show a table? If the later then you need to provide a much more detailed description of your existing data and what you are attempting to portray.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1411 views
  • 0 likes
  • 4 in conversation