Logo

statsmodels.discrete.discrete_model.Logit

class statsmodels.discrete.discrete_model.Logit(endog, exog)[source]

Binary choice logit model

Parameters:

endog : array-like

1-d array of the response variable.

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.

Attributes

endog array A reference to the endogenous response variable
exog array A reference to the exogenous design.

Methods

cdf(X) The logistic cumulative distribution function
fit([start_params, method, maxiter, ...]) Fit the model using maximum likelihood.
hessian(params) Logit model Hessian matrix of the log-likelihood
information(params) Fisher information matrix of model
initialize() Initialize is called by statsmodels.model.LikelihoodModel.__init__ and should contain any preprocessing that needs to be done for a model.
jac(params) Logit model Jacobian of the log-likelihood for each observation
loglike(params) Log-likelihood of logit model.
loglikeobs(params) Log-likelihood of logit model for each observation.
pdf(X) The logistic probability density function
predict(params[, exog, linear]) Predict response variable of a model given exogenous variables.
score(params) Logit model score (gradient) vector of the log-likelihood

Attributes

endog_names
exog_names

Previous topic

statsmodels.discrete.discrete_model.DiscreteResults.tvalues

Next topic

statsmodels.discrete.discrete_model.Logit.cdf

This Page