Stata svyset

-svyset- declares a survey design.


Usage

The -svyset- declares a survey design. Subsequent estimation commands prefixed by -svy- will be adjusted to take this design into account.

Generally the command should be used as:

svyset CLUSTER [pweight=WT], strata(STRATA) vce(linearize) singleunit(centered)

If a PSU is not specified (as above: CLUSTER), then _n is implicitly used. Which is to say, it declares a single-stage sample design.

As an example:

use https://stats.idre.ucla.edu/stat/stata/faq/svysmall, clear
svyset house [pweight = wt], strata(eth)
svy: regress y x1 x2 x3

Older Versions

Per this article:

* Stata 7 commands
svyset psu house
svyset strata eth
svyset pweight wt

* Stata 8 command
svyset [pweigh=wt], psu(house) strata(eth)


See also

Stata manual for -svyset-


CategoryRicottone

Stata/SvySet (last edited 2025-12-18 16:00:26 by DominicRicottone)