get_demographic_groups: Get stratification groups used to group infection history...

View source: R/stratification.R

get_demographic_groupsR Documentation

Get stratification groups used to group infection history model

Description

Takes antibody_data and demographics and returns a list with the stratification groups used to group the antibody kinetics model. If timevarying_demographics are provided, then these are used to create the demographic groups. If not, then antibody_data is used.

Usage

get_demographic_groups(
  par_tab,
  antibody_data,
  timevarying_demographics = NULL,
  demographic_groups = NULL
)

Arguments

par_tab

the parameter table. See example_par_tab for an example.

antibody_data

the antibody data data frame. See example_antibody_data for an example.

timevarying_demographics

optional. a data frame of timevarying demographics, with columns individual, time and any stratification variables. If NULL, then uses antibody_data

demographic_groups

optional. a data frame of demographic groups, with columns for each demographic group and rows for each unique combination of demographic groups. If NULL, then create this from antibody_data or timevarying_demographics

Value

a list with three entries: 1) the names of the demographic groups used, 2) a data frame of demographic groups, with each row a unique combination of demographic groups, and 3) a boolean indicating whether timevarying demographics were used


adamkucharski/serosolver documentation built on June 12, 2025, 9:08 a.m.