Computes NBBP likelihood surface for given data at given grid

compute_likelihood_surface(
  all_outbreaks,
  r_grid,
  k_grid,
  censor_geq = rep(NA, length(all_outbreaks)),
  condition_geq = rep(NA, length(all_outbreaks))
)

Arguments

all_outbreaks

vector containing the size of each outbreak, including the index case

r_grid

vector of values of R at which the likelihood is to be evaluated.

k_grid

vector of values of k at which the likelihood is to be evaluated.

censor_geq

optional, possibly per-chain, censoring, see details.

condition_geq

optional, possibly per-chain, conditioning on minimum observed chain size, see details in fit_nbbp_homogenous_bayes.

Value

a long-form tibble of R, k, log-likelihood