0

I want to estimate regression equation $Y=A(X-\bar X)+b+E$, where these variables are multivariate. $Y$ is matrix. $E$ is error, I need to estimate $A$ and $b$. First I decided to estimate them in simple case: $y=a(x_i-\bar x)+b+e$. Differentiated $(y_i-b-a(x_i-\bar x))^2$ with respect to $a$ and $b$

$\sum (y_i-b-a(x_i-\bar x)))=0$

$\sum (x_i-\bar x)(y_i-b-a(x_i-\bar x))=0$

I got

$\hat b=\bar y$

$\hat a=\sum (y_i-\bar y)(x_i-\bar x)/\sum (x_i-\bar x)$

Can you please help me to extend this to multivariate case?

Edit1: $X-\bar X={X_i-\bar X, i=\overline {1,n}}$ is also a matrix with $n$ columns.

  • You need to clarify your question. Is $Y$ a matrix/a vector? In your problem, which are parameters and which are variables? – Alex Silva Dec 27 '16 at 13:37
  • Thanks, I have edited question – Markoff Chainz Dec 27 '16 at 13:42
  • Your question is still confusing. You begin saying that you want to estimate $Y$, but after $A$ and $b$. Moreover, if you know both $X_i$ and $\bar{X}$, there is no reason to write $X-\bar{X}$ (why not juste a single variable, for instance, $X'$? Yet, I did not understand your derivatives. Where $y_i$ comes from? If you differentiate with respect to $a$ a linear expression on $a$, why this variable appears in the derivative? There are other mistakes in your formulation. – Alex Silva Dec 27 '16 at 13:52
  • I dont need to estimate $Y$. It is given, like in any regression. I need to estimate parameters $A$ and $b$. You are write I can write $X_i-\bar X$ like single variable. This transition is made to move starting point from 0 to $\bar X$ – Markoff Chainz Dec 27 '16 at 13:55
  • You should include a $\sum$ in your objective. About derivatives of multivariate function, there exist a plenty of questions/answers here in Mathematics. For instance, http://math.stackexchange.com/questions/212000/vector-matrix-differentiation-to-maximize-function?rq=1 , http://math.stackexchange.com/questions/72007/matrix-calculus-equation-least-squares-minimization?rq=1 , http://math.stackexchange.com/questions/1051257/the-differential-frac-delta-delta-w-wt-phit-phi-w-2-phit-phi-w/1051600#1051600 , http://math.stackexchange.com/questions/1096581/derivative-of-a-vector/1096655#1096655 . – Alex Silva Dec 27 '16 at 14:08
  • When i do differentiation I get nonsense results like $b=Y-A(X_i-\bar X)$,, same for $A$. That is why I am asking for help – Markoff Chainz Dec 27 '16 at 14:31

0 Answers0