BookmarkSubscribeRSS Feed
RCPenguin
Calcite | Level 5

Hello,

I have a dataset that has two variable genders (coined as gender=0 and gender=1)

I am assuming it is possible to do proc means on just gender=0 or gender=1 but I am not sure how to specify that in SAS.

Any help would be greatly appreciated.

Thanks

P

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16

you could try to use a where condition in the proc means something like where gender=0. so proc means works on only those records

Thanks,
Jag
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

Do you really only want to do it only on Male or Female or is this just a way to get results into another format and you will end up doing two proc means?  If so perhaps use the by sex; line in your proc means.  Maybe elaborate on what you are trying to achieve.

RCPenguin
Calcite | Level 5

Sure, no problem.

I eventually am going to be looking for mean values in terms of the scores that both genders achieved.

I want to compare the mean values of the different scores and see who scored better or if the numbers are similar

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 1484 views
  • 0 likes
  • 3 in conversation