Skip to Main Content

How can I do regression estimation with survey data? | 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 Lehtonen and Pahkinen’s
Practical Methods for Design and Analysis of Complex Surveys.

This example provides the numbers necessary to use the
formula in the middle of page 106.  The svyreg is run to get the
coefficient of hou85 and the svytotal is run to get the estimated
total of hou85.  These numbers are used in the formula and the
result (15312) is shown in the last line of Table 3.14 on page 107.

input id str clu wt ue91 hou85 gwt adjwt smplrat
1 1 1 4 4123 26881 .5562 2.2248 .25
2 1 4 4 760 4896 .5562 2.2248 .25
3 1 5 4 721 3730 .5562 2.2248 .25
4 1 15 4 142 556 .5562 2.2248 .25
5 1 18 4 187 1463 .5562 2.2248 .25
6 1 26 4 331 1946 .5562 2.2248 .25
7 1 30 4 127 834 .5562 2.2248 .25
8 1 31 4 219 932 .5562 2.2248 .25
end
gen fpc = 32
svy: reg ue91 hou85
(running regress on estimation sample)

Survey: Linear regression

Number of strata   =         1                  Number of obs      =         8
Number of PSUs     =         8                  Population size    =        32
                                                Design df          =         7
                                                F(   1,      7)    =  44949.18
                                                Prob > F           =    0.0000
                                                R-squared          =    0.9982

------------------------------------------------------------------------------
             |             Linearized
        ue91 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       hou85 |   .1520142    .000717   212.01   0.000     .1503188    .1537097
       _cons |   42.65468   20.54033     2.08   0.076    -5.915492    91.22485
------------------------------------------------------------------------------

svy: total hou85
(running total on estimation sample)

Survey: Total estimation

Number of strata =       1          Number of obs    =       8
Number of PSUs   =       8          Population size  =      32
                                    Design df        =       7

--------------------------------------------------------------
             |             Linearized
             |      Total   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
       hou85 |     164952   87298.57     -41476.32    371380.3
--------------------------------------------------------------