问题
I need to run a multiple regression in R, with the variables X1, X2 and X3, where there is a variable θ = β2 + β3. So instead of β2, for the coefficient of X2 I need to use (θ - β3). How could I do this?
回答1:
Note that Y = b1 * x1 + (t - b3) * x2 + b3 * x3
is equivalent to
Y = b1 * x1 + t * x2 - b3 * x2 + b3 * x3 = b1 * x1 + t * x2 + b3 * (x3 - x2)
So, you can continue from there easily.
来源:https://stackoverflow.com/questions/53561699/linear-combination-of-regression-coefficients-in-r