Defines all standard tables from the WHO STEPS Epi Info report template. Each entry specifies the table metadata; generic compute and formatting functions use this registry to produce the full data book automatically.

steps_table_registry()

Value

A list of table specification lists.

Table types

proportion

Single binary indicator: % (95% CI) by age × sex. Most common type. Example: "Current smokers among all respondents."

mean

Continuous variable: mean (95% CI) by age × sex. Example: "Mean BMI (kg/m²)."

category

Multi-level factor: % per level (95% CI) by age × sex. Example: "BMI classifications (Underweight / Normal / Overweight / Obese)."

cascade

Diagnosis → treatment → control chain: multiple proportions with nested denominators. Example: "Raised BP diagnosis, treatment and control."

combined

Summary of combined risk factors: 0, 1-2, 3-5 risk factors.

Registry fields

id

Unique short identifier (e.g., "T_smoking_current").

section

Data book section (e.g., "Tobacco Use", "Blood Pressure").

step

STEPS step number (1, 2, or 3).

title

Table title as shown in the data book.

description

One-line description from the WHO template.

type

One of: "proportion", "mean", "category", "cascade", "combined".

variable

Column name(s) in the cleaned data frame to analyse. For proportion: single logical variable. For mean: single numeric variable. For category: single factor variable. For cascade: named list of logical variables.

denominator

NULL (= all respondents) or column name for subsetting (e.g., "current_alcohol" to restrict to drinkers).

levels

For category type: named character vector of level labels.

epi_info

Epi Info program name(s) for reference.

unit

Display unit (e.g., "%", "mmHg", "cm", "kg/m²", "mmol/L").

questions

STEPS instrument question codes used.

sex_panels

Logical. TRUE = 3 panels (Men/Women/Both); FALSE = 2 panels (Men/Women only, e.g., height/weight means). Default TRUE.