Skip to content

Commit 62605c9

Browse files
improved hypothesis coding for contrasts (#172)
* widen types for contrats/hypothesis coding and use labels * helper functions for computing hypothesis matrix * separate type params for contr and hyp mats * dict(label=>hypo_vector) constructor for hypothesis contrasts * more hypothesis coding tests * use symdiff to check difference * one more test * ContrastsMatrix: type for termnames != levels; constructor cleanup * copy dataframe for missings test in contrasts * reverse * pretty hypothesis matrix with rationalize * update docstring for AbstractContrasts * use baselevel instead of .base; require labels for hypotheses * don't need union, use AbstractVector for fields of hypo coding * Apply suggestions from code review Co-Authored-By: Milan Bouchet-Valat <[email protected]> * use in(... fieldnames(T)) instead of hasfield * warn, don't error for now. * code review: error messages, formatting, docstrings * remove test for warning since it's not clear when it triggers... * T -> U * revise docstring * hypothesis matrix in AbstractContrasts docstring * document kw constructors and note defaults * docstrings, refactor prettify, use same orientation * test hypothesis_matrix, sum inside cols instead of rows for intercept * use sum instead eachcol * more code review Co-Authored-By: Milan Bouchet-Valat <[email protected]> * define specific baselevel methods for types with .base field * use hypothesis_matrix in docstring * todo: termnames * use tolerance= instead of pretty= in hypothesis_matrix * final code review Co-Authored-By: Milan Bouchet-Valat <[email protected]> * fix up constructor * dict -> Vector{Pair} * Apply suggestions from code review Co-Authored-By: Milan Bouchet-Valat <[email protected]> * bump patch version * add @nalimilan's suggested types for clarity Co-authored-by: Milan Bouchet-Valat <[email protected]>
1 parent 734b2f0 commit 62605c9

File tree

2 files changed

+327
-64
lines changed

2 files changed

+327
-64
lines changed

0 commit comments

Comments
 (0)