Fix weighting code in robust covariance calculation, add tests against Stata for unequal group sizes