Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Strange result


From   [email protected] (Jeff Pitblado, Stata Corp.)
To   [email protected]
Subject   Re: st: Strange result
Date   Wed, 29 Jan 2003 09:47:31 -0600

Arnold H. Levinson <[email protected]> asked about a strange result from
-svymean-.  Basically, -svymean- returned zero for the estimated standard
error of a sample mean for one of the subpopulations.  Here is the result:

***** BEGIN
. svymean daymore2, by(cnty40) subpop(yellowdaymore2)

Survey mean estimation

pweight:  allpstratwt5                            Number of obs    =      3368
Strata:   newstrat                                Number of strata =         8
PSU:      abtid                                   Number of PSUs   =      2947
Subpop.:  yellowdaymore2==1                       Population size  = 641670.75

------------------------------------------------------------------------------
Mean   Subpop. |   Estimate    Std. Err.   [95% Conf. Interval]        Deff
---------------+--------------------------------------------------------------
daymore2       |
     cnty40==0 |   .6443423    .0114679    .6218564    .6668281     1.76899
     cnty40==1 |   .5815394           0    .5815394    .5815394           .
------------------------------------------------------------------------------
***** END

In a private email, Arnold sent me a copy of the data.

Using -svydes- I was able to find the reason for the zero.  Notice below that
the sample data present in the subpopulation of interest contains only 1 PSU
(a singleton PSU).  Stata did not complain here, as it usually does with
singleton PSU's, because the singleton PSU was hidden within a subpop.

The zero resulted from plugging the data into the variance formula.  Since
there is only 1 PSU total, the variance is essentially

	Var = c*(X - X)

where c is some constant, and X is the only nonzero PSU total (from the subpop
in stata 8).

***** BEGIN
. svydes daymore2 if cnty40==1 & yellowdaymore2

pweight:  allpstratwt5
Strata:   newstrat
PSU:      abtid
                             #Obs with  #Obs with     #Obs per included PSU
 Strata     #PSUs     #PSUs   complete   missing  ----------------------------
newstrat  included   omitted    data      data       min      mean       max
--------  --------  --------  --------  --------  --------  --------  --------
       8         1*       15         2        16         2       2.0         2
--------  --------  --------  --------  --------  --------  --------  --------
       1         1        15         2        16         2       2.0         2
                              ------------------
                                         18
                                      13305 = #Obs with missing allpstratwt5,
                                   --------   newstrat, or abtid
                                      13323
***** END


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