TITLE: How to evaluate impact of two independent variables on one dependent variable in a sample
QUESTION [0 upvotes]: I have two independent variables named x and y which are impacting on a third variable called $z$. It means that $z=ax+by$. I have done $900$ experiments and would like to know the mean value of $a$ and $b$. I am looking for the name of test or analysis that I should perform in preferably SPSS or any other relevant application. I appreciate your answers.

REPLY [0 votes]: If you collect your measurements $x_i$ and $y_i$ in a matrix
$${\bf X} = \left (\array{x_1\quad y_1\\x_2\quad y_2\\\vdots\\x_N\quad y_N} \right)$$
then your overdetermined system of equations is given by
$$\bf Xa = z$$
with ${\bf a} = (a,b)^T$ your vector of unknowns, and with ${\bf z}=(z_1,\ldots,z_N)^T$. The optimal least squares solution for $\bf a$ is then given by
$${\bf a} = ({\bf X}^T{\bf X})^{-1}{\bf X}^T{\bf z}$$
You can use Matlab or Octave to compute the solution. Of course you can also use SPSS, but I don't know how this function is called in SPSS.
{"set_name": "stack_exchange", "score": 0, "question_id": 367298}