njtierney / mmcc

Fast, tidy functions for mcmc diagnostics and summaries, built with data.table
http://mmcc.njtierney.com/
Other
24 stars 5 forks source link

tidy.mcmc.list grouping by chain #8

Closed samclifford closed 7 years ago

samclifford commented 7 years ago

Is there a way to pass a character vector, my.by=c("chain", "variable"), such that we can use x.dt[ , list(...) , by = my.by] to optionally summarise by chain? That way we can use by.chain = FALSE as the default which sets my.by = "variable" and by.chain = TRUE sets my.by=c("chain", "variable").

njtierney commented 7 years ago

hmmm, maybe!

Is there a good practice dataset that we can use for this sort of stuff?

samclifford commented 7 years ago

I've tried to use DT[order(x), ] to sort the resulting data.table from tidy.mcmc.list by parameter name and then chain but I get errors, so it's left unimplemented. Also the line data set from the coda package does what we want in terms of two chains for three parameters.

samclifford commented 7 years ago

This is dealt with in the current pull request and once merged this can be closed.

njtierney commented 7 years ago

OK awesome.