New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Priors: Impose bounds on more classes #1094
Comments
I agree. The prior bounds framework needs to be reworked and made more flexible. |
If I may weigh in on this issue as a heavy user, but not a developer. Theory often gives us upper or lower bounds on the effects of some variables or the intercept but not on others. Currently, I am running into the problem that when I set the 'lb' and 'ub' arguments in set_prior() I cannot also set the 'coef' argument. Thus, it seems to me that brms requires that I either set bounds for all the parameters or none of them. Can you look into allowing a user to set bounds for individual parameters? |
I have the same problem - my model only converges if I set both the 'lb' and 'ub' arguments using set_prior. I need these bounds to constrain the intercept for the half-time in a non-linear model (similar to SSlogis, in package nlme) to sensible (positive) values. But, setting these bounds for the intercept then prevents the model from estimating coefficients for the variables of interest, because these covariates can lengthen or shorten the half-time. |
I also would love this feature, but currently you can still do it if you use nonlinear formulas instead which forces you to set priors for all of your parameters. It's very flexible but also quite verbose. |
Closed via #1324 |
Hi Paul, I am echoing the remark of @mpirikL above, it does not seem possible to specify a prior with a lower bound on a specific beta parameter. For instance, Do you know whether there is a way to get around this issue? Thank you! Ladislas EDIT: oops nevermind, just noticed this was already discussed in #1422. |
use brms non linear syntax to define two separate linear predictors to
specify different bounds.
Ladislas Nalborczyk ***@***.***> schrieb am Fr., 11. Nov.
2022, 15:06:
… Hi Paul,
I am echoing the remark of @mpirikL <https://github.com/mpirikL> above,
it does not seem possible to specify a prior with a lower bound on a
specific beta parameter. For instance, prior(normal(0, 1), class = b,
coef = "x", lb = 0) gives the following error: Error: Argument 'coef' may
not be specified when using boundaries.
Do you know whether there is a way to get around this issue?
Thank you!
Ladislas
—
Reply to this email directly, view it on GitHub
<#1094 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2AHLTPDAJ47AZPDDHQLWHZADPANCNFSM4XJLGKKQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Perfect, thanks! |
For reference, an example to
is here: #1422 (comment) |
Currently, upper and lower bounds are only allowed for classes
"b"
. In many cases, with strong priors on the ranges, imposing bounds significantly reduces the computation time.brms/R/priors.R
Lines 19 to 22 in e45f64e
Moreover, it isn't allowed to impose bounds with QR decomposition.
brms/R/stan-predictor.R
Line 335 in 5eca085
The text was updated successfully, but these errors were encountered: