bambinos / formulae

Formulas for mixed-effects models in Python
https://bambinos.github.io/formulae/
MIT License
56 stars 14 forks source link

Fix order issue with categorical variables #73

Closed tomicapretto closed 2 years ago

tomicapretto commented 2 years ago

If x is an ordered categorical variable and we use T(x) or S(x) (or their more explicit versions), they don't respect the order in x.

This PR fixes that.

codecov[bot] commented 2 years ago

Codecov Report

Merging #73 (b482329) into master (e6c1b84) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   95.44%   95.45%   +0.01%     
==========================================
  Files          31       31              
  Lines        3531     3539       +8     
==========================================
+ Hits         3370     3378       +8     
  Misses        161      161              
Impacted Files Coverage Δ
formulae/categorical.py 100.00% <100.00%> (ø)
formulae/tests/test_design_matrices.py 98.62% <100.00%> (+0.01%) :arrow_up:
formulae/version.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e6c1b84...b482329. Read the comment docs.