Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: univariate median with pweights - is it possible?


From   ROBERT BOZICK <[email protected]>
To   [email protected]
Subject   st: univariate median with pweights - is it possible?
Date   Tue, 30 Jan 2007 16:29:02 -0500

Hello,

I need to do something simple, but having a hard time figuring it out.  Hopefully someone can help me.  I need to estimate a median for a continuous variable (occtotal) using pweight (weight1).   I tried using the command:

summarize occtotal [pweight= weight1]

Stata tells me:

pweight not allowed

The only way I can get the median using the weights is to produce a weighted frequency distribution and then figuring out the median.  I have to do this for a large number of variables and it will be too cumbersome.

Is it possible to produce a weighted median in Stata?

Thanks in advance,

Robert
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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