BookmarkSubscribeRSS Feed
gtucke1
Fluorite | Level 6

Hi,

 

My IV's are:

Spousal Status (0=spousal, 1=non-spousal)

Race (0=African American/Black, 1=White)

Gender (1=female, 0=male)

 

The DV is total % unmet needs

 

Conducted proc means to get the mean and SD of the total % unmet needs for the following: 

Female
Male
African American/Black
White
Spousal
Non-Spousal
Spousal Male
Non-Spousal Male
Spousal Female
Non-Spousal Female
Spousal African American/Black
Non-Spousal African American/Black
Spousal White
Non-Spousal White
Spousal male White
Non-spousal male White
Spousal male AA/B
Non-Spousal male AA/B
Spousal female White
Non-spousal female White
Spousal female AA/B
Non-spousal female AA/B

 

This is an example of one of the proc means:

Title "Non-Spousal Female Black";
proc means data = final.data N MEAN STDDEV;
var per_jhdcna_unmet_cg;
where spousalstatus = 1 and cg_sex = 1 and race_dich_cp = 0;
Run;

 

Now I want to find the p-value for the following groupings:

Gender (male/female)

Race (AA/B, W)

Spousal Status (spousal/non-spousal)

Spousal Status by Gender

Spousal Status by Race

Spousal Status by Gender by Race

 

Is there a test I can do to capture the M, SD, and a p-value? 

 

I'm a beginner, so I don't mind doing more steps if it is less complicated. 

 

4 REPLIES 4
PaigeMiller
Diamond | Level 26

p-value for test of what hypothesis? What are you comparing ... means or standard deviations or something else?

--
Paige Miller
gtucke1
Fluorite | Level 6

I'm comparing the means to determine whether male/female, non-spousal/spousal, etc. has the higher mean % of unmet needs. 

PaigeMiller
Diamond | Level 26

@gtucke1 wrote:

I'm comparing the means to determine whether male/female, non-spousal/spousal, etc. has the higher mean % of unmet needs. 


Normally, hypothesis tests compare if the mean of male and the mean of the female are equal, and standard hypothesis tests do not test which has the higher mean. A minor detail perhaps, but on the other hand maybe the standard hypothesis tests are not what you want.

 

In addition, you don't say what your sample size is, how many males and how many females. If the number is small (say <15 each), you might want to use PROC NPAR1WAY instead of PROC TTEST. If the distribution is terribly non-normal (percents being constrained between 0 and 100 inclusive), you might need even more samples in each category.

--
Paige Miller
Tom
Super User Tom
Super User

First step is to give your variables actual variable names.  So "total % unmet needs" might be UNMET (or whatever name is clear enough to understand and short enough to actually type into code).  "Spousal Status" could perhaps just be Spousal_Status.

 

To compare the means of two groups use PROC TTEST.

 

proc ttest data=have;
  class Spousal_Status;
  var UNMET ;
run;

 

 

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 512 views
  • 1 like
  • 3 in conversation