Fits a smoothing spline through a set of antigenic coordinates, and uses this to predict antigenic coordinates for all potential infection time points

generate_antigenic_map(antigenic_distances, buckets = 1, spar = 0.3)

Arguments

antigenic_distances

a data frame of antigenic coordinates, with columns labelled X, Y and Strain for x coord, y coord and Strain label respectively. Strain labels should be in the virus_key vector which is at the top of this source code. See example_antigenic_map

buckets

the number of epochs per year. 1 means that each year has 1 strain; 12 means that each year has 12 strains (monthly resolution)

spar

to be passed to smooth.spline

Value

a fitted antigenic map

See also

Examples

if (FALSE) { antigenic_coords_path <- system.file("extdata", "fonville_map_approx.csv", package = "serosolver") antigenic_coords <- read.csv(antigenic_coords_path, stringsAsFactors=FALSE) antigenic_map <- generate_antigenic_map(antigenic_coords, 1) }