tvEPCE: Expected Predictive Cross Entropy for Dynamic Predictions...

tvEPCER Documentation

Expected Predictive Cross Entropy for Dynamic Predictions under Right-Censored Data

Description

Computes estimates of the expected predictive cross entropy (EPCE) at a specified horizon time (Thoriz), using longitudinal information available up to a given starting time point (Tstart). The function supports joint models and provides the model-based estimation method.

Usage

tvEPCE(object, newdata, Tstart, Thoriz = NULL, Dt = NULL,
    eps = 0.001, model_weights = NULL, eventData_fun = NULL,
    parallel = c("snow", "multicore"),
    cores = parallelly::availableCores(omit = 1L), ...)

Arguments

object

an object inheriting from class jm. It can also be a library of joint models.

newdata

a data.frame that contains the longitudinal and covariate information for the subjects for which prediction of survival probabilities is required. The names of the variables in this data.frame must be the same as in the data.frames that were used to fit the linear mixed effects and the event process model that were supplied as the two first argument of jm.

Tstart

numeric scalar denoting the time point up to which longitudinal information is to be used to derive predictions.

Thoriz

numeric scalar denoting the time point for which a prediction of the survival status is of interest; Thoriz must be later than Tstart and either Dt or Thoriz must be specified. If Thoriz is NULL is set equal to Tstart + Dt.

Dt

numeric scalar denoting the length of the time interval of prediction; either Dt or Thoriz must be specified.

eps

numeric scalar used in the approximation of the hazard function in the expected predictive cross-entropy.

model_weights

a numeric vector of weights to combine predictions when object is a list of joint models of class "jmList".

eventData_fun

a function that takes as input the newdata and produces the dataset used for the event process model. This is useful when, for example, the event process model contains other time-varying covariates. It is important that this function does not alter the ordering of the subjects in newdata.

parallel

character string; what type of parallel computing to use.

cores

integer denoting the number of cores to be used when a library of joint models has been provided in object. If cores = 1, no parallel computing is used.

...

additional arguments passed to predict.jm().

Value

A list of class tvEPCE with components:

EPCE

a numeric scalar denoting the estimated EPCE.

nr

a numeric scalar denoting the number of subjects at risk at time Tstart.

nint

a numeric scalar denoting the number of subjects with an event in (Tstart, Thoriz].

ncens

a numeric scalar denoting the number of subjects with a censored time in (Tstart, Thoriz].

Tstart

a copy of the Tstart argument.

Thoriz

a copy of the Thoriz argument.

type_weights

a copy of the type_weights argument.

classObject

the class of object.

nameObject

the name of object.

Author(s)

Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl

References

Commenges, D., Liquet, B., and Proust-Lima, C. (2012). Choice of prognostic estimators in joint models by estimating differences of expected conditional Kullback-Leibler risks. Biometrics 68, 380–387.

Rizopoulos, D. (2016). The R package JMbayes for fitting joint models for longitudinal and time-to-event data using MCMC. Journal of Statistical Software 72(7), 1–45. doi:10.18637/jss.v072.i07.

Rizopoulos, D. (2012) Joint Models for Longitudinal and Time-to-Event Data: with Applications in R. Boca Raton: Chapman and Hall/CRC.

Rizopoulos, D. (2011). Dynamic predictions and prospective accuracy in joint models for longitudinal and time-to-event data. Biometrics 67, 819–829.

Rizopoulos, D., Molenberghs, G. and Lesaffre, E.M.E.H. (2017). Dynamic predictions with time-dependent covariates in survival analysis using joint modeling and landmarking. Biometrical Journal 59, 1261–1276.

See Also

predict, jm

Examples


# We fit a multivariate joint model
pbc2.id$status2 <- as.numeric(pbc2.id$status != 'alive')
CoxFit <- coxph(Surv(years, status2) ~ sex, data = pbc2.id)
fm1 <- lme(log(serBilir) ~ ns(year, 3) * sex, data = pbc2,
           random = ~ ns(year, 3) | id, control = lmeControl(opt = 'optim'))
fm2 <- lme(prothrombin ~ ns(year, 2) * sex, data = pbc2,
           random = ~ ns(year, 2) | id, control = lmeControl(opt = 'optim'))

jointFit <- jm(CoxFit, list(fm1, fm2), time_var = "year", n_chains = 1L)

# We use landmark time 3 and prediction horizon 4.
tvEPCE(jointFit, newdata = pbc2, Tstart = 3, Dt = 4, cores = 1L)


JMbayes2 documentation built on Nov. 19, 2026, 1:07 a.m.