Statalist


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

Re: st: AW: Finding median with SVY command


From   Austin Nichols <[email protected]>
To   [email protected]
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
http://www.stata.com/statalist/archive/2007-03/msg00296.html
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')
end
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<[email protected]> wrote:
>
> <>
>
> http://www.stata.com/statalist/archive/2007-03/msg00293.html
>
>
> HTH
> Martin
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Holly Kosiewicz
> Gesendet: Dienstag, 25. August 2009 15:45
> An: [email protected]
> 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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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