How to solve a negative binomial regression?

But I don't know how to solve it .

I know let the derivative of the function L with respect to $$\alpha$$ and $$\beta$$ equal to zero , then calculate the $$\alpha$$ and $$\beta$$ . But the equation is too complicated .

I wrote the derivative to $$\alpha$$ and let it equal to 0: $$\begin{array}{l} \frac{\partial \ln L}{\partial \alpha}=\sum_{i=1}^{n}(\frac{y_{i}}{\alpha}+\frac{1}{\alpha^{2}} \ln (1+\alpha e^{x_{i} \cdot \beta})+(y_{i} + \frac{1}{\alpha})\frac{e^{x_{i} \cdot \beta}}{1+ \alpha e^{x_{i} \cdot \beta}} \\ -\frac{\Gamma^{\prime}(y_{i}+\frac{1}{\alpha})}{\alpha^{2} \Gamma(y_{i}+\frac{1}{\alpha})}+\frac{\Gamma^{\prime}(\frac{1}{\alpha})}{\alpha^{2} \Gamma(\frac{1}{\alpha})} ) = 0 \end{array}$$

But have no idea how to calculate the $$\alpha$$ along with $$\beta$$ , and even without of $$\beta$$ the left equation is complicated , do you have some tricks or technical to solve such equation ?

• Are you looking for a closed-form solution, like with OLS? Aug 28, 2020 at 7:48
• @Dimitriy V. Masterov I am curious on the closed-form, and grandient descent doesn't looks like to apply well on this equation. Actually, any solution is welcome , I haven't seen a workable one . Aug 28, 2020 at 9:01
• There is no closed-form solution, but here is a good paper by Greene. I believe your model is a special case, with P=2. Aug 28, 2020 at 18:00