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
predictors, and then get the new coefficients for the rest variables. – nobodyishere Jul 20 '22 at 13:49stata, but it seems to allow we to set constraints likex1= -x2not thex1= a number. – nobodyishere Jul 21 '22 at 02:29constraintin Stata that I can recall, but the documentation seems to include this case. – Nick Cox Jul 21 '22 at 07:23reverse regression. I will clarify it in my new edit version. – nobodyishere Jul 21 '22 at 14:11