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).
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.eiComparegenerates the Rhat plot forei_rxcwhendiagnostic = TRUE. However, I can't figure out how to take the raw posterior draws that are outputted whenret_mcmc = TRUEandn_chainsis > 1, and generate Rhat values. While this is not reproducible, my call toei_rxc()typically looks likeDescribe the solution you'd like
When
n_chains> 1, I'd like it to be clearer which draws indistrict_samplesare taken from which chain, and which draw iteration they are. I can then take that and prepare the data forcoda.Describe alternatives you've considered
I've examined the
district_samplesobject whenn_chains> 1, but I cannot figure out how to back out this information. From the above call, thedim()ofdistrict_samplesis 10000 x (length(cands)*length(races)).Additional context
I am also unclear on how to get the
precinct_samplesobject to be non-null, which might be related to the above issue. In the above call, I just getNULLfor that slot as output, and the documentation doesn't give guidance on how to return that object (apologies if I'm missing something here).