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;
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;
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.