Programming the statistical procedures from SAS

PROC CORR for nominal values

Accepted Solution Solved
Reply
Contributor
Posts: 65
Accepted Solution

PROC CORR for nominal values

Hi everyone;

I want to perform correlation analysis with 4 variables that are measured in nominal scale. I would like to know which method (Pearson, Spearman, Kendall, ...) is best for that purpose? Any comments would be appreciative!

Thanks;

Issac


Accepted Solutions
Solution
‎08-06-2012 01:32 PM
SAS Super FREQ
Posts: 3,538

Re: PROC CORR for nominal values

Yes, based on what you've said. You can use PROC FREQ to test for association between groups or uniformity across groups.  for example, to see if POW_LOCATION is uniformly distributed in your data, you can say

   tables POW_LOCATION / chisq;

To see if there is an association between gender and veteran status, use

   tables SEX*Veteran / chisq;

The FREQ documentation has several examples that you can look at.

View solution in original post


All Replies
PROC Star
Posts: 7,416

Re: PROC CORR for nominal values

Since none of our statisticians have responded as yet, I'll provide a non-statistician's comments which, hopefully, will get them to correct me.

If you only have nominal variables, unless they are all 0,1 dichotomies, I would think that you want to look at proc freq (i.e., chi-square) rather than proc corr.

Art

SAS Super FREQ
Posts: 3,538

Re: PROC CORR for nominal values

Thanks, Art. For truly nominal values (Red, Green, Blue,...), PROC FREQ and chi-square is a good answer.

If the variables are ordinal, there are more options. In PROC FREQ you can use tetrachoric or polychoric correlations (use PLCORR options on TABLES stmt) to study the correlation between discrete categories that can be ordered.

Rick

Contributor
Posts: 65

Re: PROC CORR for nominal values

Thanks Arthur and Rick;

These are purely nominal, I think. For example, whether the patient is Veteran or not, where is the POW location, Patient Eligibility, Means Test, etc. So I should for PROC FREQ rather than CORR, correct?

Solution
‎08-06-2012 01:32 PM
SAS Super FREQ
Posts: 3,538

Re: PROC CORR for nominal values

Yes, based on what you've said. You can use PROC FREQ to test for association between groups or uniformity across groups.  for example, to see if POW_LOCATION is uniformly distributed in your data, you can say

   tables POW_LOCATION / chisq;

To see if there is an association between gender and veteran status, use

   tables SEX*Veteran / chisq;

The FREQ documentation has several examples that you can look at.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 860 views
  • 3 likes
  • 3 in conversation