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