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?
Hmmm... good observation, especially since the behaviour in the docs indicates otherwise. I'll take a look at this shortly... I suspect that _ordering is just not being propagated correctly.
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:Notice the
'none'
example is identical to the'degree'
(default) option. Is there a reason for this?