Suppose I have $p-$dimensional vectors $Y_1,Y_2,...,Y_n$ and $Z_1,Z_2,...,Z_k$ all independent such that $Y_i=\alpha_11+\beta_1x+\epsilon_i$ and $Z_i=\alpha_21+\beta_2x+\eta_i$ where $x$ is a non-random $p$-dimensional vector, $\alpha_1,\alpha_2,\beta_1,\beta_2$ are scalars, $1$ is the vector with all coordinates $1$ and $\epsilon_i$ are iid $N_p(0,\Sigma)$ and $\eta_i$ are iid $N_p(0,\Sigma)$. $\Sigma$ is unknown and if necessary, we may assume it has special structure.
So basically I have two linear regression models pertaining to longitudinal data. I have to test $\beta_1=\beta_2$.
Now I tried to read up but either it's my fault or really this test has not been explained in any of the good books. How do I test this hypothesis?
I need to test hypothesis of this form and also find suitable distribution under $H_0$. Can anyone kindly explain what to do, step by step? Or, if there is some R command to directly test this?