0

I am using the brms package to define my multilevel model. The outcome is either "0" or "1", therefore I am using as a family argument "binomial()".

In the output of the model I don't find an output about the family specific parameters. The problem is that I need the residual variance for calculating the vpc. And I understood that the estimate of the family specific parameters is the residual variance.

The VPC is calculated like this: vpc = (Strata Variance/ (Strata Variance + Residual Variance)*100)

So the question is, how can I calculate the vpc and exstract therefore the residual varaince of the model? Thank you so, so much for help!

# 3. Perform multilevel analysis to partition the variance between and within intersectional strata for the individual factor modell
model1_individual <- brms::brm(W4_mental_health ~ 1 + BA_life_exspec_integer + BA_scale_emowell + BA_GPA + BA_coping_scale + BA_selfesteem_scale + 
              BA_age + BA_depression_scale + (1|strata),
              data = data_total_NA,
              warmup = 500,
              iter = 1000,
              family = binomial(),
              chains = 1, seed = 195) # Calculate simple intersectional model
model1_individual # Extract variance

This is the output:

Family: binomial Links: mu = logit Formula: W4_mental_health ~ 1 + BA_life_exspec_integer + BA_scale_emowell + BA_GPA + BA_coping_scale + BA_selfesteem_scale + BA_age + BA_depression_scale + (1 | strata) Data: data_total_NA (Number of observations: 3203) Draws: 1 chains, each with iter = 1000; warmup = 500; thin = 1; total post-warmup draws = 500

Group-Level Effects: ~strata (Number of levels: 16) Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS sd(Intercept) 0.83 0.18 0.52 1.22 1.03 115 223

Population-Level Effects: Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS Intercept -0.21 0.95 -2.20 1.58 1.00 277 326 BA_life_exspec_integer2 -0.12 0.52 -1.07 0.96 1.00 239 307 BA_life_exspec_integer3 -0.29 0.50 -1.26 0.70 1.00 237 313 BA_life_exspec_integer4 -0.21 0.50 -1.17 0.78 1.00 235 290 BA_scale_emowell 0.01 0.03 -0.04 0.07 1.01 403 394 BA_GPA 0.13 0.07 0.00 0.25 1.00 549 439 BA_coping_scale -0.02 0.02 -0.06 0.03 1.00 656 344 BA_selfesteem_scale -0.04 0.02 -0.06 -0.01 1.03 628 346 BA_age -0.03 0.03 -0.08 0.02 1.00 630 320 BA_depression_scale 0.06 0.02 0.03 0.10 1.00 386 432

Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS and Tail_ESS are effective sample size measures, and Rhat is the potential scale reduction factor on split chains (at convergence, Rhat = 1).

0 Answers0