3

How can I fit expressions of type $y = (a + bx_1)(c + dx_2)$ using regression?

Prakash
  • 131
  • 2

1 Answers1

5

You can reformulate your expression like this: $$ y = ac + adx_2 + cbx_1 + bdx_1x_2 $$

Then, you can give new names as follows:

$$ ac = m\\ ad = n\\ cb = p\\ bd = q\\ x_2 = z_1\\ x_1 = z_2\\ x_1 x_2 = z_3\\ $$

Obtaining this expression: $$ y = m + nz_1 + pz_2 + q z_3 $$

Now you can fit that expression with the $z_i$ data created from the $x_i$ data.

Once you have values for $m, n, p, q$, you can solve the equations to find the values of a, b, c, d. You can use Wolfram Alpha for that (e. this).

noe
  • 26,410
  • 1
  • 46
  • 76
  • 1
    But, after the fit, if for example, we get $m = 1$, $n = 2$, $p = 2$ and $q = 1$, then this expression is equivalent to $(x_1 + 2)(x_2 + 2) - 3$. But I don't want to have the intercept (3). – Prakash Feb 19 '24 at 16:09
  • 1
    The fact that the reformulated equation I proposed has more solutions than the original one does not mean that these solutions can happen with data that has been derived from the original formulation. The values of $m, n, p, q$ that you proposed should not happen with data that is compatible with $y=(a + b x_1)(c+ d x_2)$. – noe Feb 19 '24 at 16:27