Learn R Programming

FastJM (version 1.7.0)

survfitJM.JMMLSM: Dynamic predictions from fitted joint models

Description

survfitJM() is the recommended user-facing function for dynamic prediction from fitted FastJM joint models. It dispatches automatically according to the class of the fitted model object.

Usage

# S3 method for JMMLSM
survfitJM(
  object,
  seed = 100,
  ynewdata = NULL,
  cnewdata = NULL,
  u = NULL,
  Last.time = NULL,
  obs.time = NULL,
  LOCF = FALSE,
  LOCFcovariate = NULL,
  clongdata = NULL,
  method = c("Laplace", "GH"),
  quadpoint = NULL,
  ...
)

survfitJM(object, ...)

# S3 method for jmcs survfitJM( object, seed = 100, ynewdata = NULL, cnewdata = NULL, u = NULL, Last.time = NULL, obs.time = NULL, LOCF = FALSE, LOCFcovariate = NULL, clongdata = NULL, method = c("Laplace", "GH"), quadpoint = NULL, ... )

# S3 method for mvjmcs survfitJM( object, seed = 100, ynewdata = NULL, cnewdata = NULL, u = NULL, Last.time = NULL, obs.time = NULL, LOCF = FALSE, LOCFcovariate = NULL, clongdata = NULL, ... )

Value

An object containing dynamic prediction results. The exact structure depends on the fitted model class.

Arguments

object

A fitted joint model object returned by jmcs(), JMMLSM(), or mvjmcs().

seed

a random seed number to proceed non-parametric bootstrap. Default is 100.

ynewdata

a data frame that contains the longitudinal and covariate information for the subjects for which prediction of survival probabilities is required.

cnewdata

a data frame that contains the survival and covariate information for the subjects for which prediction of survival probabilities is required.

u

a numeric vector of times for which prediction survival probabilities are to be computed.

Last.time

a numeric vector or character string. This specifies the known time at which each of the subjects in cnewdata was known to be alive. If NULL, then this is automatically taken as the survival time of each subject. If a numeric vector, then it is assumed to be greater than or equals to the last available longitudinal time point for each subject. If a character string, then it should be a variable in cnewdata.

obs.time

a character string of specifying a longitudinal time variable in ynewdata.

LOCF

a logical value to indicate whether the last-observation-carried-forward approach applies to prediction. If TRUE, then LOCFcovariate and clongdata must be specified to indicate which time-dependent survival covariates are included for dynamic prediction. Default is FALSE.

LOCFcovariate

a vector of string with time-dependent survival covariates if LOCF = TRUE. Default is NULL.

clongdata

a long format data frame where time-dependent survival covariates are incorporated. Default is NULL.

method

a character string specifying the type of probability approximation; if Laplace, then a first order estimator is computed. If GH, then the standard Gauss-Hermite quadrature is used instead.

quadpoint

number of quadrature points used for estimating conditional probabilities when method = "GH". Default is NULL. If method = "GH", then 15 is used.

...

Additional arguments passed to the model-specific prediction method.

Details

This function is an S3 generic. Depending on the class of object, it dispatches to the corresponding model-specific prediction routine: survfitJM.jmcs(), survfitJM.JMMLSM(), or survfitJM.mvjmcs().

The model-specific functions survfitjmcs(), survfitJMMLSM(), and survfitmvjmcs() are retained as lower-level functions for backward compatibility.

See Also

jmcs, JMMLSM, mvjmcs, survfitjmcs, survfitJMMLSM, survfitmvjmcs