Help using Base SAS procedures

How to proc certain data from dataset

Reply
Occasional Contributor
Posts: 12

How to proc certain data from dataset

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

Trusted Advisor
Posts: 1,128

Re: How to proc certain data from dataset

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
Super User
Super User
Posts: 7,401

Re: How to proc certain data from dataset

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.

Occasional Contributor
Posts: 12

Re: How to proc certain data from dataset

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

Ask a Question
Discussion stats
  • 3 replies
  • 266 views
  • 0 likes
  • 3 in conversation