Trying to compute weighted averages by msa