BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
issac
Fluorite | Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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

4 REPLIES 4
art297
Opal | Level 21

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

Rick_SAS
SAS Super FREQ

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

issac
Fluorite | Level 6

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?

Rick_SAS
SAS Super FREQ

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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