plot_antibody_data: Plot raw data

View source: R/plots_other.R

plot_antibody_dataR Documentation

Plot raw data

Description

Plots measured antibody measurements and known infection histories for all individuals, faceted by sample time (multi-antigen panel) or biomarker_id variable (longitudinal single antigen)

Usage

plot_antibody_data(
  antibody_data,
  possible_exposure_times,
  n_indivs,
  infection_histories = NULL,
  study_design = "cross-sectional",
  measurement_ranges = NULL
)

Arguments

antibody_data

the data frame of antibody data

possible_exposure_times

the vector of times at which individuals could be infected

n_indivs

integer of how many individuals to plot, or vector of which individuals to plot

infection_histories

the infection history matrix

study_design

default "cross-sectional" facets by sample time. "longitudinal" gives sample time on the x-axis and colours by 'biomarker_id'

measurement_ranges

data frame or tibble stating for each 'biomarker_group' the 'min_measurement' and 'max_measurement'. If NULL, this is extracted from 'antibody_data'

Value

a ggplot object

See Also

Other infection_history_plots: calculate_infection_history_statistics(), plot_antibody_predictions(), plot_cumulative_infection_histories(), plot_estimated_antibody_model(), plot_individual_number_infections(), plot_infection_history_chains_indiv(), plot_infection_history_chains_time(), plot_model_fits(), plot_posteriors_infhist(), plot_total_number_infections()

Examples

## Not run: 
data(example_antibody_data)
data(example_inf_hist)
data(example_antigenic_map)
possible_exposure_times <- example_antigenic_map$inf_times
plot_antibody_data(example_antibody_data, possible_exposure_times, 5, example_inf_hist)

## End(Not run)

seroanalytics/serosolver documentation built on Dec. 14, 2024, 5:33 a.m.