Stata 15 help for svydes

[SVY] svydescribe -- Describe survey data

Syntax

svydescribe [varlist] [if] [in] [, options]

options Description ------------------------------------------------------------------------- Main stage(#) sampling stage to describe; default is stage(1) finalstage display information per sampling unit in the final stage single display only the strata with one sampling unit generate(newvar) generate a variable identifying strata with one sampling unit ------------------------------------------------------------------------- svydescribe requires that the survey design variables be identified using svyset; see [SVY] svyset.

Menu

Statistics > Survey data analysis > Setup and utilities > Describe survey data

Description

svydescribe displays a table that describes the strata and the sampling units for a given sampling stage in a survey dataset.

Options

+------+ ----+ Main +-------------------------------------------------------------

stage(#) specifies the sampling stage to describe. The default is stage(1).

finalstage specifies that results be displayed for each sampling unit in the final sampling stage; that is, a separate line of output is produced for every sampling unit in the final sampling stage. This option is not allowed with stage(), single, or generate().

single specifies that only the strata containing one sampling unit be displayed in the table.

generate(newvar) stores a variable that identifies strata containing one sampling unit for a given sampling stage.

Examples

. webuse nhanes2b . svyset psuid [pweight=finalwgt], strata(stratid) . svydescribe . svy: mean hdresult . svydescribe hdresult, single . svydescribe hdresult, finalstage . gen newstr = stratid . gen newpsu = psuid . replace newpsu = psuid + 2 if stratid == 1 . replace newstr = 2 if stratid == 1 . svyset newpsu [pweight=finalwgt], strata(newstr) . svydescribe hdresult, finalstage . svy: mean hdresult

. webuse nhanes2b, clear . svy: mean hdresult . svydescribe if e(sample), single


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index