Statalist The Stata Listserver

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

Re: st: Finding median when using svy

From   "Jesia Berry" <>
To   <>
Subject   Re: st: Finding median when using svy
Date   Thu, 08 Mar 2007 10:15:46 +1030

As an example, to get the median age by sex, you can use the 'table'

nhanes3 dataset available at 

use nhanes3.dta
svyset [pweight= wtpfhx6], strata(sdpstra6) psu(sdppsu6)
table hssex, c(median  hsageir count hsageir) row

Jesia Berry
Research Officer
Research Centre for Injury Studies
(and AIHW National Injury Surveillance Unit)
Flinders University
GPO Box 2100
Adelaide SA 5001
Tel: +61 8 8201 7626
Fax: +61 8 8374 0702

>>> ucb_gal <> 8/03/2007 4:47 am >>>
I'm using household survey data and using the svyset settings.

I can't figure out how to find the median value of a variable while
using svy:

I can theoretically use:

svy: tab variable

but my dataset is way to big and the variable has way to many values to
attempt this.

Any suggestions?

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing. 

*   For searches and help try:
*   For searches and help try:

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