Differences between revisions 2 and 3
Revision 2 as of 2026-08-28 15:21:03
Size: 1182
Comment: Notes
Revision 3 as of 2026-08-28 15:39:35
Size: 1221
Comment: Link
Deletions are marked like this. Additions are marked like this.
Line 25: Line 25:
`svy` estimation commands like [[Stata/Regress|regress]] use maximum pseudo-likelihood rather than [[Statistics/MaximumLikelihood|ML]]. `svy` estimation commands like [[Stata/Regress|regress]] use [[Statistics/MaximumPseudoLikelihood|maximum pseudo-likelihood]] rather than [[Statistics/MaximumLikelihood|ML]].

Stata svy

The -svy- prefix command adjusts estimation commands to take a survey design into account.


Usage

The -svyset- command must be used first, to declare the survey 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

svy commands use t statistics with n - L df, where n is the number of PSUs and L is the number of first stage strata, rather than Z statistics. Following from this, the test command technically runs an adjusted Wald test.

svy estimation commands like regress use maximum pseudo-likelihood rather than ML.


See also

Stata manual for -svy-


CategoryRicottone

Stata/Svy (last edited 2026-08-28 15:39:35 by DominicRicottone)