model_func_group_cpp: Model calculation cpp implementation

Description Usage Arguments Value

View source: R/RcppExports.R

Description

Solves the antibody kinetics model for given parameters. This is a complex function, so should only really be called through create_model_group_func_cpp. Look at this code to really understand what's going on! The key confusing thing is that the length of the vectors has to match the number of rows from the overall parameter table

Usage

1
2
3
4
5
model_func_group_cpp(pars, times, groups, strains, exposure_indices,
  exposure_i_lengths, strain_indices, strain_i_lengths, exposure_times,
  exposure_strains, exposure_next, exposure_measured, exposure_orders,
  exposure_primes, cr_inds, par_inds, par_names, order_inds, par_lengths,
  cr_lengths, version)

Arguments

pars

the vector of model parameters as in parTab

times

the vector of times to solve the model over

groups

IntegerVector of the exposure groups (starting at group 1)

strains

IntegerVector of strains involved in exposures (ie. observed and exposed), starting at 1

exposure_indices

IntegerVector of indices from the exposure table

exposure_i_lengths

IntegerVector of lengths describing the size of blocks in the exposure_indices vector that relate to each exposure group

strain_indices

IntegerVector of indices relating to the exposure table, with contiguous indices for each group and then each strain

strain_i_lengths

IntegerVector of lengths describing the size of blocks in the strain_indices vector that relate to each strain and group

exposure_times

NumericVector infection time of each exposure

exposure_strains

IntegerVector of exposure strains for each exposure

exposure_next

NumericVector specifying the time of the exposure after the current one (for subsetting times)

exposure_measured

IntegerVector of measured strain for each exposure

exposure_orders

IntegerVector of order of exposures

exposure_primes

IntegerVector of whether each exposure was primed or not (for priming modifier)

cr_inds

IntegerVector of indices describing which parTab rows relate to cross reactivity parameters

par_inds

IntegerVector of indices describing which parTab rows relate to model parameters

par_names

CharacterVector names from parTab

order_inds

IntegerVector of indices describing which parTab rows relate to order modifer parameters

par_lengths

IntegerVector of lengths describing the size of blocks in the par_type_ind vector that relate to each exposure type

cr_lengths

IntegerVector of lengths describing the size of blocks in the cr_ind vector that relate to each strain

version

integer indicating which version of the model will be solve. 0 solves the isolated form, and 1 solves the competitive exposure form.

exposure_i_lengths

IntegerVector of lengths describing the size of blocks in the exposure_indices vector that relate to each exposure group

Value

a matrix of antibody kinetic trajectories, with rows for group and then strain


jameshay218/antibodyKinetics documentation built on Nov. 8, 2019, 11 a.m.