Robi Ragan wrote:> I am trying to compute the marginal effects from a logit.
>
> dPr(y=1)/dx_k
>
> and
>
> delta Pr(y=1|xbar)/ delta x_k
>
> I have searched the archives and seen the question asked, but never an
> answer given. Is this possible in either lrm or glm?
>
> Thanks,
>
Taking the derivative does yield a kind of marginal effect but not one
that most people use. Marginal effects on a relative basis are
traditionally computed via odds ratios (do ?summary.Design). You could
also compute effects as probability differences but confidence intervals
would not be automatic. I prefer to give confidence intervals for odds
ratios and a graph translating odds ratios to risk differences as a
(strong) function of baseline risk (such a graph is in my book
Regression Modeling Strategies). -Frank
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University