R-Tip: Missing weights, weighted.mean

There are instances where sampling weights are not only unknown, but in fact, cannot be known (unless one makes certain unsavory assumptions). Under those circumstances, weights for certain respondents can be ‘missing’. Typically there the strategy is to code those weights as 0. However if you retain those as NA, weighted.mean etc. is wont to give you NA as an answer, even if you set na.rm=T.

To get non-NA answers, set NAs to zero or estimate mean over respondents with non-missing weights.

%d bloggers like this: