b1 + b2 = 1
Let us fit this to the model
result <- lm(Y ~ offset(x1) + I(x2 - x1) + x3, data = data_frame)
This means
Y = a +x1+b2*(x2-x1)+b3*x3
after substituting b1 = 1- b2
new_x = x2-x1 and the coefficient for x1 is 1
b1+b2+b3 = 1
result <- lm(Y ~ offset(x1) + I(x2 - x1) + I(x3 - x1), data = data_frame)
Y = a +x1 + b2*(x2-x1)+b3*(x3-x1)
after substituting b1 =1-b2-b3
b1+b2+b3+..... = 1
I believe the pattern is obvious... all you have to do is subtract one variable, x1, from the other variables (x2, x3, etc.) and set the coefficient of that variable, x1, to 1.
Example: b1 + b2 = 1
# Data
data_frame<- iris[, 1:4]
colnames(data_frame) <- c("Y", paste0("x", 1:3, collaapse=""))
# b1 + b2 = 1
result <- lm(Y ~ offset(x1) + I(x2 - x1) + x3, data = data_frame)
coeff_2 <- coef(result)
b_1 <- 1 - coeff_2[2]
b_2 <- coeff_2[2]