# Multiple linear regression LSE when one of parameter is known

Question is the following:

For analyzing the observed data, the following regression model $$\begin{eqnarray} y_i=\beta_0+\beta_1x_{i1}+\beta_2x_{i2}+\beta_3x_{i3}+\epsilon_i \end{eqnarray}$$ is chosen by a researcher. When it is known that $$\beta_2=4$$, how can a researcher obtain the least squares estimates for all the other unknown parameters?

Well, in my viewpoint, since the parameter $$\beta_2$$ is known, thus we only need to get the other unknown parameter, that is, obtain the least squares estimator focus on $$\beta_0,\beta_1,\beta_3$$ only but not $$\beta_2$$, thus the LSE well be the same as usual, that is, $$\begin{eqnarray} \hat{\beta}_{LSE}=\hat{\beta_{0,1,3}}=(X^{T}X)^{-1}X^{T}y \end{eqnarray}$$ Is this right?

• Hi: That's correct but note that the $X$ matrix and the $y$ vector change because the known piece has to be subtracted from both sides of the equation. Maybe this was obvious in which case, my apologies. – mlofton Nov 9 '19 at 12:45
• Subtract $\beta_2 x_{i2}$ from $y_i$ and regress this on the remaining covariates. The least squares estimator will be $(\tilde X’\tilde X)^{-1} \tilde X’ \tilde y$ where $\tilde X$ is the covariate matrix without $x_{i2}$ and $\tilde y$ is the outcome vector with $\beta_2 x_{i2}$ subtracted. – Student Nov 9 '19 at 12:46
• Appreciate, I actually forget to alter the matrix representation, this is my fault. – 連振宇 Nov 11 '19 at 1:06
• This question is also answered at stats.stackexchange.com/a/434554/919 and stats.stackexchange.com/a/136602/919. – whuber Nov 13 '19 at 22:28

## 1 Answer

You are right that under the constraint that $$\beta_2 = 4$$, you do not need to estimate $$\beta_2$$. But you do need to apply the constraint.

• Step 1: subtract $$\beta_2 x_{i2}$$ from $$y_i$$. Denote the transformed outcome by $$\tilde y \equiv y_i - 4 x_{i2}$$.
• Step 2: remove the column correspond to $$x_{i2}$$ from the covariate matrix $$X$$. Denote the resulting covariate matrix by $$\tilde X$$.
• Step 3: calculate the constrained least squares estimates as $$\hat\beta_{\rm LSE} = (\tilde X' \tilde X)^{-1} \tilde X' \tilde y$$.
• It is equivalent, and more practical, to use an offset term in the model formula (in R, should exist also in other systems.) y ~ x1 + offset(I(4*x2)) + x3, data=your_data_frame, ...) – kjetil b halvorsen Nov 13 '19 at 22:05