drkowal / lmabc

https://drkowal.github.io/lmabc/
GNU General Public License v3.0
0 stars 0 forks source link

Fix `colMeans(X)` for cat-cat interactions #41

Open prayaggordy opened 5 months ago

prayaggordy commented 5 months ago

Two "FIXME" notes in getConstraints(). Dr. Kowal, could you remind me what the issue was?

drkowal commented 5 months ago

For cat-cat interactions, ABCs require joint probabilities. E.g., for sex:race, it's not enough to look at the sample proportions for Male and Female, and then for NHW, NHB, H, etc.; we have to use joint proportions. For ABCs that use the observed sample proportions, colMeans(X) actually gives that to us quite easily. But this does not generalize for when a user wants to input their own proportions (e.g., known population proportions, or all 1's to do sum-to-zero constraints).