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(1, length(all_outbreaks)),
  partial_geq = rep(NA, length(all_outbreaks)),
  partial_probs = rep(NA, length(all_outbreaks)),
  partial_size_max = NA,
  partial_size_max_error = 1e-05
)

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 in fit_nbbp_homogenous_bayes.

condition_geq

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

partial_geq

optional, possibly per-chain, observed chain sizes with binomial sampling, see details in fit_nbbp_homogenous_bayes.

partial_probs

optional, possibly per-chain, probabilities for incomplete observation, see details in fit_nbbp_homogenous_bayes.

partial_size_max

optional maximum size for marginalization of probabilities of incompletely observed chains, see details in fit_nbbp_homogenous_bayes.

partial_size_max_error

optional dynamic probability threshold alternative to `partial_size_max“, see details in fit_nbbp_homogenous_bayes.

Value

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