MNLogit tests are broken
Opened this issue · 3 comments
vincentarelbundock commented
Multinomial logit models do not match R
.
At first glance, it looks like things work, and there are some tests commented out here:
https://github.com/vincentarelbundock/pymarginaleffects/blob/main/tests/test_statsmodels_mnlogit.py
Things to check:
- Do the point estimates match?
- Do the standard errors match?
- If the SEs don't match, is it because of
marginaleffects
, or do the fitted models themselves have different covariance matrices? InR
you can inspect it withvcov(model)
. inPython
it's usuallymodel.cov_params()
.
vincentarelbundock commented
@artiom-matvei you could take a look at this
artiom-matvei commented
@vincentarelbundock It seems like the support for mlogit is deprecated in R. Just double checking before continuing on this issue. https://github.com/vincentarelbundock/marginaleffects/blob/74ef4b3d5a81c83efa3aeff728b9f8eea5681293/NEWS.md?plain=1#L28
vincentarelbundock commented
Right, the equivalent should be multinom()
from the nnet
package. Examples: