2

I have an array ($Y$) with a series of data to which I must fit the sum of some other arrays $(X_1,X_2,X_3)$. The expression is:

$Y = c_1*X_1 + c_2*X_2 + c_3*X_3 + e$

I need to add some constraints (min and max values of $c_1$).

Silverfish
  • 20,678
  • 23
  • 92
  • 180
David
  • 31
  • 1
  • *Why* do you need (do you?) those constraints? – Tim Jun 01 '17 at 11:26
  • 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 01 '17 at 16:46

1 Answers1

1

If you just want to fit a least squares hyperplane with a constraint in one parameter, what I would do is:

  • Fit regression plane as usual.
  • If $c_1$ meets the constraints, you are done.
  • If $c_1$ is outside the constraints, take $c_1$ as the maximum or minimum constraint - whichever is closer to the fitted value. From this moment, $c_1$ is a constant and not a parameter to be estimated.
  • Now do the following regression analysis:

$$Y - c_1*X_1 = c_2*X_2 + c_3*X_3 + e$$

That is, now your response is $Y - c_1*X_1$ (an array of known values) and your predictors are $X_2$ and $X_3$.

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
  • 5,875
  • 1
  • 13
  • 29