statsmodels.discrete.conditional_models.ConditionalLogit¶
-
class
statsmodels.discrete.conditional_models.
ConditionalLogit
(endog, exog, missing='none', **kwargs)[source]¶ Fit a conditional logistic 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, must contain only 0 and 1.
- exogarray_like
The array of covariates. Do not include an intercept in this array.
- groupsarray_like
Codes defining the groups. This is a required keyword parameter.
- Attributes
endog_names
Names of endogenous variables.
exog_names
Names of exogenous variables.
Methods
fit
([start_params, method, maxiter, …])Fit method for likelihood based models
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)The Hessian matrix of the model.
information
(params)Fisher information matrix of model.
Initialize (possibly re-initialize) a Model instance.
loglike
(params)Log-likelihood of model.
predict
(params[, exog])After a model has been fit predict returns the fitted values.
score
(params)Score vector of model.
loglike_grp
score_grp
Methods
fit
([start_params, method, maxiter, …])Fit method for likelihood based models
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)The Hessian matrix of the model.
information
(params)Fisher information matrix of model.
Initialize (possibly re-initialize) a Model instance.
loglike
(params)Log-likelihood of model.
loglike_grp
(grp, params)predict
(params[, exog])After a model has been fit predict returns the fitted values.
score
(params)Score vector of model.
score_grp
(grp, params)Properties
Names of endogenous variables.
Names of exogenous variables.