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.
page 60 Table 2.8 Estimates under a PPSSYS design (n = 8); the Province’91 population. NOTE: The certainty PSU (the first line of the data) was entered twice and the weight was changed from 1 to .5 for each observation. This is necessary because you need to have two observations in each strata.
input id str clu wt hou85 ue91 lab91 1 2 1 0.5 26881 4123 33786 2 2 1 0.5 26881 4123 33786 3 1 10 1.004 9230 1623 13727 4 1 4 1.893 4896 760 5919 5 1 7 2.173 4264 767 5823 6 1 32 2.971 3119 568 4011 7 1 26 4.762 1946 331 2543 8 1 18 6.335 1463 187 1448 9 1 13 13.730 675 129 927 end
svyset [pw=wt], str(str) pweight: wt VCE: linearized Strata 1: str SU 1: <observations> FPC 1: <zero> svy: total ue91 (running total on estimation sample) Survey: Total estimation Number of strata = 2 Number of obs = 9 Number of PSUs = 9 Population size = 33.868 Design df = 7 -------------------------------------------------------------- | Linearized | Total Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ ue91 | 15077.43 521.1212 13845.17 16309.68 -------------------------------------------------------------- svy: ratio ue91/lab91 (running ratio on estimation sample) Survey: Ratio estimation Number of strata = 2 Number of obs = 9 Number of PSUs = 9 Population size = 33.868 Design df = 7 _ratio_1: ue91/lab91 -------------------------------------------------------------- | Linearized | Ratio Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ _ratio_1 | .1284791 .0022215 .123226 .1337321 --------------------------------------------------------------