get_likelihood_fail: Get Likelihood Fail

get_likelihood_failR Documentation

Get Likelihood Fail

Description

Get the parameter estimates from a MMM and combine with data to return contributions to the likelihood at observed time points for non failures

Usage

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,
  ...
)

Arguments

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

Value

A list with the likelihood contributions for each subject (rows) at every time point (cols).


JanvandenBrand/jmmm documentation built on May 30, 2022, 9:37 a.m.