statsmodels.discrete.conditional_models.ConditionalPoisson#
- class statsmodels.discrete.conditional_models.ConditionalPoisson(endog, exog, missing='none', **kwargs)[source]#
Fit a conditional Poisson regression model to grouped data.
Every group is implicitly given an intercept, but the model is fit using a conditional likelihood in which the intercepts are not present. Thus, intercept estimates are not given, but the other parameter estimates can be interpreted as being adjusted for any group-level confounders.
- Parameters:
- endogarray_like
The response variable
- exogarray_like
The covariates
- groupsarray_like
Codes defining the groups. This is a required keyword parameter.
- missing{‘none’, ‘drop’, ‘raise’},
optional If ‘none’, no nan checking is done. If ‘drop’, any observations with nans are dropped. If ‘raise’, an error is raised.
- Attributes:
endog_namesNames of endogenous variables
exog_namesNames of exogenous variables
Methods
fit([start_params, method, maxiter, ...])Fit the conditional model.
fit_regularized([method, alpha, ...])Return a regularized fit to a linear regression model.
from_formula(formula, data[, subset, drop_cols])Create a Model from a formula and dataframe
hessian(params)Returns numerical approximation to the Hessian.
information(params)Fisher information matrix of model
Initialize (possibly re-initialize) a Model instance
loglike(params)Log-likelihood of the conditional Poisson model.
predict(params[, exog])After a model has been fit, predict returns the fitted values
score(params)Score vector of the conditional Poisson model.
Methods
fit([start_params, method, maxiter, ...])Fit the conditional model.
fit_regularized([method, alpha, ...])Return a regularized fit to a linear regression model.
from_formula(formula, data[, subset, drop_cols])Create a Model from a formula and dataframe
hessian(params)Returns numerical approximation to the Hessian.
information(params)Fisher information matrix of model
Initialize (possibly re-initialize) a Model instance
loglike(params)Log-likelihood of the conditional Poisson model.
predict(params[, exog])After a model has been fit, predict returns the fitted values
score(params)Score vector of the conditional Poisson model.
Properties
Names of endogenous variables
Names of exogenous variables