likelihood_cpp_wrapper: Wrapper function for the likelihood code, which is written in...

View source: R/likelihoods.R

likelihood_cpp_wrapperR Documentation

Wrapper function for the likelihood code, which is written in C.

Description

This function returns the likelihood of observing a particular set of Ct values conditional on the underlying model parameters.

Usage

likelihood_cpp_wrapper(
  obs_dat,
  ages,
  times,
  pars,
  prob_infection,
  pos_only = FALSE,
  undetectable_counts = NULL
)

Arguments

obs_dat

Tibble of observed data. Contains two columns, t for time of sample collection and ct for the Ct values.

ages

Vector of times since infection.

times

Vector of sample collection times in the data.

pars

Model parameters.

prob_infection

Probability of infection.

pos_only

Flag to only use detectable Ct values. FALSE by default.

undetectable_counts

Number of undetectable Ct samples. NULL by default.

Value

Returns the likelihood.

Author(s)

James Hay, jhay@hsph.harvard.edu

See Also

Other likelihood functions: likelihood_R(), likelihood_detectable(), likelihood_pos_R(), p_a(), prob_detectable_curve(), prop_detectable_single(), prop_detectable()


jameshay218/virosolver documentation built on April 17, 2025, 2:57 p.m.