BookmarkSubscribeRSS Feed
Pallavi_B
Calcite | Level 5

Hello, I am new to SAS. I have outcome variable "titer" grouping variable "treatment"  how I can use macros to perform independent sample's t test (Mann-Whitney U test)?? I have no idea of macros. so if possible please give explaination

4 REPLIES 4
PaigeMiller
Diamond | Level 26

I don't think macros are needed here. SAS Documentation has examples of performing this test, for example: https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_power_examples16.htm&docsetVersio...

--
Paige Miller
Pallavi_B
Calcite | Level 5
Even though we have some more methods, I need macros. Because I need to
check for normality and have to do corresponding parametric or non
parametric tests.
Cynthia_sas
SAS Super FREQ

Hi:
Before you can write a SAS macro program, you need to have working code. The SAS Macro facility is ONLY a text generator. All the Macro facility does is write code for you. So the Macro facility in and of itself will NOT "check for normality ...and do corresponding parametric or non-parametric tests" -- SAS procedures do that work. If you wanted to repeat the same SAS procedure 100 times, changing the variable every time, THEN you would take your working SAS program that generates the results for 1 variable and you would "macro-ize" the program to work for any variable name you pass in. The Macro facility would generate the code for you, switching the variable name and the regular SAS processor would compile and execute the code.

Do you have a working SAS program? It is extremely hard to do anything with the Macro facility if you don't have a working program to start with.

But, here's a paper that shows the overall concepts of the Macro facility:

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

Hope this helps,
Cynthia

Pallavi_B
Calcite | Level 5
thank you

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 936 views
  • 1 like
  • 3 in conversation