BookmarkSubscribeRSS Feed
hpatel3
Obsidian | Level 7

Hello,

I have been asked to calculate odds ratios and confidence intervals using Proc Univariate (and then calculate the odds ratio,  Pvals, and confidence limits using a multivariate analysis for the variables with significant P-values )

 

Honestly, this whole process of why doesn't make a whole lot of sense to me. Does anyone have any useful resources that would help me understand   why I need to calculate univariate before multivariate?

 

For reference, I have my disease status (1= alive, 0=dead) and then 7 risk factors (2 are continuous and 5 are categorical binary)

 

my code looks like:

 

libname Hetal "\\tuftsmc\home\hpatel3\SAS Datasets";

run;

 

 

proc logistic data=hetal.es_regre desc plots(only)=(effect oddsratio(type=horizontalstat)) desc;

model adv_hf (event="1")= age_diag ;

run;

 

 

I've got the multivariate analysis figured out, but am I correct in assuming I would have to do proc logistic 7 times for each risk factor being set to the disease status to get odds ratios for each variable? I've been trying to find any resources on how to do this in SAS, but have had no luck. Any resources or help understanding would be great!

 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

You fit one model with all 7 of the risk factors. (Of course, there are problems doing this, but that answers your specific question)

--
Paige Miller
Reeza
Super User

Honestly, this whole process of why doesn't make a whole lot of sense to me. Does anyone have any useful resources that would help me understand   why I need to calculate univariate before multivariate?

 

This is really, really dangerous. You're going to get numbers and have no idea if they're correct or not. I did link you to a fully worked logistic regression example. Did you run through that and understand it?

 

Let's back up a dozen steps, what is the context of your research? Are you planning to publish this, is it for a journal, or are you doing internal planning and analysis. THIS does matter significantly, because different contexts allows for different methods because the accuracy requirements are significantly different. If for a publication you'll have a peer-reviewed stage and there is much more context. You may want to consult a statistician here. If that's your role, then you need to start deep diving in the analytics process such as EDA, CRISP-DM or whatever model you want to follow. 

 

Why do univariate analysis and exploratory data analysis before multivariate? So you understand the data. That's the primary purpose. 

 

Anscombe quartet is a good example of this. The data has all the same metrics but very different relationships. 

 

https://en.wikipedia.org/wiki/Anscombe%27s_quartet

 

 

 

 

 

 

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 2 replies
  • 4598 views
  • 2 likes
  • 3 in conversation