likelihood_R: Likelihood (R version)

View source: R/likelihoods.R

likelihood_RR Documentation

Likelihood (R version)

Description

This is the likelihood function written in R code. It returns the likelihood of observing a particular set of Ct values conditional on the underlying model parameters. Despite being slower than the corresponding likelihood function written in C, it more closely matches the written equations in the paper and is retained in the package for didactic purposes.

Usage

likelihood_R(obs_dat, ages, pars, prob_infection)

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.

pars

Model parameters.

prob_infection

Probability of infection.

Value

Returns the likelihood.

Author(s)

James Hay, jhay@hsph.harvard.edu

See Also

Other likelihood functions: likelihood_cpp_wrapper(), 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.