Replies: 24 comments
-
If we want to stick with |
Beta Was this translation helpful? Give feedback.
-
Given that CMPs do not seem feasible with |
Beta Was this translation helpful? Give feedback.
-
Just posted https://discourse.mc-stan.org/t/conditional-means-priors-in-brms/32160 to make sure we are not missing something. |
Beta Was this translation helpful? Give feedback.
-
I may be missing something, but what prevents us from just fitting the reparametrized model
where we just have a different fixed-effects design matrix Another interesting
my understanding is it actually results in a reparametrized model with a different design matrix. I don't fully understand how |
Beta Was this translation helpful? Give feedback.
-
Wow, you're right! Brilliant! I think I missed it before because in the more general formulation for GLMs, we would have to go through a link function, and that would make things more difficult unless we formally transform the components of So yes, I think it would be possible to implement this in Given @andrew-bean's workaround, what are everyone's throughs about #26? |
Beta Was this translation helpful? Give feedback.
-
@andrew-bean, if you post #40 (comment) to https://discourse.mc-stan.org/t/conditional-means-priors-in-brms/32160, I will mark it as the solution. |
Beta Was this translation helpful? Give feedback.
-
@wlandau ok sounds fine, thanks. Done. On the same topic: one key difference between the two parametrizations is that cell means are correlated a-priori under the usual prior (e.g. the mean response for a treatment group at two different timepoints are correlated due to the shared main effect of treatment). For me that correlation seems desirable actually, and it matters for the way historical data would inform a model. With independent priors on the cell means, historical data from one cell would influence the posterior only for that cell. It seems undesirable, because e.g. if you handed me data showing a drug was ineffective at 4 and 8 weeks in a past study, for me it should change my prior for that drug at 12 weeks in a future study. |
Beta Was this translation helpful? Give feedback.
-
Thanks, @andrew-bean and @wlandau, this sounds smart! With the proposed solution, |
Beta Was this translation helpful? Give feedback.
-
I think we could take the posterior samples of
Yes, whereas the usual notion of conditional means priors seems to assume prior independence among the components of
So then maybe cell means are not always the right choice for
(1) not only justifies modeling assumptions, it could also ensure we have nice well-behaved posterior geometry and efficient sampling in HMC. Might be hard to combine with (2), but it's worth taking time to think about which parameterizations would make sense for both. |
Beta Was this translation helpful? Give feedback.
-
Was playing with some code to compare the two approaches (just simulating from priors here). Mostly this is to investigate the Tacked on an illustration of backtransforming
|
Beta Was this translation helpful? Give feedback.
-
This is really helpful to walk through, @andrew-bean! I really like the way you calculate So for On the other hand, I would find it clearer to manually construct the model matrix and supply it directly to |
Beta Was this translation helpful? Give feedback.
-
So along the lines of #40 (comment):
and #40 (comment):
@andrew-bean and others: if we choose something other than cell means for |
Beta Was this translation helpful? Give feedback.
-
I have not absorbed all content above, but a good read of https://bbolker.github.io/mixedmodels-misc/notes/contrasts.pdf for MMRMs I think that the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reference, @weberse2. I have always had trouble with contrast notation in R, but maybe I won't after reading that article. |
Beta Was this translation helpful? Give feedback.
-
Reading https://bbolker.github.io/mixedmodels-misc/notes/contrasts.pdf, I am reminded of how uncertain I feel when I use the contrast interface and
I may be in the minority, but even after 10+ years of using R to do statistics, I still find it hard to trust that the contrast/formula machinery is faithfully representing a model I have in mind. It takes a lot of mental arithmetic and cognitive load just to make sure I am not making obvious errors. I would prefer to set up the regression coefficients in a more explicit and pedantic way, with transparent/verbose assurances, and strict guardrails (in our case, simple objects passed to well-documented fit-for-purpose formal arguments). |
Beta Was this translation helpful? Give feedback.
-
I do understand your concerns with the R contrast system, which is not super intuitive. It's just that a lot of R works in this way and going against this established system is a choice to make. However, you are probably right in that the majority of people are anyway not familiar with these conventions in R and it is hence better to create your own one. |
Beta Was this translation helpful? Give feedback.
-
Taking a step back and revisiting #40 (comment), I wonder if explicit CMPs are even necessary for our identity link function. As @andrew-bean observed, the model matrix just collapses back down into a different model matrix. In that situation, I would think it is more efficient to choose whatever prior-friendly parameterization makes sense (for example, cell means) and then compute quantities like the intercept as transformed parameters if needed. Of course, if we want our priors on fixed effects to be correlated, that might complicate things. But are correlated priors be necessary to consider? Seems like a challenge to account for correlations between different time points in the prior, especially if we need to elicit that prior. And we already have a flexible correlation matrix on the residuals. |
Beta Was this translation helpful? Give feedback.
-
Well... if you are going for non-informative priors then cell means are easy and simple to set up... in practice I'd much prefer to put a prior on the difference in the response from visit to visit. This isn't big usually and it creates immediately a correlation structure which is appropriate for the problem at hand in many cases. |
Beta Was this translation helpful? Give feedback.
-
Coming back to this after almost a year, I think it would help to list all the major cases we care about for assigning priors. I can think of priors on:
Any others? |
Beta Was this translation helpful? Give feedback.
-
I just added a prototype for time differences: #92. Would be great to discuss this and #89 in our meeting tomorrow. |
Beta Was this translation helpful? Give feedback.
-
For this issue, we seem to be heading away from conditional means priors and towards reparameterization in general. In the original formulation by Bedrick et al., CMPs are about using elicited priors on the response scale to induce priors on the model coefficients. We don't actually need that here. All we need is a model that has a parameterization amenable to informative priors. Beyond that point, any deterministic function on posterior samples is straightforward. |
Beta Was this translation helpful? Give feedback.
-
Moving this to a discussion in favor of #96. |
Beta Was this translation helpful? Give feedback.
-
Another related paper: "A hierarchical prior for generalized linear models based on predictions for the mean response". |
Beta Was this translation helpful? Give feedback.
-
On the original thread, I think we landed well in #96 and #100 with informative prior archetypes. |
Beta Was this translation helpful? Give feedback.
-
We talked about specifying a joint prior on the placebo means or treatment effects, then translating it to an induced prior on any parameterization of regression coefficients. The literature calls this approach "conditional means priors" (CMPs), or BCJ priors after the authors of https://www.jstor.org/stable/2291571, and the topic comes up in prior elicitation. Sources:
The method itself is exactly what you would expect: for a model of the form
g(E(y|data)) = X*b
for link functiong()
, and a vector of conditional meansm
such thatg(m) = P*b
given invertible matrixP
, we specify independent priors on the components ofm
and simply consider the induced prior onb = P_inverse * g(m)
. The components ofm
become the true parameters of the model, and the regression coefficients inb
are just transformed parameters. The full augmented model looks like:Since the link
g()
is the identity function, the model collapses down to this:where
Q = X * P_inverse
. In other words, our true parameters arem
andSigma
. When we do MCMC, we draw joint posterior samples of (m
,Sigma
). This seems to be the most feasible (and recommended) way to handle CMPs. The alternative is to analytically transform the joint prior onm
to a correlated joint prior onb
beforehand, which seems extremely messy and error-prone even in a specialized case like ours. Then we would need to hack the Stan code ofbrms
to implement a custom likelihood family because of the correlated priors on the components ofb
, which is also be extremely messy and error-prone. So unfortunately, I think CMPs force us away frombrms
.Beta Was this translation helpful? Give feedback.
All reactions