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

Does anyone know any easy way to create an odds ratio table, analogous to a correlation table for multiple (binary) variables so that Xij would be the odds ratio for variables i and j? 

William Roy

Professor of Sociology

UCLA

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

What does your data look like ? Post some sample data . Let me see how it work.

View solution in original post

6 REPLIES 6
Ksharp
Super User

Check  proc freq,

OR you want SAS/IML  code ?

Post it at IML forum, Rick might give you something you need.

billroy3
Calcite | Level 5

Thank you Xia.  Proc freq creates one dataset per pair of variables.  They can concatenated, but I would hoping for a matrix like a correlation matrix.  I can do it in IML, but was hoping someone would have designed a macro to make it simple.

Bill Roy

Ksharp
Super User

Why would you need a data step macro ? I think IML is more simple and succinct than it . Don't you think so ?

billroy3
Calcite | Level 5

Yes, I do.  Not finding an existing macro, I've designed one myself and am working to refine it.

Ksharp
Super User

What does your data look like ? Post some sample data . Let me see how it work.

billroy3
Calcite | Level 5

Xia,

I have written my own macro and no longer need help.  Thank you for your offer.

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1255 views
  • 0 likes
  • 2 in conversation