BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi! I think this macro is extremely useful! It produces summary statistics (mean/median/min/max/counts) and p-values between two groups of a class variable.

My question for anyone who has used it is the following:

What if there is a subgroup analysis someone wants to do? I see this is awesome for getting descriptive statistics including p-values for a class variable with varying levels. How about if I want one main class variable (like Case and Control) and subgroups (like Old/Young)? Does this macro support this type of analysis?

Thank you so very much!
Monica

The macro can be found:
http://mayoresearch.mayo.edu/mayo/research/biostat/upload/summary.sas
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
Not directly. The documentation specifies that you can only have a single class variable.

You can do it by creating a new class variable that concatenates the group and subgroup.

You may also be able to do it with two calls to the macro, using something like
DATA=mydata(WHERE=(main='Case'),

sas-innovate-2024.png

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.

 

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
  • 1 reply
  • 1329 views
  • 0 likes
  • 2 in conversation