Skip to Main Content

How do I analyze survey data with a stratified random sampling with allocationto strata design? | Stata FAQ

NOTE:  If
you want to see the design effect or the misspecification effect, use
estat effects
after the command.

This example is taken from Levy and Lemeshow’s
Sampling of Populations.

page 168 stratified random sampling

use https://stats.idre.ucla.edu/stat/books/sop/jacktwn2.dta, clear
svyset [pweight=sampwt], strata(stratum) fpc(npop)

      pweight: sampwt
          VCE: linearized
     Strata 1: stratum
         SU 1: <observations>
        FPC 1: npop

svy: total twin
(running total on estimation sample)

Survey: Total estimation

Number of strata =      18          Number of obs    =     831
Number of PSUs   =     831          Population size  =  256998
                                    Design df        =     813

--------------------------------------------------------------
             |             Linearized
             |      Total   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
        twin |    26055.4   3791.044      18614.01    33496.78
--------------------------------------------------------------
svy: total twin, over(quart1)
(running total on estimation sample)

Survey: Total estimation

Number of strata =      18          Number of obs    =     831
Number of PSUs   =     831          Population size  =  256998
                                    Design df        =     813

            1: quart1 = 1
            2: quart1 = 2
            3: quart1 = 3

--------------------------------------------------------------
             |             Linearized
        Over |      Total   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
twin         |
           1 |    19183.8   2661.629      13959.33    24408.28
           2 |   6737.907   2696.605      1444.778    12031.04
           3 |    133.687   126.7443     -115.0976    382.4715
--------------------------------------------------------------