This function is defined by the user and describes the COP likelihood of the data given the model.

Arguments

inf_status

The infection status of an individual binary (0 or 1).

esttitreExp

The model-estimated titre value at the time of exposure

pars

The fitted parameters needed to calculate the log likelihood. These are defined in the prior entry of the copModel list.

Value

A function that returns the log likelihood value for the COP model.

Details

Add information here.

Author

Your Name

Examples

# Example usage:
copLogLikelihood <- function(inf_status, esttitreExp, params) {
   # COP parameters
   beta0 <- params[1]
   beta1 <- params[2]
   p <- 1.0 / (1.0 + exp(- (beta0 + beta1 * esttitreExp) ) )
   ll <- inf_status * log(p) + (1 - inf_status) * log(1 - p)
   ll
}