statsmodels.miscmodels.count.PoissonZiGMLE#

class statsmodels.miscmodels.count.PoissonZiGMLE(endog, exog=None, offset=None, missing='none', **kwds)[source]#

Maximum Likelihood Estimation of Poisson Model

This is an example for generic MLE which has the same statistical model as discretemod.Poisson but adds offset and zero-inflation.

Except for defining the negative log-likelihood method, all methods and results are generic. Gradients and Hessian and all resulting statistics are based on numerical differentiation.

There are numerical problems if there is no zero-inflation.

Parameters:
endogarray_like

1-d endogenous response variable. The dependent variable.

exogarray_like, optional

A nobs x k array where nobs is the number of observations and k is the number of regressors. If None, a column of ones is used.

offsetarray_like, optional

Offset added to the linear predictor before computing the mean.

missingstr

Available options are ‘none’, ‘drop’, and ‘raise’. If ‘none’, no nan checking is done. If ‘drop’, any observations with nans are dropped. If ‘raise’, an error is raised. Default is ‘none’.

**kwds

Extra keyword arguments passed to the model.

Attributes:
endog_names

Names of endogenous variables

exog_names

Names of exogenous variables

Methods

expandparams(params)

Expand to full parameter array when some parameters are fixed

fit([start_params, method, maxiter, ...])

Fit the model via maximum likelihood

from_formula(formula, data[, subset, drop_cols])

Create a Model from a formula and dataframe

hessian(params)

Hessian of log-likelihood evaluated at params

hessian_factor(params[, scale, observed])

Weights for calculating Hessian

information(params)

Fisher information matrix of model

initialize()

Initialize (possibly re-initialize) a Model instance.

loglike(params)

Log-likelihood of model at params

loglikeobs(params)

Log-likelihood of the model for all observations at params

nloglike(params)

Negative log-likelihood of model at params

nloglikeobs(params)

Loglikelihood of Poisson model

predict(params[, exog])

After a model has been fit, predict returns the fitted values

reduceparams(params)

Reduce parameters

score(params)

Gradient of log-likelihood evaluated at params

score_obs(params, **kwds)

Jacobian/Gradient of log-likelihood evaluated at params for each observation

Methods

expandparams(params)

Expand to full parameter array when some parameters are fixed

fit([start_params, method, maxiter, ...])

Fit the model via maximum likelihood

from_formula(formula, data[, subset, drop_cols])

Create a Model from a formula and dataframe

hessian(params)

Hessian of log-likelihood evaluated at params

hessian_factor(params[, scale, observed])

Weights for calculating Hessian

information(params)

Fisher information matrix of model

initialize()

Initialize (possibly re-initialize) a Model instance.

loglike(params)

Log-likelihood of model at params

loglikeobs(params)

Log-likelihood of the model for all observations at params

nloglike(params)

Negative log-likelihood of model at params

nloglikeobs(params)

Loglikelihood of Poisson model

predict(params[, exog])

After a model has been fit, predict returns the fitted values

reduceparams(params)

Reduce parameters

score(params)

Gradient of log-likelihood evaluated at params

score_obs(params, **kwds)

Jacobian/Gradient of log-likelihood evaluated at params for each observation

Properties

endog_names

Names of endogenous variables

exog_names

Names of exogenous variables