R/maihda_health_data.R

#' NHANES Health Data Subset for MAIHDA Use
#'
#' A pedagogical subset of the National Health and Nutrition Examination Survey
#' (NHANES) dataset, serving as a real-world example for Multilevel Analysis
#' of Individual Heterogeneity and Discriminatory Accuracy (MAIHDA). Contains
#' complete records demonstrating intersectional demographic health inequalities.
#'
#' @format A data frame with 3,000 rows and 6 variables:
#' \describe{
#'   \item{BMI}{Body Mass Index (kg/m^2), a continuous outcome variable.}
#'   \item{Age}{Age in years at screening, a continuous covariate.}
#'   \item{Gender}{Gender of the participant (male/female).}
#'   \item{Race}{Self-reported race/ethnicity.}
#'   \item{Education}{Educational attainment level.}
#'   \item{Poverty}{Poverty to income ratio, a continuous covariate.}
#' }
#'
#' @source
#' Derived from the \code{NHANES} R package. Original data collected by the
#' Centers for Disease Control and Prevention (CDC).
#'
#' @examples
#' data(maihda_health_data)
#'
#' # Example usage:
#' # strata_result <- make_strata(maihda_health_data, vars = c("Gender", "Race", "Education"))
#' # model <- fit_maihda(BMI ~ Age + (1 | stratum), data = strata_result$data)
"maihda_health_data"

Try the MAIHDA package in your browser

Any scripts or data that you put into this service are public.

MAIHDA documentation built on April 5, 2026, 5:06 p.m.