statsmodels.discrete.conditional_models.ConditionalLogit.fit#

ConditionalLogit.fit(start_params=None, method='BFGS', maxiter=100, full_output=True, disp=False, fargs=(), callback=None, retall=False, skip_hessian=False, **kwargs)#

Fit the conditional model.

Parameters:
start_paramsarray_like, optional

Initial guess of the solution for the loglikelihood maximization. The default is an array of zeros.

methodstr, optional

The method determines which solver from scipy.optimize is used, see LikelihoodModel.fit for more information.

maxiterint, optional

The maximum number of iterations to perform.

full_outputbool, optional

Set to True to have all available output in the Results object’s mle_retvals attribute.

dispbool, optional

Set to True to print convergence messages.

fargstuple, optional

Extra arguments passed to the likelihood function.

callbackcallable, optional

Called after each iteration, as callback(xk), where xk is the current parameter vector.

retallbool, optional

Set to True to return list of solutions at each iteration.

skip_hessianbool, optional

If False, the covariance matrix is calculated using the numerical Hessian after the optimization. If True, the Hessian is not calculated and the returned results have no covariance matrix.

**kwargs

Additional keyword arguments used by the solver.

Returns:
ConditionalResultsWrapper

The fitted model results.