0

I'd like to perform polynomial regression on my data (which lies in [0,10]), but I need to ensure that the endpoints of the range are fixed, i.e. that the curve goes through (0,0) and (10,10). So the interpolant

$y = a + bx + cx^2 + \epsilon$

becomes

$y = bx + cx^2 + \epsilon$ with $b = 1 - 10c$.

Assuming just quadratic for now, although I might go to a cubic if the data warrants it. But how do I express this constraint during fitting?

1 Answers1

1

It would be easiest just to plug your constraint into the model and rewrite it:

$y = bx + cx^2 = (1 - 10c)x + cx^2 = x + c(x^2 - 10x)$

Regress $y-x$ against $x^2 - 10x$, without an intercept, to get $c$. Then you can compute $b$ from that.

The Laconic
  • 1,454
  • 2
  • 10
  • 18