The purpose of the role argument of brm_data() is to declare whether the outcome variable is raw response (AVAL) or change from baseline (CHG). This matters because brm_marginal_draws() needs to know whether it can compute change from baseline. However, it is possible (and sometimes desirable) to analyze AVAL for datasets that do not even have a baseline value in the discrete time variable. So the question is not whether the outcome is AVAL or CHG, the question is whether the user specifies a baseline value in the reference_time argument. reference_time alone should be enough to decide. We can deprecate the role argument entirely.
The purpose of the
role
argument ofbrm_data()
is to declare whether the outcome variable is raw response (AVAL) or change from baseline (CHG). This matters becausebrm_marginal_draws()
needs to know whether it can compute change from baseline. However, it is possible (and sometimes desirable) to analyze AVAL for datasets that do not even have a baseline value in the discrete time variable. So the question is not whether the outcome is AVAL or CHG, the question is whether the user specifies a baseline value in thereference_time
argument.reference_time
alone should be enough to decide. We can deprecate therole
argument entirely.