I need to minimize the following expression with respect to $\theta$. In this expression $X$ is a $(N × 2)$ matrix that contains a column of 1's and an explanatory variable in the second column. $\theta_s$ is a parameter vector that contains a constant and the coefficient for the explanatory variable.
Maybe a bit unclear in the notation, but the index $i$ refers to the $N$ in the summation and $t$ refers to $T$ in the summation.
$$\sum_{NT} p_{i s}\left(y_{i t}-X \theta_s\right)^2$$
Q: What is the analytical expression of the optimal $\theta$?
- Note 1: I got as a hint that I could use the WLS solutions, but I don't see how
- Note 2: The original problem is described here: How to do the M-step in the EM algorithm?
However as we split the optimization over the segments, the index s is just a result of the original notation, which can ignored here.
Note that the subindex i refers the the "shop" and goes from 1,....,N.
– Tim Dec 02 '23 at 14:59