How can I estimate
$y_{i,t}=β_{i}x_{i,t}+ϵ_{i,t} \\ β_{i}=γ_{i}z_{i}+η_{i}$
in R ? Moreover, if I have splitted my data set to a train set which will contain 80% of all the i's and then I want to forecast the $y_{i,t}$ for the rest 20% i's $\forall t$, how can I do it in R ?
Thank you in advance