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

From |
jpitblado@stata.com (Jeff Pitblado, StataCorp LP) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Subpop - losing observations - a similar problem |

Date |
Tue, 11 Sep 2007 09:59:31 -0500 |

Jamie <j.fagg@qmul.ac.uk> asks why the -svy- prefix with the -subpop()- option dropped observations from the estimation sample: > I am trying to select a subpopulation for use with svy: mlogit. > > The variable which specifies the subpopulation has 1130 observations > with a value of 1, 1792 0s and no missing data. However, when I run > the syntax (below), only 1099 observations are included in the analysis > > xi: svy, subpop(varname): x y1 y2, rrr > > Searching on the archives here brought me to a post about 'losing > observations' > > Subject st: Why does one command "lose" observations compared to > another command? > Date Sun, 22 Jan 2006 11:56:50 -0500 " > > This problem seemed similar to the one I have and the answers > suggested that it might be something to do with a weights variable > having zeros on it. > > I have checked my probability weight variable which is invoked earlier > in the syntax by svyset, and it contains 121 0s, which doesn't quite > explain the 131 missing observations. > > When I specify the brr option to include both the probability weight > and bootstrap weights (see below), all 1130 observations ARE included > in the analysis > > xi: svy brr, subpop(varname): x y1 y2, rrr > > I would really appreciate any help. The -svy- prefix drops strata that do not contain observations that overlap with the specified -subpop()- option. In addition, observations where the sampling weight variable is zero are also considered outside the subpopulation. Suppose stratum 1 is identified in the dataset with the following 10 observations: obs pweight subpop 1 0 1 2 0 1 3 0 1 4 0 1 5 33 0 6 19 0 7 5 0 8 21 0 9 8 0 10 30 0 Then stratum 1 is going to be omitted by -svy- because none of it's observations overlap with the subpop, 0 values in 'pweight' overrule the value of the 'subpop' variable. Since the 28aug2006 executable update in Stata 9, the -svy brr- prefix has been using the same logic for omitting strata. --Jeff jpitblado@stata.com * * 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/

- Prev by Date:
**Re: st: xtabond: different results in Stata 10** - Next by Date:
**Re: st: clustering in proportional hazards models with stata/mp 10** - Previous by thread:
**st: Subpop - losing observations - a similar problem** - Next by thread:
**st: Mean Correction** - Index(es):

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