R/nhanes.R

#' @title
#' National Health and Nutrition Examination Survey
#'
#' @description
#' The \href{https://www.cdc.gov/nchs/nhanes/index.htm}{National Health and Nutrition
#' Examination Survey} (NHANES) is a research survey distributed to adults and children
#' across the United States to examine health and nutritional status nationwide. It is
#' unique in that it conducts both interviews and physical examination to produce their data.
#' The survey is run by the National Center for Health Statistics (NCHS), a part of the
#' Centers for Disease Control and Prevention.
#'
#' @details
#' In order to get a demographically diverse range of responses, minority groups were surveyed
#' more heavily. However, this skewed the survey results to have an inaccurate demographic makeup.
#' To address this, some observations of more common groups are resampled in the data.
#'
#' @format A tibble with 10,000 observations and 15 variables:
#' \describe{
#'   \item{sex}{character variable with values "Male" and "Female"}
#'   \item{survey}{integer variable with the year the survey was conducted in. Most tests were
#'                      conducted across two years, so the earlier year is used.}
#'   \item{age}{character variable for age in years}
#'   \item{race}{character variable with values "White", "Black", "Hispanic", "Mexican", and "Other"}
#'   \item{education}{factor variable with levels "Middle school" < "High school" < "Some college" < "College"}
#'   \item{hh_income}{factor variable for household income groups with levels "0-4999" < [...] < "more 99999"}
#'   \item{weight}{double variable for weight in kilograms}
#'   \item{height}{double variable for height in centimeters}
#'   \item{bmi}{double variable for body mass index}
#'   \item{pulse}{integer variable for pulse in beats per minute or bpm}
#'   \item{diabetes}{integer variable with values 0/1 indicating whether patient suffers from diabetes}
#'   \item{general_health}{integer variable for general health ranked from 1-5. 1 maps to "poor", 2 is "fair", 3 is "good", 4 is "very good", and 5 is "excellent".}
#'   \item{depressed}{factor variable Self-reported number of days where participant felt down, depressed or hopeless. Reported for participants aged 18 years or older.
#'                    with levels, "Several", "None", "Most"
#'                    number of days over two week period.  Survey answers included: "Not at all", "Several days", "More than half the days", "Nearly every day" (source: NHANES DPQ_F (2009-2010))}
#'   \item{pregnancies}{integer variable for number of pregnanices.
#'                      NA if the individual, regardless of sex, hasn't experienced a pregnancy}
#'   \item{sleep_night_hrs}{integer value for hours of sleep per night on average}
#'
#' }
#'
#' @author
#' David Kane
#'
#' @source
#' \url{https://cran.r-project.org/web/packages/NHANES/NHANES.pdf}
#'
"nhanes"
PPBDS/primer.data documentation built on April 9, 2024, 5:36 p.m.