Statalist The Stata Listserver


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

Re: st: svy: mean - # of observations and missing SEs


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: svy: mean - # of observations and missing SEs
Date   Wed, 21 Feb 2007 17:03:18 -0600

Vivian Hoffmann <[email protected]> has a couple of questions about -svy: mean-:

> I'm computing means using svy: mean and I'm puzzled by two things:
> 
> 1. The number of observations reported with the summary statistics is
> generally smaller than the number of observations in my sample (or
> subsample). This is the case even when I know the data on the variables to
> be summarized are complete for these observations.

Stata's survey estimation commands will drop observations from the estimation
sample for any of the following reasons:

	1.  One or more variables of interest contain a missing value.  This
	include the -svyset- variables and variable supplied to options, such
	as -subpop()-, -over()-, -stdize()-, and -stdweight()-.

	2.  With the -subpop()- option, entire strata are dropped when they do
	not overlap with the specified subpopulation.

> 2. For some sub-populations I get the following error message:
> 
> Note: Missing standard error due to stratum with single sampling unit; see
> help svydes.
> 
> So I omit the observations which are singletons within a stratum. But I
> continue to get the same error. The error disappears when I drop some of
> the variables to be summarized.

The note is pointing out that one or more strata in your dataset contain only
one sampling unit.

Use

	. svydes if e(sample)

to find out which of your strata contain only one sampling unit whenever -svy:
mean- (or any other -svy- command) produces this note.

--Jeff
[email protected]
*
*   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