To calculate an average community mean basic sanitation facility access (leave-one-out -leaving a particular household under consideration) for all other households:
I used the code:
by cluster, sort: egen numerator = total( basic_sanitation) by cluster: egen denominator = count(basic_sanitation) gen comm_basic_san = (numerator - basic_sanitation)/(denominator - 1) However, now I need to calculate the community level mean basic_sanitation by leave-one-out mean but leaving a random household and leaving 2-3 random households. I have 28 households in a community who have/or haven't basic sanitation access. A code help will be appreciated. Thank you!
I used the code:
by cluster, sort: egen numerator = total( basic_sanitation) by cluster: egen denominator = count(basic_sanitation) gen comm_basic_san = (numerator - basic_sanitation)/(denominator - 1) However, now I need to calculate the community level mean basic_sanitation by leave-one-out mean but leaving a random household and leaving 2-3 random households. I have 28 households in a community who have/or haven't basic sanitation access. A code help will be appreciated. Thank you!
Comment