NegativeBinomialLS#
- class superglm.NegativeBinomialLS#
Bases:
MeanPredictor,ThetaPredictorNegative-binomial responses with mean and size predictors.
Declare
family.mean(...)andfamily.theta(...). Both use log links. The unit count law has variancemean + mean**2 / theta, so larger theta means less overdispersion.thetais the size parameter in the NB2 parametrization.Results use the column names
meanandthetain that order.family.theta()estimates a constant size; a declaration with terms lets size vary between rows. The observation law for counts or weighted rates follows the model’s weight contract.See also
SuperLSSConstruct and fit a model with these predictors.