Hi, I have a question what is the correct way to calculate the predicted probabilities according to predictor levels in logistic regression using SAS. The logistic regression model is as below: outcome: success (binary, yes or no) predictor: education level (binary, under or graduate) control variables: age (age group) and gender my SAS code: (1) using logistic model to export the predicted probabilities of all observations on events="Yes" proc logistic data=data; class age gender; model success(event="Yes")=age gender edu; output out=pred p=p; run; (2) calculate the lsmeans of predicted probabilities for predictor using exported data proc genmod data=pred; class age gender; model p=age gender edu; lsmeans edu; run; In my opinion, in this way I can get the average predicted probabilities of each predictor level (under or graduate) after holding age and gender as constant. But, I heard it is better to calculate predicted probabilities in STATA using the “marginal standardization” method The STATA command is like: margins edu, post I compared the results in both ways, they are different, so I am wondering which way is better? Thanks
... View more