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

I am doing a Logistic regression on survival status (0=alive,1= dead)  with 'proc logistic' on two categorial variables : urgency (0 = No , 1 = yes ), conscious(0=awake , 1=unconscious, 2 =coma). The data is in table form; an observation for every row (total 200 rows)   eg: 

1 1 2 

0 1 1 

 

However, I am not getting it right because from the output it says 5 unique profiles which can't be right since there should be 2 x 3 =6  unique profiles : two choices for the variable 'urgency' and three choises for the variable 'conscious'.  When i do the logistic regression  on survival status on  only one of these  variables  then it gives 2 and 3 unique profiles, which i would expect.  

 

Can someone explain why I am not getting it right:

 

proc logistic data =mydata;
model  surv = urgency  conscious /scale=none aggregate;
run; 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I don't think there is anything wrong with your syntax, I think it is your data.  Although you have two levels of urgency and three levels of conscious, that doesn't imply that you have all six JOINT levels.  Run PROC FREQ on your data and I suspect you will discover that you only have five unique combinations of (urgency, conscious):

 

proc freq data=mydata;
   tables urgency*conscious;
run;

View solution in original post

1 REPLY 1
Rick_SAS
SAS Super FREQ

I don't think there is anything wrong with your syntax, I think it is your data.  Although you have two levels of urgency and three levels of conscious, that doesn't imply that you have all six JOINT levels.  Run PROC FREQ on your data and I suspect you will discover that you only have five unique combinations of (urgency, conscious):

 

proc freq data=mydata;
   tables urgency*conscious;
run;

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
  • 1 reply
  • 2146 views
  • 2 likes
  • 2 in conversation