-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Is your feature request related to a problem? Please describe.
I am trying to take the output from a run of ei_rxc() and generate my own reporting of MCMC diagnostics such as the Gelman-Rubin Rhat. eiCompare generates the Rhat plot for ei_rxc when diagnostic = TRUE. However, I can't figure out how to take the raw posterior draws that are outputted when ret_mcmc = TRUE and n_chains is > 1, and generate Rhat values. While this is not reproducible, my call to ei_rxc() typically looks like
ei_rxc_out <- ei_rxc(ei_prep, cands, races, total,
ntunes = 10, totaldraws = 10000, samples = 10000,
thin = 5, burnin = 50000, n_chains = 4,
ret_mcmc = TRUE)
Describe the solution you'd like
When n_chains > 1, I'd like it to be clearer which draws in district_samples are taken from which chain, and which draw iteration they are. I can then take that and prepare the data for coda.
Describe alternatives you've considered
I've examined the district_samples object when n_chains > 1, but I cannot figure out how to back out this information. From the above call, the dim() of district_samples is 10000 x (length(cands)*length(races)).
Additional context
I am also unclear on how to get the precinct_samples object to be non-null, which might be related to the above issue. In the above call, I just get NULL for that slot as output, and the documentation doesn't give guidance on how to return that object (apologies if I'm missing something here).