Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Michael Norman Mitchell <Michael.Norman.Mitchell@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Number of Obs with svy , suppop() |

Date |
Fri, 19 Mar 2010 01:17:05 -0700 |

Dear Phil

Many thanks! Michael N. Mitchell See the Stata tidbit of the week at... http://www.MichaelNormanMitchell.com On 2010-03-18 5.04 PM, Phil Schumm wrote:

On Mar 18, 2010, at 6:20 PM, Michael Mitchell wrote:Here is the tabulation of race and sex by race.<snip>. tab sex race, missing 1=male, | 1=white, 2=black, 3=other 2=female | White Black Other . | Total -----------+--------------------------------------------+---------- male | 1,676 193 35 34 | 1,938 female | 1,824 238 34 37 | 2,133 -----------+--------------------------------------------+---------- Total | 3,500 431 69 71 | 4,071<snip>But now I want to analyze just the sub-population of males (sex==1)and it shows that the number of obs is now 4037 (see below). How canthe number of observations increase when adding a -subpop()- option?There are suddenly 37 extra observations. Note this corresponds tothe number of females with a missing race.. svy , subpop(if sex==1): tab race, count format(%13.2fc) (running tabulate on estimation sample)Number of strata = 1 Number of obs= 4037Number of PSUs = 4037 Population size =7932333.9Subpop. no. of obs= 1904Subpop. size =3780355.3Design df= 4036This is as it should be, since information about race is not requiredon those observations outside of the subpopulation. Remember,observations outside the subpopulation are relevant only insofar asthey reflect the variability in the proportion(s) of sampled PSUs withat least one observation in the subpopulation.In fact, at one point Stata did not behave properly in this regard;this was fixed in an update to Stata 10 on 02apr2008 (see -helpwhatsnew10- and search for "02apr2008").-- Phil * * 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/

* * 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/

**Follow-Ups**:**Re: st: Number of Obs with svy , suppop()***From:*Stas Kolenikov <skolenik@gmail.com>

**Re: st: Number of Obs with svy , suppop()***From:*Phil Schumm <pschumm@uchicago.edu>

**References**:**st: Number of Obs with svy , suppop()***From:*Michael Mitchell <Michael.Norman.Mitchell@gmail.com>

**Re: st: Number of Obs with svy , suppop()***From:*Phil Schumm <pschumm@uchicago.edu>

- Prev by Date:
**Re: st: modify axis range in scatter graphs** - Next by Date:
**Re: st: modify axis range in scatter graphs** - Previous by thread:
**Re: st: Number of Obs with svy , suppop()** - Next by thread:
**Re: st: Number of Obs with svy , suppop()** - Index(es):