If I generate a sample that includes p1 and p2 drawn from a bivariate normal distribution. Then I generate a sample that includes n1 and n2 drawn from a different bivariate normal distribution. Then I generate a variable y=n1p1+n2p2+noise. Suppose that I do not observe p1 and p2. How do I estimate the variance covariance matrix of p1 and p2 using FGLS? It's not that difficult to estimate mean p1 and mean p2. These are essentially the estimated coefficients from the FGLS regression y on n1 and n2. But what about var(p1) var(p2) and cov(p1,p2)?
I am using R. I do not know the steps I need to take.