Professional Documents
Culture Documents
coefficient in a regression in R?
stats.stackexchange.com/questions/282949/how-can-i-add-minimum-and-maximum-constraints-to-a-coefficient-in-a-
regression-i
Ask Question
Asked 6 years, 5 months ago
I have an array (YY) with a series of data to which I must fit the sum of some other arrays
(X1,X2,X3)(X1,X2,X3). The expression is:
Y=c1∗X1+c2∗X2+c3∗X3+eY=c1∗X1+c2∗X2+c3∗X3+e
rregressionconstraint
1
This is an extremely bad idea, you will not estimate any quantity of interest. Your
inference will be wrong, your estimates will be biased, and the predictions will be off the
charts – Repmat Jun 1, 2017 at 16:46
Add a comment
1 Answer
If you just want to fit a least squares hyperplane with a constraint in one parameter, what I
would do is:
1/2
Now do the following regression analysis:
Y−c1∗X1=c2∗X2+c3∗X3+e
Y−c1∗X1=c2∗X2+c3∗X3+e
That is, now your response is Y−c1∗X1Y−c1∗X1 (an array of known values) and your
predictors are X2X2 and X3X3.
Please notice that, although this least squares fitting may work, constraints may have effects
on procedure and interpretation of significance tests or variable selection.
Pere
6,22311 gold badge1616 silver badges3232 bronze badges
2/2