[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: AW: Finding median with SVY command

From   Austin Nichols <>
Subject   Re: st: AW: Finding median with SVY command
Date   Tue, 25 Aug 2009 10:39:44 -0400

I think Martin means to point to
as the end of that thread, but it still doesn't give an explicit
method for calculating a SE or CI for the median.
Note you can't prefix with -bs- and use weights in the _pctile command...
try instead:

clear all
webuse nhanes2
qreg bpsys [aw=finalwgt]
*which has wrong SE, so for a better SE:
egen c=group(strata psu)
prog myq
syntax varname [,q(int 50)]
qreg `varlist' [aw=finalwgt], q(`q')
bs, cluster(c): myq bpsys

I make no guarantees about the asymptotic or small-sample properties
of that SE, but at least you have one and can describe how you got it.
Referees are free to quibble...

You can also transform x, get a svy:mean of transformed x, and then
backtransform point estimates and CI endpoints, for another
questionable estimate of central tendency.

On Tue, Aug 25, 2009 at 10:02 AM, Martin Weiss<> wrote:
> <>
> Martin
> -----Ursprüngliche Nachricht-----
> Von:
> [] Im Auftrag von Holly Kosiewicz
> Gesendet: Dienstag, 25. August 2009 15:45
> An:
> Betreff: st: Finding median with SVY command
> I have used the svy command to produce population estimates based on a
> sample of individuals. I would like to estimate the median income of this
> population, but from what I see Stata will not let me do this. The svy: mean
> command just doesn't cut it because the estimates are sensitive to outliers.
> Does anyone have any thoughts on how to tackle this?

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index