View source: R/estimate_qtbi.R
| estimate_qtbi | R Documentation |
Computes within-cohort exposure percentiles, runs the fixed entanglement encoder, and returns the input data with percentile and QTBI columns added.
estimate_qtbi(
data,
chemicals,
synergy_strength = 0.6,
qtbi_col = "qtbi",
percentile_prefix = "pct_",
exposure_names = NULL,
pct_cols = NULL,
reference_doses = NULL,
reference_index = NULL
)
data |
A data frame containing exposure columns. |
chemicals |
Character vector of exposure column names. |
synergy_strength |
Synergy strength in |
qtbi_col |
Name for the QTBI score column (default |
percentile_prefix |
Prefix for percentile columns (default |
exposure_names |
Optional display names for plots (defaults to |
pct_cols |
Optional percentile column names (same length as |
reference_doses |
Optional named numeric vector of oral reference doses
in mg/kg/day, with names matching |
reference_index |
Name of the index chemical for potency ratios. Defaults
to the first |
A qtbi_data object (data frame) with QTBI and percentile columns.
df <- data.frame(
Pb = c(1, 2, 3, 4),
As = c(4, 3, 2, 1),
Cd = c(2, 2, 3, 3),
Hg = c(1, 3, 2, 4)
)
out <- estimate_qtbi(
df,
chemicals = c("Pb", "As", "Cd", "Hg"),
synergy_strength = 0.6,
reference_doses = c(Pb = 6.3e-4, As = 6.0e-5, Cd = 5.0e-4, Hg = 1.0e-4),
reference_index = "Pb"
)
out$qtbi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.