Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Testing the equality of 2 proportions / Chi-square / Z-test

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 04-02-2017 01:15 PM
(2365 views)

I want to test the equality of 2 proportions, but I want to do it for each level of a nominal, polychotomous variable. For example, gender (dichotomous) and race (polychotomous). I want to compare the proportion of males that are caucasian, for example, to the proportion of females that are caucasian, and so on. I want the same comparison for each level of the polychotomous variable race. If there are 5 levels of race, I want 5 comparisons w/ p-values, difference in proportion and CI of the difference.

I understand that if the 2 variables are dichotomous I can use PROC FREQ w/ the CHISQ and RISKDIFF options for the statistical significance, the difference between proportions and the CI for that difference, but is there a way to perform this analysis without having to dichotomize a polychotomous variable?

Thanks!!

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Your BY variables shouldn't be in the TABLES statement

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Include the polychotomous variable as a BY variable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

When I do that I get the following NOTES in the log:

NOTE: No statistics are computed for race_ethn * gender because all data are missing.

NOTE: The above message was for the following BY group:

race_ethn=.

NOTE: No statistics are computed for race_ethn * gender because race_ethn has less than 2 nonmissing levels.

NOTE: The above message was for the following BY group:

race_ethn=Caucasian

NOTE: No statistics are computed for race_ethn * gender because race_ethn has less than 2 nonmissing levels.

NOTE: The above message was for the following BY group:

race_ethn=Black/African American/Hispanic

NOTE: No statistics are computed for race_ethn * gender because race_ethn has less than 2 nonmissing levels.

NOTE: The above message was for the following BY group:

race_ethn=Native American/Asian/Pacific Islander

NOTE: No statistics are computed for race_ethn * gender because race_ethn has less than 2 nonmissing levels.

NOTE: The above message was for the following BY group:

race_ethn=Other

NOTE: There were 2774 observations read from the data set SURVEY.CSCSP_2016_POST_SORT.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Your BY variables shouldn't be in the TABLES statement

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Possion regression might do this. proc genmod + offset= option

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.