Logo

scikits.statsmodels.discrete.discrete_model.MNLogit

class scikits.statsmodels.discrete.discrete_model.MNLogit(endog, exog=None)[source]

Multinomial logit model

Parameters :

endog : array-like

endog is an 1-d vector of the endogenous response. endog can contain strings, ints, or floats. Note that if it contains strings, every distinct string will be a category. No stripping of whitespace is done.

exog : array-like

exog is an n x p array where n is the number of observations and p is the number of regressors including the intercept if one is included in the data.

Notes

See developer notes for further information on MNLogit internals.

Attributes

endog array A reference to the endogenous response variable
exog array A reference to the exogenous design.
J float The number of choices for the endogenous variable. Note that this is zero-indexed.
K float The actual number of parameters for the exogenous design. Includes the constant if the design has one.
names dict A dictionary mapping the column number in wendog to the variables in endog.
wendog array An n x j array where j is the number of unique categories in endog. Each column of j is a dummy variable indicating the category of each observation. See names for a dictionary mapping each column to its category.

Methods

cdf(eXB) Multinomial logit cumulative distribution function.
fit(**kwargs[, start_params, method, ...]) Fit the model using maximum likelihood.
hessian(params) Multinomial logit Hessian matrix of the log-likelihood
information(params) Fisher information matrix of model
initialize() Preprocesses the data for MNLogit.
loglike(params) Log-likelihood of the multinomial logit model.
pdf(eXB) NotImplemented
predict([exog, linear]) Predict response variable of a model given exogenous variables.
score(params) Score matrix for multinomial logit model log-likelihood

Previous topic

sm.discrete.discrete_model.Probit.score

Next topic

sm.discrete.discrete_model.MNLogit.cdf

This Page