gen_height_weight: Generate heights and weights for a virtual population.

View source: R/gen_height_weight.R

gen_height_weightR Documentation

Generate heights and weights for a virtual population.

Description

Predict height and weight from age using smoothing splines, and then add residual variability from a 2-D KDE, both fitted to NHANES data, for a given combination of gender and NHANES race/ethnicity category.

Usage

gen_height_weight(gender, reth, age_months, nhanes_mec_svy)

Arguments

gender

Gender for which to calculate height/weight ("Male" or "Female")

reth

NHANES race/ethnicity category for which to calculate height/weight ("Mexican American", "Non-Hispanic Black", "Non-Hispanic White", "Other", or "Other Hispanic")

age_months

vector of ages in months for individuals for whom to calculate height/weight (between 0-959 months)

nhanes_mec_svy

surveydesign object created from mecdt using svydesign (this is done in httkpop_generate)

Details

This function should usually not be called directly by the user. It is used by httkpop_generate() in "virtual-individuals" mode, after drawing gender, NHANES race/ethnicity category, and age from their NHANES proportions/distributions.

Value

A list containing two named elements, weight and height, each of which is a numeric vector. weight gives individual body weights in kg, and height gives individual heights in cm, corresponding to each item in the input age_months.

Author(s)

Caroline Ring

References

Ring, Caroline L., et al. "Identifying populations sensitive to environmental chemicals by simulating toxicokinetic variability." Environment International 106 (2017): 105-118


httk documentation built on March 7, 2023, 7:26 p.m.