get_input_param_timeseries: Get timeseries containing the change of each of the input...

View source: R/get_input_param_timeseries.R

get_input_param_timeseriesR Documentation

Get timeseries containing the change of each of the input parameters.

Description

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.

Usage

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
)

Arguments

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.params.

initial.percentiles

If initial.params are not provided, initial.percentiles will designate a starting value for each parameter according to the corresponding percentile within the NHANES population. Values should be between zero and one. If neither initial.params nor initial.percentiles are provided, the initial value for the parameter is taken to be the median of the population value.

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 days parameter in solve_model.

ref.params

Model parameters of a reference population used in determining timeseries. Recommended column binding ages in months (as age_months) to the output of create_mc_samples.

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.

Details

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.

Value

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.

Author(s)

Colin Thomson

See Also

solve_pbtk_lifestage

Examples



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)




httk documentation built on June 8, 2025, 12:19 p.m.