sinanpl / OaxacaBlinder

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

Snapshot tests #30

Closed davidskalinder closed 4 months ago

davidskalinder commented 4 months ago

This one adds four basic tests: one each to compare baseline-invariant twofold and threefold results for log-real-wages on age and education to the same decompositions in Stata, and regression tests for the same thing with bootstraps. I visually confirmed that the point estimates in the regression tests are identical to the Stata-tested decomps.

Of course we can't test the bootstraps against Stata, but at least now we have a set of bootstraps (with the seed set to 1973, the year that the Blinder and Oaxaca papers were published) that should remain fixed so that we can test changes to the bootstrap setup that don't actually affect the draws.

Of course as always @sinanpl let me know if I can further clarify anything here!

davidskalinder commented 4 months ago

I should note by the way that this depends on #26.

davidskalinder commented 4 months ago

NB new tests fail until #31 restores functionality from #13.