Dear stata Community,
I am using 2SLS to look for impact of E.coli in water on child health.
I need to create sanitation coverage/improved sanitation as an exogeneous community variable measured by the proportion of households practicing improved sanitation in village excluding the household in consideration. I could create the village level improved sanitation (by ratio). However, I am confused about creating this community variable excluding particular households in consideration.
code for village level variable.
egen vil_imp_san = mean (imp_sanitation), by (cluster)
egen vil_no_toilet = mean (no_toilet), by (cluster)
Thanks!
I am using 2SLS to look for impact of E.coli in water on child health.
I need to create sanitation coverage/improved sanitation as an exogeneous community variable measured by the proportion of households practicing improved sanitation in village excluding the household in consideration. I could create the village level improved sanitation (by ratio). However, I am confused about creating this community variable excluding particular households in consideration.
code for village level variable.
egen vil_imp_san = mean (imp_sanitation), by (cluster)
egen vil_no_toilet = mean (no_toilet), by (cluster)
Thanks!

Comment