BookmarkSubscribeRSS Feed
VincentTang
Calcite | Level 5

Dear all, 

 

Nice to meet you all.

 

Recently, I met a problem in the estimation of logistic regression.

 

After running the logistic regression, the estimated coefficients are obtained. However, they are the coefficients of the log odds ratio. May I know is there any codes for finding out the marginal effects.

 

I have also attached my code here for your reference.

 

proc logistic data=edu2016;
class Ethnicity Age Gender / param=ref ref=first;
model PrimaryCompleted/Total = Ethnicity Age Gender Ethnicity*Age Ethnicity*Gender Age*Gender/ lackfit;
run;

 

 

Thank you very much for your help.

3 REPLIES 3
PaigeMiller
Diamond | Level 26

@VincentTang wrote:

 

Recently, I met a problem in the estimation of logistic regression.

 

After running the logistic regression, the estimated coefficients are obtained. However, they are the coefficients of the log odds ratio. May I know is there any codes for finding out the marginal effects.

By marginal effects, do you mean the slope of the probability of Y as X changes (instead of the slope of log-odds ratio of Y as X changes)??

--
Paige Miller
VincentTang
Calcite | Level 5
Hello, Paige

Yes. the slope of the probability of Y as X changes.

Thank you for your help
PaigeMiller
Diamond | Level 26

The slope of the probability of Y is not a linear function of X.


The formula looks like this (from Wikipedia at https://en.wikipedia.org/wiki/Logistic_regression) for a regression with two x-variables and an intercept

 

 

where the lower case b is the base of the logarithm used, which is usually e.

--
Paige Miller

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 920 views
  • 0 likes
  • 2 in conversation