I am estimating the following logistic regression (binomial family) by maximum likelihood:
$$ \ln\left(\frac{Y}{1-Y}\right) = \beta_{0} + \beta_{1}D + \beta_{2}X + \epsilon$$
where D is a dummy. I am interested in the marginal effect at the mean of $D$, i.e. $\beta_{1}$ is of interest. What does the marginal effect at the mean look like in equation form? Would it be:
$$ \frac{1}{\bar{Y}} \left(\frac{e^{\beta_{0}+\beta_{1}+\beta_{2}\bar{X}}}{1+e^{\beta_{0}+\beta_{1}+\beta_{2}\bar{X}}} - \frac{e^{\beta_{0}+\beta_{2}\bar{X}}}{1+e^{\beta_{0}+\beta_{2}\bar{X}}}\right) $$
or
$$\left(\frac{e^{\beta_{0}+\beta_{1}+\beta_{2}\bar{X}}}{1+e^{\beta_{0}+\beta_{1}+\beta_{2}\bar{X}}} - \frac{e^{\beta_{0}+\beta_{2}\bar{X}}}{1+e^{\beta_{0}+\beta_{2}\bar{X}}}\right) $$
My intuition is that Y corresponds to the probability of the event occurring, and the e/(1+e) terms also correspond to the probability of the event occurring, but at specific values of Y. What would the rationale for dividing by $\bar{Y}$ be? Thank you.