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
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...
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
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.