
These functions translate tidybayes-style tidy data frames of draws to/from different tidy data frame formats (each format using a different naming scheme).
to_broom_names(data)from_broom_names(data)
to_ggmcmc_names(data)
from_ggmcmc_names(data)
A data frame to translate.
A data frame with (possibly) new names in some columns, according to the translation scheme above.
Function prefixed with to_
translate from the tidybayes format to another format, functions
prefixed with from_
translate from that format back to the tidybayes format. Formats include:
to_broom_names()
/ from_broom_names()
:
.variable
<-> term
.value
<-> estimate
.prediction
<-> .fitted
.lower
<-> conf.low
.upper
<-> conf.high
to_ggmcmc_names()
/ from_ggmcmc_names()
:
.chain
<-> Chain
.iteration
<-> Iteration
.variable
<-> Parameter
.value
<-> value
# NOT RUN {
library(magrittr)
data(line, package = "coda")
line %>%
gather_draws(alpha, beta, sigma) %>%
median_qi() %>%
to_broom_names()
# }
Run the code above in your browser using DataLab