paste3.glmpca.est_nb_theta

paste3.glmpca.est_nb_theta(y, mu, th)[source]

given count data y and predicted means mu>0, and a neg binom theta "th" use Newton's Method to update theta based on the negative binomial likelihood note this uses observed rather than expected information regularization: let u=log(theta). We use the prior u~N(0,1) as penalty equivalently we assume theta~lognormal(0,1) so the mode is at 1 (geometric distr) dtheta/du=e^u=theta d2theta/du2=theta dL/dtheta * dtheta/du