Brms - multiple types of additional information

Hello Helpers,

I would like to include missingness, weights, censoring and boundaries in my model. My dependent variable has some poorly-measured (partly missing) values, some values that are more important than others and some that are censored. Additionally, the dependent variable has ‘natural’ boundaries at 0 and 100 (but it is not a proportion). So, ideally, I would like to model it with a formula like:-

mybf = bf(y|mi(part_y) | weights(y_importance) | cens(y_event) | trunc(lb=0, ub=100) ~ x + (time|id), data=my_data)

brmformula accepts the above code, but when I try to compile the model, brm fails with an error. The error depends on which type of additional information is last in the list.

For “| trunc(lb=0, ub=100)”, the error is: “Error in trunc(lb = 0, ub = 100) :
supplied argument name ‘lb’ does not match ‘x’”

For “| weights(my_importance)” the error is: “Error in weights(my_importance) : object ‘my_importance’ not found”, even though “my_importance” is definitely present in the “my_data” data frame.

for “| mi(part_y)”, the error is: “Error in resp_weights(my_importance) | mi(part_y) :
operations are possible only for numeric, logical or complex types”

for “| cens(y_event)”, the error is: "Errror in cens(y_event) : could not find function “cens” "

So, I’d like to ask if it is possible to include more than1 kind of additional information for a single dependent variable - and, if it is, then how?

With many thanks, anticipation of your help,

JW

Sorry - solved it!

I just found the answer, at the bottom of the relevant section in the manual:

Multiple addition terms of different types may be specified at the same time using the + operator. For
example, the formula formula = yi | se(sei) + cens(censored) ~ 1 implies a censored meta-
analytic model

Apologies for being slow,

JW