create_start_level_data: Generate starting antibody levels

create_start_level_dataR Documentation

Generate starting antibody levels

Description

Generates either random or data-driven starting antibody levels for each measured biomarker group/id combination per individual. This is mostly used elsewhere in the serosolver model

Usage

create_start_level_data(
  antibody_data,
  start_level_summary = "min",
  randomize = FALSE
)

Arguments

antibody_data

the antibody data, see example_antibody_data

start_level_summary

string telling the function how to use the 'antibody_data' object to create starting values. One of: min, max, mean, median, full_random.

randomize

if TRUE and data is discretized, then sets the starting level to a random value between floor(x) and floor(x)+1

Value

a list with two objects: 1) a tibble giving the starting antibody level for each individual, biomarker group and biomarker_id combinations; 2) a list of indices (starting at 0) of length matching 'nrow(antibody_data)' giving the index of the antibody starting level to use for each measurement

See Also

Other antigenic_maps: generate_antigenic_map_flexible()

Examples

## Not run: 
create_start_level_data(example_antibody_data,"min",FALSE)
create_start_level_data(example_antibody_data,"min",TRUE)
create_start_level_data(example_antibody_data,"max",FALSE)
create_start_level_data(example_antibody_data,"max",TRUE)
create_start_level_data(example_antibody_data,"mean",FALSE)
create_start_level_data(example_antibody_data,"mean",TRUE)
create_start_level_data(example_antibody_data,"median",FALSE)
create_start_level_data(example_antibody_data,"median",TRUE)
create_start_level_data(example_antibody_data,"other",FALSE)
create_start_level_data(example_antibody_data,"other",TRUE)
create_start_level_data(example_antibody_data,"full_random",FALSE)
create_start_level_data(example_antibody_data,"full_random",TRUE)

## End(Not run)

seroanalytics/serosolver documentation built on July 11, 2024, 4:41 p.m.