Multivariate Multilevel model (some conceptual questions)

Hello,
I have a data set I am trying to model (although my experience with multivariate analysis is limited). The dataset has a 2 (treatment) x3 day (on/off/off) design with participants allocated to one treatment and a number of outcome (>10) measurements (each with its own baseline covariate) . I have coded the model and it runs no problem. A simplified version below (hopefully no typos):

bf1 <- bf(v1 ~ t * d + bv1 + (1 | q | id))
bf2 <- bf(v2 ~ t * d + bv2  +(1 | q | id))

horsepriors = c(prior("horseshoe(df = 1)", class = b, resp = "v1"),
                prior("horseshoe(df = 1)", class = b, resp = "v2"))

model <- brm(bf1 +  bf2 + set_rescor(FALSE),
             prior = horsepriors,
             data = wide_df,
             family = gaussian,
             chains = 3, cores = 3,warmup = 500, iter = 10000,
             sample_prior = TRUE,
             control = list(adapt_delta = 0.99))

Please correct me if my understandings are wrong. I have used the horseshoe priors to shrink the population-level coefficients (which works well). I think that there will also be some shrinkage from the grouping specification .

I am not really sure how the model generates the correlation parameters and what effect they have on the population-level estimates relative to say running each dependent variable in its own model? Note I turned the rescor off as that seemed to blow my fits up completely.

On a different note: In post-processing I am most interested in the on-off by treatment interaction. To simplify interpretation I am testing the day1 vs combined day 2/3 hypothesis as follows:

h <- "(v1_t1:d2 + v1_t1:d3)/2 > 0"

Is that reasonable ? And if so can I use the same basic idea to combine the posterior densities for these effects for plotting purposes ? Not sure if I am breaking some rule about what you can do with population-level effects.

With thanks in advance!

  • Operating System: osx 12.2.1
  • brms Version: 2.17

It makes sense to estimate the event probability \textrm{Pr}[D_2 + D_3 > 0] * (the divide by 2 isn’t necessary). If you want calibrated p\!-values in the frequentist sense, you’ll need to validate analytically or through simulation.

1 Like