BookmarkSubscribeRSS Feed
htst1003
Calcite | Level 5

Hi!

I am lost in proc logistic procedure.

My data has outcome variable with 2 levels(yes, no), and

two independent variables. Sex- male, female. Type- A, B, C.

 

If I want to make an inference about the sex on outcome variable for given Type variable using proc logistic, how can I see that? Like, when given Type, A B and C I want to see how each sex effects on outcome variable.

 

Thus how can I get the probability for each possible situations? like, if I want to know probability of outcome being yes if sex is male and type is C?

 

I am not using any interaction term here, so this is my model statement 

model outcome = type sex;

 

4 REPLIES 4
Ksharp
Super User

You want this ?

 

data have;
 set sashelp.heart;
 keep status bp_status sex;
run;

proc sql;
create table predict as
select *
 from (select distinct bp_status from have),(select distinct sex from have);
quit;

proc logistic data=have;
class bp_status sex;
model status=bp_status sex;
score data=predict out=want ;
run;
htst1003
Calcite | Level 5
It does not give result.. I have no idea how to know result when one variable is given
PaigeMiller
Diamond | Level 26

Hello @htst1003 


May I give you some gentle advice? When you say "It does not give result" and provide no other details, we can't help you. We don't know what you did, and we don't know what happened. You need to provide details about what you did (the LOG from SAS showing the code in the LOG, plus all NOTEs, WARNINGs and ERRORs in the LOG) and if the output isn't correct, show us the output as well, state why it isn't correct, and what you think is the right answer.

 

This applies to all interactions in software forums, not just this particular interaction.

--
Paige Miller
Ksharp
Super User
Open WANT dataset. Is that you are looking for ?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 356 views
  • 0 likes
  • 3 in conversation