simulate_obesity {GeoTox} | R Documentation |
Simulate obesity status
Description
Simulate obesity status
Usage
simulate_obesity(
x,
obes_prev = "OBESITY_CrudePrev",
obes_sd = "OBESITY_SD",
obes_label = "FIPS",
n = 1000
)
Arguments
x |
data frame containing obesity data as a percentage from 0 to 100. |
obes_prev |
column name of prevalence. |
obes_sd |
column name of standard deviation. |
obes_label |
column name of labeling term, required if |
n |
simulated sample size. |
Value
List of arrays containing simulated obesity status.
Examples
# Input has default column names
df <- data.frame(OBESITY_CrudePrev = c(20, 50, 80),
OBESITY_SD = c(5, 5, 5),
FIPS = letters[1:3])
simulate_obesity(df, n = 5)
# Input has custom column names
df <- data.frame(prev = c(20, 50, 80),
sd = c(5, 5, 5),
label = letters[1:3])
simulate_obesity(df,
obes_prev = "prev",
obes_sd = "sd",
obes_label = "label",
n = 5)
[Package GeoTox version 0.2.0 Index]