Closed wlandau closed 6 months ago
For the time being, I restricted brm_model()
to continuous families with identity links: a9cbfaa79f6a5c9f9497e9b8436c81fa1c8c24b8.
There are two main challenges for dichotomous endpoints:
For (2), the worst-case scenario is that non-continuous non-identity-link conditional means priors are not possible in brms
, in which case we can disable conditional means priors for the non-continuous non-identity-link case. For (1), emmeans
just reports marginal means on the scale of the link and makes no attempt to transform them to the scale of the response (see details below). In the case of our Bayesian model, all we have to do is invert the link function (apply the mean function) on the link-scale marginal means we already calculate. We might have to add custom support for each one, but this does not seem too hard.
We may want to focus on "unconditional treatment effects" in the sense of the recently updated FDA guideline on Adjusting for Covariates in Randomized Clinical Trials (see section III C. on "Nonlinear Models").
If I understand correctly, I think we are mostly using unconditional treatment effects, i.e. regress on RACE
as a covariate but report non-RACE
-specific marginal means and treatment effects. We only calculate conditional treatment effects when formally declaring a factor as a subgroup. Seems like this would carry over to from the continuous outcome case to the dichotomous outcome scenario just fine. Please let me know if I am missing something.
I wonder, if we allow a non-identity link and dichotomous data, would we have to change the package name to something like brms.glmm
?
And would it make sense anymore to regress on baseline?
If we use a link function for dichotomous data, we need a distributional family for dichotomous data, such as bernoulli
. If we use a different family, the parameters change, and there could be any number of distributional parameters instead of the current sigma
. This not only affects the "effect size" calculation in brm_marginal_draws()
(we would just need to exclude it from the output), but also the way any non-sigma
distributional parameters are specified in brm_formula()
. And of course the Stan code is very different because the model is completely different. From make_stancode()
, I see brms
even models the unscaled residuals as actual parameters for the Bernoulli and binomial cases. Supporting any one family is a lot to ask, and supporting every family in brms
is not feasible.
I am favor of excluding non-Gaussian families from the package, or at least waiting until we know exactly which family or families to bring within scope.
Transferring this issue thread to a discussion thread.
Should we extend
brms.mmrm
to support dichotomous data? I thinkbrms
straightforwardly accepts nonlinear link functions, but I am wondering how this would affect #53 and #40.