Page 1 of 1

Marginal Effects with Negative Binomial Models

Posted: Tue Aug 03, 2021 6:31 am
by tymon
I have followed the below approach to calculating marginal effects, which seems to have worked well for both a binary logit model and a poisson (replacing @dnorm for with @dlogistic for the logit and @exp for the Poisson).

eq1.forecast(i) xbf
scalar meanxb = @mean(xbf)
scalar meffectw = @dnorm(-meanxb)
scalar meffectw = @dnorm(-@mean(xbf))
vector meffects = meffectw*eq1.@coefs

Can someone please enlighten me as to what @function to use for a Negative Binomial model is, assuming the approach extends to NB models? If it doesn’t, can you please recommend an approach to calculating marginal effects for NB models?

Secondly, how would I adapt this to calculate marginal effect for specific values of my variables?

Thanks!!