= Stata svyset = '''`-svyset-`''' declares a survey design. <> ---- == Usage == The `-svyset-` declares a survey design. Subsequent estimation commands prefixed by [[Stata/Svy|-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 [[https://stats.oarc.ucla.edu/stata/faq/how-do-i-use-the-stata-survey-svy-commands/|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 [[https://stats.oarc.ucla.edu/unlinked/how-do-i-use-the-stata-survey-svy-commands-3/|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 == [[https://www.stata.com/manuals/svysvyset.pdf|Stata manual for -svyset-]] ---- CategoryRicottone