library(dplyr)
library(tibble)
# Load cross-sectional data
xs_data <-
sees_pop_data_pk_100
# Load curve parameters and subset for the purposes of this example
curve <-
typhoid_curves_nostrat_100 %>%
filter(antigen_iso %in% c("HlyE_IgA", "HlyE_IgG"))
# Load noise params
cond <- tibble(
antigen_iso = c("HlyE_IgG", "HlyE_IgA"),
nu = c(0.5, 0.5), # Biologic noise (nu)
eps = c(0, 0), # M noise (eps)
y.low = c(1, 1), # low cutoff (llod)
y.high = c(5e6, 5e6)
) # high cutoff (y.high)
# Calculate log-likelihood
ll_AG <- log_likelihood(
pop_data = xs_data,
curve_params = curve,
noise_params = cond,
antigen_isos = c("HlyE_IgG", "HlyE_IgA"),
lambda = 0.1
) %>% print()
Run the code above in your browser using DataLab