3.7.2. statsmodels.miscmodels.count

Created on Mon Jul 26 08:34:59 2010

Author: josef-pktd

changes: added offset and zero-inflated version of Poisson

  • kind of ok, need better test cases,
  • a nan in ZIP bse, need to check hessian calculations
  • found error in ZIP loglike
  • all tests pass with

3.7.2.1. Issues

  • If true model is not zero-inflated then numerical Hessian for ZIP has zeros for the inflation probability and is not invertible. -> hessian inverts and bse look ok if row and column are dropped, pinv also works

  • GenericMLE: still get somewhere (where?)

    “CacheWriteWarning: The attribute ‘bse’ cannot be overwritten”

  • bfgs is too fragile, doesn’t come back

  • nm is slow but seems to work

  • need good start_params and their use in genericmle needs to be checked for consistency, set as attribute or method (called as attribute)

  • numerical hessian needs better scaling

  • check taking parts out of the loop, e.g. factorial(endog) could be precalculated

3.7.2.2. Functions

maxabs(arr1, arr2)
maxabsrel(arr1, arr2)

3.7.2.3. Classes

GenericLikelihoodModel(endog[, exog, ...]) Allows the fitting of any likelihood function via maximum likelihood.
NonlinearDeltaCov(fun, params, cov_params) Asymptotic covariance by Deltamethod
PoissonGMLE(endog[, exog, loglike, score, ...]) Maximum Likelihood Estimation of Poisson Model
PoissonOffsetGMLE(endog[, exog, offset, missing]) Maximum Likelihood Estimation of Poisson Model
PoissonZiGMLE(endog[, exog, offset, missing]) Maximum Likelihood Estimation of Poisson Model