alarm-redist / redist

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

R-hat Not Converging #163

Closed zmarkovich closed 1 year ago

zmarkovich commented 1 year ago

Hello,

In using the package, we've noticed that even with as many as 50,000 simulations, the R hat value doesn't reach acceptable levels for our variables of interest. Do you have any advice on how to address this? We've tried varying the value of seq_alpha and adapt_k_thresh with no luck. Our primary specification does provide county cores, although the same pattern emerges even if that constraint is eliminated. The redistricting task involves splitting 15k units into 63 districts, so it's a fairly large task.

Thank you for any help resolving this and let me know if I can provide any additional details. We'd also be open to sharing the code/ shapefiles if that would be useful as well.

Thank you, Zach

CoryMcCartan commented 1 year ago

63 districts is a lot! Unfortunately a bit beyond the algorithm's capacity to sample with 50k simulations, probably. I think your best bet is to either split the state up into subregions & run SMC within each subregion (though this changes the target distribution you sample from), or to switch to an MCMC algorithm as is implemented in e.g. redist_mergesplit(). For the latter you'll still want to do multiple runs and check for convergence with $\hat R$.

zmarkovich commented 1 year ago

Thank you so much for the prompt reply. After playing around with the redist_mergesplit function, it appears to be working quite well. Thank you for the input and all the work maintaining the package!