Hi all,

I'm hoping this is an easy response but I can't seem to find an answer to it. I'm working with survey data and trying to find what would be the equivalent of
Code:
sum age, detail
bysort district: sum age, detail
using the svy command. I want to find the weighted median and range of age for both the full data set and by district. I have found a workaround using _pctile
Code:
_pctile age [pweight=household], ng(2)
_pctile age [pweight=household] if district ==1, nq(2)
_pctile age [pweight=household] if district ==2, nq(2)
but this gives only the median and seems like a round about way to go about this. Any help is appreciated!