This data format represents information about the observation model

Format

A list with the following columns:

names

Unique identifier for each biomarker.

model

Description of the model using the makeModel and addObservationalModel functions.

prior

Description of the prior distribution using the add_par_df function.

Details

Add more data about this model here.

See also

makeModel, addObservationalModel, add_par_df, for related functions.

Author

David Hodgson

Examples

# Example usage. This describes the observation model for a SARS-CoV-2 delta wave using IgG data. First define the log likelihood function, which is cauchy, with a LOD at a titre value of log10(40):

obsFunction = function(ll, titre_val, titre_est, pars) {
   if (titre_val <= log10(40)) {
       ll <- ll + pcauchy(log10(40), titre_est, pars[1], log.p = TRUE)
   } else {
       ll <- ll + dcauchy(titre_val, titre_est, pars[1], log = TRUE)
   }
   ll
}
# Now define the observation model in the format required for the rjmc package:

observationalModel <- list(
    names = c("IgG"),
    model = makeModel(addObservationalModel("IgG", c("sigma"), obsFunction)),
    prior = add_par_df("sigma", 0.0001, 4, "unif", 0.0001, 4) # observational model,
)