View source: R/get_input_param_timeseries.R
get_input_param_timeseries | R Documentation |
The deSolve
package uses timeseries as forcing functions. In lieu of hard-
coding time evolution of parameters into a model, these timeseries may be used
to change the value of parameters in time. The function get_input_parm_timeseries
queries a virutal population and non-parametrically produces timeseries that
preserve the percentile score of the given starting values.
get_input_param_timeseries(
model,
chem.cas = NULL,
chem.name = NULL,
dtxsid = NULL,
initial.params = NULL,
initial.percentiles = NULL,
start.age = 360,
days = 10,
ref.params = NULL,
bandwidth = 12,
get.median.param.vals = FALSE
)
model |
The name of a model which can accept timeseries as forcing functions. |
chem.cas |
Chemical Abstract Services Registry Number (CAS-RN) – the chemical must be identified by either CAS, name, or DTXISD |
chem.name |
Chemical name (spaces and capitalization ignored) – the chemical must be identified by either CAS, name, or DTXISD |
dtxsid |
EPA's 'DSSTox Structure ID (https://comptox.epa.gov/dashboard) – the chemical must be identified by either CAS, name, or DTXSIDs |
initial.params |
The values for each parameter at the beginning of the simulation.
All compiled parameters should be present. The output of the parameterize_<model>
function is appropriate for |
initial.percentiles |
If |
start.age |
The age in months of the individual at the beginning of the simulation. Used for determining the percentile score of the initial parameter values when producing the timeseries determining parameter changes. |
days |
The length of the simulation in days. Equivalent to the |
ref.params |
Model parameters of a reference population used in determining
timeseries. Recommended column binding ages in months (as |
bandwidth |
Dictates the length of time centered around the present to use when calculating non-parametric regressions. |
get.median.param.vals |
Return, instead of the timeseries, the median values for the dynamic model parameters at the given start age. |
For each time-dependent model, there should be a function that determines the model parameter values for each individual in the NHANES dataset. The resulting value are used to form the non-parametric regression curve.
A list of two-column matrices indexed by names of compiled parameters for the designated model. The first column contains a list of times (in days) and the second the total change in that parameter from the initial value.
Colin Thomson
solve_pbtk_lifestage
params <- parameterize_pbtk(chem.name = 'Bisphenol A')
pop.phys <- httkpop_generate(method = 'virtual individuals',
nsamp = 25000,
agelim_years = c(18, 79),
weight_category = c("Normal"))
pop.params <- create_mc_samples(chem.name = 'Bisphenol A',
model = 'pbtk',
httkpop.dt = pop.phys)
ref.params <- cbind(pop.params,
age_months = pop.phys$age_months)
ts <- get_input_param_timeseries(model = 'pbtk_lifestage',
chem.name = 'Bisphenol A',
initial.params = params,
start.age = 600, # age fifty
days = 365,
ref.params = ref.params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.