MNLogit.jac()

statsmodels.discrete.discrete_model.MNLogit.jac

MNLogit.jac(*args, **kwds)

jac is deprecated, use score_obs instead! Use score_obs method. jac will be removed in 0.7

Jacobian matrix for multinomial logit model log-likelihood
Parameters:

params : array

The parameters of the multinomial logit model.

Returns:

jac : ndarray, (nobs, k_vars*(J-1))

The derivative of the loglikelihood for each observation evaluated at params .

Notes

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

for j=1,...,J, for observations i=1,...,n

In the multinomial model the score vector is K x (J-1) but is returned as a flattened array. The Jacobian has the observations in rows and the flatteded array of derivatives in columns.

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.discrete.discrete_model.MNLogit.jac.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部