Model constraint

  • Operating System: macOS High Sierra
  • brms Version: 2.6.0

Say I have a model with two predictors and an intercept. E.g.,

fit1 <-
brm(data = my_data,
 family = gaussian,
 y ~ 1 + x1 + x2)

I’d like to constrain the model such that the sum of x1 and x2 equals 0. What would the syntax for such a constraint be?


What exactly should be contraint? The predictor values, their regression coefficients, their linear predictor contributions?