Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


httk (version 2.6.0)

get_input_param_timeseries: 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,
  gender = c("Male", "Female"),
  weight_category = c("Underweight", "Normal", "Overweight", "Obese"),
  gfr_category = c("Normal", "Kidney Disease", "Kidney Failure"),
  reths = c("Mexican American", "Other Hispanic", "Non-Hispanic White",
    "Non-Hispanic Black", "Other"),
  bandwidth = 12,
  get.median.param.vals = FALSE,
  input.param.dir = NULL
)

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.

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.

The next four parameters play the same role here as in httkpop_generate: the user may restrict the data available to the non-parametric regression by specifying demographics.

gender

Optional: The gender categories to include in the popualtion; default c("Female", "Male").

weight_category

Optional: The weight categories to include in the population. Default is c('Underweight', 'Normal', 'Overweight', 'Obese'). User-supplied vector must contain one or more of these strings.

gfr_category

The kidney function categories to include in the population. Default is c('Normal','Kidney Disease', 'Kidney Failure') to include all kidney function levels.

reths

Optional: a character vector giving the races/ethnicities to include in the population. Default is c('Mexican American','Other Hispanic','Non-Hispanic White','Non-Hispanic Black','Other'), to include all races and ethnicities in their proportions in the NHANES data. User-supplied vector must contain one or more of these strings.

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.

input.param.dir

The path to the input_params_data_files directory, which is used to store all input_param data files. If input_params_data_files does not exist, this function will create it in the specified path. Default NULL, in which case the present working directory is used as default.

Author

Colin Thomson

Details

For each time-dependent model, there should be a function (such as gen_input_params) 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.

See Also

solve_pbtk_lifestage

gen_input_params

Examples

Run this code
# \donttest{

params <- parameterize_pbtk(chem.name = 'Bisphenol A')
ts <- get_input_param_timeseries("pbtk_lifestage",
                                 chem.name = 'Bisphenol A',
                                 initial.params = params,
                                 start.age = 600, # age fifty
                                 days = 365,
                                 weight_category=c('Underweight',
                                                   'Normal',
                                                   'Overweight'))

# }

Run the code above in your browser using DataLab