formulaic
formulaic copied to clipboard
`_ordering="none"` is ignored when a dependent variable is included
Thanks for the very useful library!
I'm having some issues with retaining the order of the terms as they are in the formula. Using the example from the README, but with a c ~
added, yield the following result:
In [2]: {
...: "degree": Formula("c ~ z + z:a + z:b:a + g").rhs,
...: "none": Formula("c ~ z + z:a + z:b:a + g", _ordering="none").rhs,
...: "sort": Formula("c ~ z + z:a + z:b:a + g", _ordering="sort").rhs,
...: }
Out[2]:
{'degree': 1 + z + g + z:a + z:b:a,
'none': 1 + z + g + z:a + z:b:a,
'sort': 1 + g + z + a:z + a:b:z}
Notice the 'none'
example is identical to the 'degree'
(default) option. Is there a reason for this?