# Negative binomial log-likelihood in penalized regression

I am trying to understand how penalized logistic regression works and I got stuck with negative binomial log-likelihood. I understand the the first two formulas and the penalization part in the likelihood formula, but I cannot figure out how can be the first part of the formula derived.

Probability: $$Pr(G=2|X=x)=\frac{e^{β_0+β^Tx}}{1+e^{β_0+β^Tx}}$$

Log-odds transformaton: $$log\frac{Pr(G=2|X=x)}{Pr(G=1|X=x)}=β_0+β^Tx,$$

Negative binomial log-likelihood: $$min_{(β0,β)∈R^{p+1}}−[\frac{1}{N}∑_{i=1}^{N}y_i⋅(β_0+x^T_iβ)−log(1+e^{(β_0+x^T_iβ)})]+λ[(1−α)||β||_2^2/2+α||β||1]$$

• you can take a look at this introductory chapter for the derivation. stat.cmu.edu/~cshalizi/uADA/12/lectures/ch12.pdf Feb 25, 2017 at 20:14
• I removed the negative-binomial since that is for negative-binomial distribution, not for negative binomial log likelihood ... an unfortunate clash of terminology Nov 8, 2018 at 14:49