OK, I've read about this problem several times but now it has finally happened to me (or rather, a student of mine). Suppose you run
You get this:
One way to make the error go away is to drop the singletons:
But, is that a terrible way to do it? I've read that you are supposed to reassign strata, e.g. merge them with, say a neighboring area. But, at least in my student's case, it is not clear what a reasonable merge would be. So how do you decide how to merge in such cases?
In my student's case, I suspect just dropping cases will be no big deal, since only 10 cases out of 1500 are affected. But we still would like to do it the best way possible, if we can figure out how.
Code:
use http://www.stata-press.com/data/r15/nhanes2b, clear svyset psuid [pweight=finalwgt], strata(stratid) svy: mean hdresult
Code:
. svy: mean hdresult
(running mean on estimation sample)
Survey: Mean estimation
Number of strata = 31 Number of obs = 8,720
Number of PSUs = 60 Population size = 98,725,345
Design df = 29
--------------------------------------------------------------
| Linearized
| Mean Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
hdresult | 49.67141 . . .
--------------------------------------------------------------
Note: Missing standard error because of stratum with single
sampling unit.
Code:
svydescribe hdresult, gen(oneunit) svy , subpop (if oneunit==0): mean hdresult
Code:
. svy, subpop(if oneunit==0): mean hdresult
(running mean on estimation sample)
Survey: Mean estimation
Number of strata = 29 Number of obs = 9,786
Number of PSUs = 58 Population size = 109,915,685
Subpop. no. obs = 8,508
Subpop. size = 96,086,827
Design df = 29
--------------------------------------------------------------
| Linearized
| Mean Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
hdresult | 49.63489 .3934587 48.83018 50.43961
--------------------------------------------------------------
Note: 2 strata omitted because they contain no subpopulation
members.
In my student's case, I suspect just dropping cases will be no big deal, since only 10 cases out of 1500 are affected. But we still would like to do it the best way possible, if we can figure out how.

Comment