View source: R/gen_age_height_weight.R
gen_age_height_weight | R Documentation |
Generate gender, NHANES race/ethnicity category, ages, heights, and weights for a virtual population, based on NHANES data.
gen_age_height_weight(
nsamp = NULL,
gendernum = NULL,
reths,
weight_category,
agelim_years,
agelim_months,
nhanes_mec_svy
)
nsamp |
The desired number of individuals in the virtual population.
|
gendernum |
Optional: A named list giving the numbers of male and female
individuals to include in the population, e.g. |
reths |
Optional: a character vector giving the races/ethnicities to
include in the population. Default is |
weight_category |
Optional: The weight categories to include in the
population. Default is |
agelim_years |
Optional: A two-element numeric vector giving the minimum
and maximum ages (in years) to include in the population. Default is
c(0,79). If |
agelim_months |
Optional: A two-element numeric vector giving the minimum
and maximum ages (in months) to include in the population. Default is c(0,
959), equivalent to the default |
nhanes_mec_svy |
|
This function should usually not be called directly by the user. It is used by
httkpop_generate()
in "virtual-individuals" mode.
A data.table containing variables
gender
Gender of each virtual individual
reth
Race/ethnicity of each virtual individual
age_months
Age in months of each virtual individual
age_years
Age in years of each virtual individual
weight
Body weight in kg of each virtual individual
height
Height in cm of each virtual individual
Caroline Ring
ring2017identifyinghttk
importFrom survey svymean
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.