def test_mnlogit_factor():
    dta = sm.datasets.anes96.load_pandas()
    dta['endog'] = dta.endog.replace(dict(zip(range(7), 'ABCDEFG')))
    dta.exog['constant'] = 1
    mod = sm.MNLogit(dta.endog, dta.exog)
    res = mod.fit(disp=0)
    # smoke tests
    params = res.params
    summary = res.summary()

    # with patsy
    del dta.exog['constant']
    mod = smf.mnlogit('PID ~ ' + ' + '.join(dta.exog.columns), dta.data)
    res2 = mod.fit(disp=0)
    res2.params
    summary = res2.summary()
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/discrete/tests/test_discrete.py/test_mnlogit_factor/original