This function takes an immune profile and converts it into a list of efficacies for different products.

convert_efficacies(immune_profile)

Arguments

immune_profile

A list containing immune profile information. It should have the following structure:

vhr

A list with element b representing the efficacy for very high risk (VHR) individuals.

mass

A list with elements b and product representing the efficacy and product type for mass immunization. The product can be "lav", "mab", or "mat".

Value

A list with the following elements:

mab_vhr

Efficacy for monoclonal antibodies (MAB) in very high risk individuals.

mab_mass

Efficacy for monoclonal antibodies (MAB) in mass immunization.

lav_mass

Efficacy for live attenuated vaccines (LAV) in mass immunization.

mat_mass

Efficacy for maternal antibodies (MAT) in mass immunization.

Details

The function initializes the efficacy list with zeros. It then checks if the immune profile contains efficacy values for VHR and mass immunization and updates the efficacy list accordingly.

Examples

immune_profile <- list(
  vhr = list(b = 0.8),
  mass = list(b = 0.6, product = "lav")
)
convert_efficacies(immune_profile)
#> $mab_vhr
#> [1] 0.8
#> 
#> $mab_mass
#> [1] 0
#> 
#> $lav_mass
#> [1] 0.6
#> 
#> $mat_mass
#> [1] 0
#>