0

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.

  • If you need help choosing a statistical model for your data, you should ask for help at [stats.se] instead. You are likely to get better help there. This is not really a specific programming question that's appropriate for Stack Overflow. You could make it more specific by including a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Jul 31 '23 at 18:36

0 Answers0