get_likelihood_fail | R Documentation |
Get the parameter estimates from a MMM and combine with data to return contributions to the likelihood at observed time points for non failures
get_likelihood_fail( data, outcomes, fixed_formula_fail = NULL, random_formula_fail = NULL, time, failure_time, parameters_fail, random_effects_fail, id, landmark, horizon, interval, ... )
data |
data.frame with original data in long format |
outcomes |
a character vector with the labels for the longitudinal outcomes. |
fixed_formula_fail |
a character string with lme4 style formula for the fixed effects |
random_formula_fail |
a character string with lme4 style formula for the random effects |
time |
a character string with the label for the follow-up time variable |
failure_time |
a character string with the label for the failure time variable |
parameters_fail |
a data.frame with the parameter labels and estimates returned by mmm_model() |
random_effects_fail |
The random effects sampled from a multivariate normal distribution (see MASS::mvrnorm) |
id |
a character string with subject identifier |
landmark |
the landmark time until which data is available. |
horizon |
the prediction horizon |
interval |
the intervals at which predictions are to be made |
A list with the likelihood contributions for each subject (rows) at every time point (cols).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.