1

I have a Poisson model (displayed below), where my $\epsilon_e$ term is designed to handle over-dispersion. I was curious if statsmodels has an easy way of returning a coefficient $\epsilon$ that fits my expression as listed.

$$y_e \sim Poisson(\frac{60}{12}n_ee^{\mu+\alpha_e + \epsilon_e})$$ $$\sum_{n=1}^N\alpha_{e_n}=0$$ $$\epsilon_e \sim N(0, \sigma_\epsilon^2)$$

I have provided the sample code below that I have currently implemented:

mdl = smf.glm(formula = 'Y_e ~ CATEGORY_1 + CATEGORY_2 + CATEGORY_3', 
              data = df,
              offset = np.log(5) + np.log(df['N_e']),
              family = sm.families.Poisson(link = sm.families.links.log()))

poisson_results = mdl.fit_constrained('CATEGORY_1 + CATEGORY_2 + CATEGORY_3 = 0')

Will_E
  • 11
  • there is currently no model that uses mixing of Poisson with normal heterogeneity, unless it's clustered data. Beside NegativeBinomial, https://www.statsmodels.org/dev/generated/statsmodels.discrete.discrete_model.GeneralizedPoisson.html also allows for overdispersion. – Josef May 23 '21 at 02:25
  • I want to preserve the Poisson distribution for the $y_e$ term but add another coefficient in my summary table, so instead of reporting back three coefs for CATEGORY_1, CATEGORY_2, and CATEGORY_3 - I would have four, adding an alpha coef that highlights the overdispersion – Will_E May 23 '21 at 02:28
  • discrete models NegativeBinomial and GeneralizedPoisson do not have fit_constrained yet, so the model would need to be reparameterized, for example by dropping the constant. – Josef May 23 '21 at 02:29
  • The Poisson model can still consistently estimate the mean parameters even with excess dispersion. However, the standard errors for the parameters need to be adjusted. One standard way is to use pearson chisquare as estimate for the dispersion (scale). That's separately estimated and not part of the summary parameter table. – Josef May 23 '21 at 02:33
  • The marginal distribution of y will not be Poisson anymore if there is unobserved heterogeneity. NegativeBinomial is the marginal distribution if the mixing distribution for unobserved heterogeneity is Gamma. – Josef May 23 '21 at 02:37