I have two datasets $D_{i}=\{(x_{k},y_{k})\}_{k=1}^{|D_{i}|}$ and $D_{j}=\{(x_{k},y_{k})\}_{k=1}^{|D_{j}|}$, where $x_{k} \in \mathbb{R}^{d}$ and $y \in \mathbb{R}$. I assume that $y=x^{T}\theta^{*}+\eta$, where $\eta \sim N(0,\sigma^{2})$ is a zero mean gaussian noise with known variance.
Now what I wish to do is to test whether the underlying parameter for these two datasets are the same, that is, whether $\theta^{*}_{i}=\theta^{*}_{j}$.
I have searched for some time, but didn't find anything that directly addresses this problem. This is similar to two sample z-test, but I can only find the cases when the coefficient is scalar, not vector. I am wondering if there is something like two sample Z-test for this problem.
Denote by $Y_1$ and $X_1$, $Y_2$ and $X_2$ your data matrices from the two population. Fit the following linear model:
$$ \begin{pmatrix} Y_1 \\ Y_2 \end{pmatrix} = \begin{pmatrix} X_1 & 0 \\ X_2 & X_2 \end{pmatrix} \begin{pmatrix} \theta_0 \\ \theta_a \end{pmatrix} + \eta,$$ where $\eta$ is the noise vector.
Under this formulation, the first population is under the model $Y_1 = X_1 \theta_0$, while the second population is under the model $Y_2 = X_2 (\theta_0 + \theta_a)$.
You can then use F-test to test whether $\theta_a = 0$.