sinanpl / OaxacaBlinder

R implementation of Oaxaca-Blinder gap decomposition
MIT License
1 stars 1 forks source link

Tests against Stata for baseline-invariant results with more than one factor IV #56

Closed davidskalinder closed 1 month ago

davidskalinder commented 1 month ago

This should fix #55. (Sorry, eager beavers!)

@sinanpl have a look if you like? As with the other outstanding PRs, I don't think this is blocking anything yet, so no serious urgency as far as I'm concerned.

One thing to note is that I think the test "0-variance baseline-adjusted IV results match Stata" makes the test "baseline-adjusted-IV threefold results match Stata" redundant (since the zero-variance version contains all the complexity of the other one, plus the extra twist of the zero-variance IVs). But I don't know enough about testing best practices to know whether that redundancy is good or bad, so I haven't removed the simpler one. @sinanpl if you think it's better not to have the redundancy then feel free to cut the simpler test, or let me know and I can do it.

sinanpl commented 1 month ago

Thanks @davidskalinder!

merged to dev. note that it's been a while I got really into the coding as well... I noticed some open things & might do a refactoring soon. I will not merge this one to master yet