abkineticsModel.Rd
This data format represents information about the antibody kinetics
A list with the following columns:
Unique identifier for each exposure type.
Description of the model using the makeModel
and addAbkineticsModel
functions.
Description of the prior distribution using the addPrior
function.
Add more data about this model here.
makeModel
, addAbkineticsModel
, for related functions.
# Example usage. This describes the antibody kinetics for a SARS-CoV-2 delta wave using IgG data. First define the antibody kinetics function:
infSerumKinetics <- function(titre_est, timeSince, pars) {
a <- pars[1]
b <- pars[2]
c <- pars[3]
if (timeSince < 14) {
titre_est <- titre_est + (log(exp(a) + exp(c)) * (timeSince) / 14);
} else {
titre_est <- titre_est + (log(exp(a) * exp(-b/10 * (timeSince - 14))) + exp(c));
}
titre_est
}
# Now define the antibody kinetics function in the format required for the rjmc package:
abkineticsModel <- list(
names = c("delta"),
model = makeModel(
addAbkineticsModel("IgG", "delta", TRUE, c("a_d", "b_d", "c_d"), infSerumKinetics)
),
prior = dplyr::bind_rows(
addPrior("a_d", -2, 2, "norm", 0, 1), # ab kinetics
addPrior("b_d", 0, 1, "norm", 0.3, 0.05), # ab kinetics
addPrior("c_d", 0, 4, "unif", 0, 4) # ab kinetics
)
)