alarm-redist / redist

Simulation methods for legislative redistricting.
https://alarm-redist.github.io/redist/
GNU General Public License v2.0
66 stars 23 forks source link

`redist_mergesplit()` new default warmup in 4.0 is a breaking change #143

Closed christopherkenny closed 2 years ago

christopherkenny commented 2 years ago
data(iowa)
ia <- redist_map(iowa, existing_plan = cd_2010, pop_tol = 0.01)
redist_mergesplit(ia, nsims = 100)

results in

Error in `redist_mergesplit()`:
! `nsims` must be greater than `warmup`.
Run `rlang::last_error()` to see where the error occurred.

Should revert or create new warnings for the change.

CoryMcCartan commented 2 years ago

Yep, this is intentional. The warning there is new to reflect this and the documentation explains why.

christopherkenny commented 2 years ago

It's an error not a warning

CoryMcCartan commented 2 years ago

Oh sorry that's what I meant. You can't trust the results at all with fewer than 100 warmup draws. We don't stop people from setting warmup=0 if they really want but we do initialize warmup to a good default value. And obviously it's impossible for the algorithm to run if nsims<warmup so we do need to error out.