Description Usage Arguments Value
View source: R/02-likelihood.R
Take in the parameter vector and the model_data and prepare the data for computing the log-likelihood. The log-likelihood is not permutation-invariant, which is a fancy math way of saying "it matters what order the parameters are in". Inside model_data, you have a named vector of control_days containing each subject's id and the number of control days they have in the data. The data is sorted in ascending order of id, in blocks with all control days followed by the case day. This function splits the parameter vector W into a list, with one item per id, containing the ordered elements of W corresponding to each subjects' control and case days.
1 | prep_data_for_log_lik(W, model_data)
|
W |
Parameter vector. First n elements are eta, then Gamma and beta. |
model_data |
A list of class "cc_modeldata" as returned by model_setup(). |
A list with n items (where n is the number of subjects) containing vectors of the parameters corresponding to each subject's control and case days.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.