Variance decomposition for brms models

model_summary(brmsfit)

Arguments

brmsfit

The output of a brms model. You can use VarDecomp::brms_model() to produce a brmsfit.

Value

Returns a data frame with the summaries of posterior estimates.

Examples

if (FALSE) { # \dontrun{

md = dplyr::starwars

# Centering variables
md = md %>% 
  dplyr::select(mass, sex, species) %>% 
  dplyr::mutate(mass = log(mass),
         sex = dplyr::recode(sex, "male" = 1, 
                      "female" = -1, 
                      "hermaphroditic" = 0,
                      "none" = as.numeric(NA)))
  
  
mod = brms_model(Chainset = 2,
                 Response = "mass", 
                 FixedEffect = "sex", 
                 RandomEffect = "species",
                 Family = "gaussian", 
                 Data = md)

model_summary(mod)

} # }