Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weighted median and range with svy data

    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. The sum and by sort sum accept weights
    Code:
    sum mat_age [w=hh_womnumb], detail
    bysort district: sum mat_age [w=hh_womnumb], detail
    but doesn't account for clustering. I'm not sure if this matters. Any help is appreciated!
    Last edited by Grace Strachan; 15 Apr 2019, 16:12.

  • #2
    If you need survey-adjusted standard errors or confidence intervals, your best bet (and I think your only option) is epctile by Stas Kolenikov. In my experience it usually but not always reports standard errors.

    Code:
    . findit epctile
    David Radwin
    Senior Researcher, California Competes
    californiacompetes.org
    Pronouns: He/Him

    Comment

    Working...
    X