statsmodels.discrete.conditional_models.ConditionalMNLogit#
- class statsmodels.discrete.conditional_models.ConditionalMNLogit(endog, exog, missing='none', **kwargs)[source]#
Fit a conditional multinomial logit model to grouped data.
- Parameters:
- endogarray_like
The dependent variable, must be integer-valued, coded 0, 1, …, c-1, where c is the number of response categories.
- exogarray_like
The independent variables.
- 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 multinomial logit 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 multinomial logit model.
predict(params[, exog])After a model has been fit, predict returns the fitted values
score(params)Score vector of the conditional multinomial logit model.
Notes
Equivalent to femlogit in Stata.
References
Gary Chamberlain (1980). Analysis of covariance with qualitative data. The Review of Economic Studies. Vol. 47, No. 1, pp. 225-238.
Methods
fit([start_params, method, maxiter, ...])Fit the conditional multinomial logit 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 multinomial logit model.
predict(params[, exog])After a model has been fit, predict returns the fitted values
score(params)Score vector of the conditional multinomial logit model.
Properties
Names of endogenous variables
Names of exogenous variables