survey_frequency
Calculate weighted distributions of a categorical variable in NHANES data, returning unweighted counts, weighted percentages, standard errors, and confidence intervals for each category.
Instructions
Weighted distribution of a categorical variable (Table 1 style): for each level, unweighted n, weighted percent, SE and Korn-Graubard CI, within the domain and optionally by group. labels: optional {code: label} map, e.g. {"1": "Male", "2": "Female"}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dataset_id": "<dataset_id>",
"variable": "<variable>"
},
"name": "survey_frequency"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | ||
| domain | No | ||
| labels | No | ||
| variable | Yes | ||
| dataset_id | Yes |