How to modify a coefficient in a linear regression I think what I need may be called reverse regression. Usually, linear regression is to lm(y~x1+..x2) so that to find the estimated coefficients of each variable. Then we can write the formula which is y = constant + coef1 * x1 +coef2*x2 +...+coefn*xn. But I think the reverse way is that we modify the some values of coef*variable and get the coef.
The reverse regression is that we know the values of y and values of something like coef1*x1, however, we
The way I know is to modify the coefficients of x1 or x2. Then, try lm((y - new_coef*x1) ~ x2 + x3 to double check the coefficient of x1.
Are there any other ways ?
The example above is made up, so there is no true dataset. I am just curious if there is any way to modify coefficients
 A: It is possible to fix a coefficient at any value, though that would be dubious without a strong justification (such as a known physical constant). Omitting the variable would be the same as fixing its coefficient at 0.
A more reasonable approach is to use an informative Bayesian prior. This will affect the final coefficient value but will also take into account patterns in the data. Note that this is only true if one defines the prior so that it captures the distribution of possible values well. It is possible to define a prior that constrains the coefficient so narrowly that the data doesn't really affect the final coefficient estimate, and this would be just as dubious as fixing the coefficient. So you'll need to think carefully to define a reasonable prior.
A: Processes that reduce the magnitude of coefficients are called "regularization". Normally, though, you decide what regularization to do before performing the regression, rather than looking at your regression first, and then tailoring the regularization to a particular goal for a coefficient.
Regularization also usually is applied equally to all the coefficients, but it doesn't have to be (and if you don't standardize your variables, then your choice of units can make a nominatively symmetric regularization have an asymmetric effect). If you have reason to think that one of your variables is less likely to be significant, it is valid to use a different regularization hyperparameter for that variable.
Regularization is equivalent to a Bayesian prior, the solution mkt brought up, but you'll probably get more useful results looking up how to do regularization than Bayesian priors.
