MNLogit perfect separation #516

Open
jseabold opened this Issue Oct 5, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@jseabold
Member

jseabold commented Oct 5, 2012

Add perfect separation warning to MNLogit.

@josef-pkt

This comment has been minimized.

Show comment Hide comment
@josef-pkt

josef-pkt Oct 5, 2012

Member

Detecting perfect prediction will be necessary.

However, in the example of #514 we get the problems (in my fit) with a few non perfectly predicted cases

>>> ((res.predict()[:,0] < 0.9999999) & (res.predict()[:,0] > 0.000001)).sum()
19
>>> ((res.predict()[:,0] < 0.999) & (res.predict()[:,0] > 0.001)).sum()
12

with 20 parameters to estimate, we might hit the perfect separation problems already before all observations are perfectly predicted.

Note: I'm working with L1 regularized fit to have more meaningful results to look at.

Member

josef-pkt commented Oct 5, 2012

Detecting perfect prediction will be necessary.

However, in the example of #514 we get the problems (in my fit) with a few non perfectly predicted cases

>>> ((res.predict()[:,0] < 0.9999999) & (res.predict()[:,0] > 0.000001)).sum()
19
>>> ((res.predict()[:,0] < 0.999) & (res.predict()[:,0] > 0.001)).sum()
12

with 20 parameters to estimate, we might hit the perfect separation problems already before all observations are perfectly predicted.

Note: I'm working with L1 regularized fit to have more meaningful results to look at.

@josef-pkt josef-pkt modified the milestones: 0.6, 0.7 Aug 17, 2014

@josef-pkt josef-pkt modified the milestones: 0.8, 0.7 Jul 17, 2015

@josef-pkt

This comment has been minimized.

Show comment Hide comment
@josef-pkt

josef-pkt Jul 20, 2015

Member

Irix dataset is a good example for perfect separation in MNLogit.

see my answer http://stackoverflow.com/questions/31507396/mnlogit-in-statsmodel-returning-nan/31511894#31511894

Member

josef-pkt commented Jul 20, 2015

Irix dataset is a good example for perfect separation in MNLogit.

see my answer http://stackoverflow.com/questions/31507396/mnlogit-in-statsmodel-returning-nan/31511894#31511894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment