BookmarkSubscribeRSS Feed
palolix
Lapis Lazuli | Level 10

Dear SAS Community,

 

I was looking for a way of visualizing the association between different categorical variables (nominal and ordinal variables). Since a heatmap will probably not work for categorical variables I think that a correspondence analysis should be a good option. Is it ok to include nominal (more than two levels) and also ordinal variables together in a correspondence analysis?

 

I would greatly appreciate your feedback!

1 REPLY 1
Ksharp
Super User

Yes. You could could . since PROC CORRESP is just decomposing the chi-square value of contingency table, no matter this category variable is nominal or ordinal .

 

proc corresp data=sashelp.heart all chi2p;
tables bp_status,weight_status;
run;

Ksharp_0-1768029689455.png

 

 

And I also think you could use heatmap to visualize it. Here is an example:

https://blogs.sas.com/content/graphicallyspeaking/2017/06/26/advanced-ods-graphics-range-attribute-m...

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 89 views
  • 0 likes
  • 2 in conversation