BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ansepans
Calcite | Level 5

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%

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
nicobuettner
SAS Employee

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

View solution in original post

1 REPLY 1
nicobuettner
SAS Employee

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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 404 views
  • 0 likes
  • 2 in conversation