Hi,
I have data on the bacterial compositions of skin swabs of 900 patients. I want to know if there is a difference in bacterial composition between males and females. I have stumbled upon compositional analysis but I don't know if it is the right way to do it and I don't know how to do it. Can any of you help me?
I have data that look like this:
female data set
sex sample count percent
1 CNS 511 63%
1 Gram-negative rods 63 8%
1 Gram-positive rods 63 8%
1 Micrococcus 127 16%
1 Other Gram-postive cocci 37 5%
1 Staphylococci 8 1%
male data set
2 CNS 447 68%
2 Gram-negative rods 33 5%
2 Gram-positive rods 54 8%
2 Micrococcus 98 15%
2 Other Gram-positive cocci 18 3%
2 Staphylococci 5 1%
Hi,
just to maybe get things going: Can you specify what your desired outcome would be?
I have no idea of compositional analysis. My data-management-based approach would be to merge the datasets and just compare the male vs, female values with simple if statements or something.
Let me know if you need a code example for that should you need one.
Best,
Nico
Hi,
just to maybe get things going: Can you specify what your desired outcome would be?
I have no idea of compositional analysis. My data-management-based approach would be to merge the datasets and just compare the male vs, female values with simple if statements or something.
Let me know if you need a code example for that should you need one.
Best,
Nico
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.