statsmodels.discrete.discrete_model.MNLogit.loglikeobs

MNLogit.loglikeobs(params)[source]

Log-likelihood of the multinomial logit model for each observation.

Parameters:
paramsarray_like

The parameters of the multinomial logit model.

Returns:
loglikearray_like

The log likelihood for each observation of the model evaluated at params. See Notes

Notes

\[\ln L_{i}=\sum_{j=0}^{J}d_{ij}\ln \left(\frac{\exp\left(\beta_{j}^{\prime}x_{i}\right)} {\sum_{k=0}^{J} \exp\left(\beta_{k}^{\prime}x_{i}\right)}\right)\]

for observations \(i=1,...,n\)

where \(d_{ij}=1\) if individual i chose alternative j and 0 if not.


Last update: Oct 12, 2024