Censored responses multivariate model

I can’t find any examples, but brms has so many (awesome!) features that I may have missed it.

I want to model protein concentrations for many different proteins measured on the same samples. I would prefer a multivariate model because many protein types are correlated. A not-trivial number of concentrations are left censored (below the detectable limit), but in principle they may also be right censored (i.e. any measurements outside the region of the standard curve). The censoring limits vary by protein, and by batch (batch random effects are ignored for simplicity in the example below).

I can fit a censored model for a single protein ok:

brm_cens <- brm(
bf(conc_log | cens(cens) ~ Treatment),
data = datas %>% filter(response_name %in% “protein1”)
)

I can fit a multivariate model to all the proteins with no censoring ok:

brm_mv <- brm(
bf(mvbind(protein1, protein2) ~ Treatment),
data = datas %>% spread(response_name, conc_log)
)

But I can’t figure out how to fit a multivariate model with censoring. This is what I have tried:

brm_mv_cens <- brm(
bf(mvbind(protein1_conc_log, protein2_conc_log) |
cens(mvbind(protein1_cens, protein2_cens)) ~
Treatment),
data = datas %>% spread(response_name, conc_log)
)

Resulting in an error message:
“Setting ‘rescor’ to TRUE by default for this model
Error: Only ‘se’, ‘weights’, ‘mi’ are supported addition arguments when ‘rescor’ is estimated.”

  • Operating System: Windows 10
  • brms Version: 2.9.0

The error pretty much tells you the whole story. If you want the responses to be residually correlated (which is one of the reasons one chooses multivariate models in the first place), then censoring is not possible because we currently don’t have multivariate CDFs available in Stan.

It’s pretty funny that I was looking for the same feature for pretty much the same exact reason one day later. I also analyze a lot of analytical chemistry data (environmental, in my case) and would love to see this be possible, in the future at least. I’m interested in applications like this https://onlinelibrary.wiley.com/doi/abs/10.1111/j.0006-341X.2001.00022.x.

Is there a STAN issue or something which I can track? Or is this one of those structural things that is unlikely to ever be possible?

If you build your multivariate model using independent likelihoods for the individual parts, censoring is no problem. But if you have a jount multivariate likelihood (for instand multivariate normal) you need the multivariate CDF which is currently not available in Stan but may be availabe in the future.

1 Like