Adds biomarker quantity ceiling effects to the previous draw_parameters_random_fx function. Here an individual’s realized biomarker boost is dependent on their biomarker quantity at the time of the exposure event.

draw_parameters_random_fx_biomarker_dep(
  i,
  t,
  x,
  demography,
  biomarker_states,
  model_pars,
  ...
)

Arguments

i

individual

t

time

x

exposure

demography

demography information

biomarker_states

an array of true biomarker quantities for all individuals across all time steps and biomarkers

model_pars

tibble of biomarker (antibody) kinetics parameters with variables: 1) exposure_id: numeric exposure ID; 2) biomarker_id: numeric biomarker ID; 3) name: the character name of the parameter; 4) mean: numeric mean of this parameter distribution; 5) sd: the numeric standard deviation of the parameter distribution; 6) distribution: character description of the parameter distribution type (e.g., log-normal, normal)

...

Additional arguments

Value

A tibble with the simulated parameters for this exposure event

Examples

model_pars <- reformat_biomarker_map(example_model_pars_biphasic)
draw_parameters_random_fx_biomarker_dep(2,100,1,example_demography, 
example_biomarker_states_wide, model_pars)
#> # A tibble: 8 × 7
#>       i     t     x     b name                         value realized_value
#>   <dbl> <dbl> <dbl> <dbl> <chr>                        <dbl>          <dbl>
#> 1     2   100     1     1 boost_long                  0.519          0.0519
#> 2     2   100     1     1 boost_short                 0.187          0.0187
#> 3     2   100     1     1 wane_long                   0.0103         0.0103
#> 4     2   100     1     1 wane_short                  0.0388         0.0388
#> 5     2   100     1     1 biomarker_ceiling_threshold 1.7            1.7   
#> 6     2   100     1     1 biomarker_ceiling_gradient  0.529          0.529 
#> 7     2   100     1     1 biomarker_prot_midpoint     0.075          0.075 
#> 8     2   100     1     1 biomarker_prot_width        0.1            0.1