Clustered errors in panel data in Multinomial logistic regression in python (e.g. statsmodels package) sandwich estimator
I am estimating a MNL regression model for customer choices. I have a panel data set with N = sum_{i=1}^{I} t_{text{observations}}
. Since one individual makes multiple choices in my dataset. Standard errors should be adjusted for clustering. I use the statsmodels/statsmodels/discrete
/discrete_model.py MNLogit method. However, even though other methods do provide clustering robust standard errors, I cannot find how to implement it for the MNL model. I tried doing it myself by creating a sandwich estimator using this code: