Open ferberkl opened 4 years ago
Thanks for opening this issue. The bug should already be fixed in the github version of brms I think.
With regard to the feature request, I agree that it would be nice to specify priors separately. Not sure yet how to best intergrate that into the existing interface. Suggestions are welcome!
Thanks, Paul. It does seem to be working in the github version on my end.
Regarding how to set priors, I think it would make sense to use the interaction syntax. This is how the parameters are printed in the github version. For example, in the model:
fit2 <- brm(count ~ zAge + zBase * Trt + (1 + visit |gr(patient, by=Trt)),
data = epilepsy, family = poisson(), chains = 1)
to set priors on the SDs:
set_prior("normal(0, 1)", class = "sd", group = "patient", coef = "Intercept:Trt0")
or perhaps the underscore syntax similar to what is used for correlation matrices.
set_prior("normal(0, 1)", class = "sd", group = "patient_Trt0", coef = "Intercept")
set_prior("normal(0, 1)", class = "sd", group = "patient_Trt1", coef = "Intercept")
For the correlation matrices, maybe something like the following:
set_prior("lkj(1)", class = "cor_patient_Trt0")
set_prior("lkj(2)", class = "cor_patient_Trt1")
Thanks. I think by
should be either part of group
of coef
or something entirely new. Making it part of class
would be inconsistent. I will need to think more of this and its implications.
Hi Paul,
I'm wondering if this feature has been added to brms. I checked the documentation, and it did not appear to be, but I just wanted to make sure I was not missing something.
Thank you for all your work on brms. It is a really amazing resource.
this has not been implemented yet because it needs a new argument in the prior specification functions and I have to think carefully about a name and how that can be generalized later on.
hallg92 @.***> schrieb am So., 24. Okt. 2021, 03:57:
Hi Paul,
I'm wondering if this feature has been added to brms. I checked the documentation, and it did not appear to be, but I just wanted to make sure I was not missing something.
Thank you for all your work on brms. It is a really amazing resource.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/874#issuecomment-950246260, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCW2AFPXJ3NVVC4ZJU6BOLUINRXDANCNFSM4MDHYH6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hello,
I notice this is an old thread. I am wondering if this feature has been added. I ask because it would be quite helpful to me in fitting some IRT models where I would like to fix the SD of theta to 1 for the control group but freely estimate it for the treatment group.
Thank you!
Josh
I understand it has important use-cases. I simply didn't have the time to think more about it. sorry.
Thanks for the reply. I did find an alternative way to fit the model, so no worries.
Thanks!
On Wed, Nov 6, 2024 at 7:27 AM Paul-Christian Bürkner < @.***> wrote:
I understand it has important use-cases. I simply didn't have the time to think more about it. sorry.
— Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/874#issuecomment-2459620734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW2VX3CANT4AD6OKHYTYSETZ7IDMVAVCNFSM6AAAAABRFIWMLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJZGYZDANZTGQ . You are receiving this because you commented.Message ID: @.***>
-- Josh Gilbert
Hi Paul,
I'm trying to allow the full variance-covariance matrix of the random effects to vary across groups using the gr(re, by = "cat_var") syntax (from issue 365)
One feature request and one (I think) bug report:
The feature request is to be able to specify priors on the varying SDs separately by the "by" variable. This doesn't seem to be possible at the moment (version 2.12.0).
Second, the possible bug:
The syntax works with just varying intercepts, i.e. (1 | gr(re, by = "cat_var")), but I'm running into issues when I have multiple varying effects.
Using the
epilepsy
data example:This works:
This does not work:
The error I'm getting in this reprex and also when I try this with my data is:
many times, followed by
Many thanks.