Returns in a format useful for fit$simulate() with population parameters in wide format
and varying effects in long format (the number of rows will be nsamples * n_levels_in_varying).
tidy_samples(
fit,
population = TRUE,
varying = TRUE,
absolute = FALSE,
prior = FALSE,
nsamples = NULL
)tibble of posterior draws in tidybayes format.
An mcpfit object
TRUE All population effects. Same as fit$pars$population.
FALSE No population effects. Same as c().
Character vector: Only include specified population parameters - see fit$pars$population.
One of:
TRUE All varying effects (fit$pars$varying).
FALSE No varying effects (c()).
Character vector: Only include specified varying parameters - see fit$pars$varying.
TRUE Returns the absolute location of all varying change points.
FALSE Just returns the varying effects.
Character vector: Only do absolute transform for these varying parameters - see fit$pars$varying.
OBS: This currently only applies to varying change points. It is not implemented for rel() regressors yet.
TRUE/FALSE. Summarise prior instead of posterior?
Integer or NULL. Number of samples to return/summarise.
If there are varying effects, this is the number of samples from each varying group.
NULL means "all". Ignored if both are FALSE. More samples trade speed for accuracy.
Jonas Kristoffer Lindeløv jonas@lindeloev.dk