ENH: add test + fix bug in effect coding