survey_estimate
Calculate survey-weighted means, proportions, or totals from NHANES data with design-based standard errors, subgroup domains, and optional age adjustment.
Instructions
Design-based estimate (Taylor linearization) of a mean, proportion (0/1 variable) or total. domain: expression defining the subpopulation, e.g. 'RIDAGEYR >= 20 & RIDEXPRG != 1' (the design is NOT subset; out-of-domain records get zero weight). by: grouping variables, e.g. ['RIAGENDR']. age_adjust: 'nchs_adults_20plus' for NCHS direct age standardization (2000 census; 20-39/40-59/60+). Proportions come with Korn-Graubard CIs and NCHS reliability flags.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | ||
| domain | No | ||
| variable | Yes | ||
| statistic | No | mean | |
| age_adjust | No | ||
| dataset_id | Yes |