Compute likelihood
log_likelihood(
pars,
n,
k,
cap,
infected,
observed,
population,
tested_population,
rng,
n_threads = 1L,
chunk_size = NULL
)
Named list of parameters. Must have elements a_bar
,
a_sigma
, b_bar
, b_sigma
, tmax_bar
, tmax_sigma
,
log_vlmax_bar
, log_vlmax_sigma
number of days to truncate infectiousness at
index of the viral load equation to use
whether to apply a cap to the value of the maximum viral load to avoid NAN errors
Vector of number of simulated infections. Must
have length observed$size_full
(this is checked)
An observed
object, created by prepare_observed
Integer, size of population
Integer, size of tested population
A random number pointer, created by dust::dust_rng_pointer
Number of threads to run on, if openmp available. See dust::dust_openmp_threads for guidance
The size of the chunks to run the parallel jobs in. The optimal value here will vary depending on your problem and number of threads. '5' seems like a good guess.
A single numeric log-likelihood value