This function calculates the summand of the overall log likelihood that changes when the status of one patient is updated. The constant summands are ignored for efficiency.
1 2 3 | log_lik_overall(admissions, discharges, colonisations, statuses, TP_no_abx,
TP_abx, test_results_negative, antibiotics, beta, b, s, rho_1, rho_2,
nPatient, phi, pt)
|
admissions |
a vector with days of admission of the patients. |
discharges |
a vector with days of discharge of the patients. |
colonisations |
a vector with days of colonisation of the patients. |
statuses |
a vector the statuses on discharge of the patients |
TP_no_abx |
the number of true positive tests without antibiotics. |
TP_abx |
the number of true positive tests with antibiotics. |
test_results_negative |
a matrix where each row corresponds to a patient and the entries correspond to a day with a negative test result. |
antibiotics |
a matrix where each row corresponds to a patient and the entries correspond to a day when antibiotics were administered. |
beta |
the transmission rate. |
b |
the multiplicative effect of antibiotics on transmissibility. |
s |
the multiplicative effect of antibiotics on susceptibility. |
rho_1 |
the test sensitivity without antibiotics (baseline). |
rho_2 |
the test sensitivity with antibiotics. |
nPatient |
the total number of patients. |
phi |
the probability of a patient beeing colonised on admission. |
pt |
the patient for which the overall log likelihood is computed. |
beta |
the transmission rate. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.