fitted {FastJM}R Documentation

Fitted values for joint models

Description

Extract fitted values for joint models.

Usage

## S3 method for class 'jmcs'
fitted(
  object,
  type = c("Marginal", "Subject"),
  process = c("Longitudinal", "Event"),
  ...
)

Arguments

object

an object inheriting from class jmcs.

type

for which type of fitted values to calculate.

process

for which sub-model to calculate the fitted values.

...

further arguments passed to or from other methods.

Value

a numeric vector of fitted values.

Author(s)

Shanpeng Li lishanpeng0913@ucla.edu

Examples


fit <- jmcs(ydata = ydata, cdata = cdata, 
            long.formula = response ~ time + gender + x1 + race, 
            surv.formula = Surv(surv, failure_type) ~ x1 + gender + x2 + race, 
            random =  ~ time| ID)

# fitted for the longitudinal process
head(cbind(
  "Marg" = fitted(fit, type = "Marginal", process = "Longitudinal"), 
  "Subj" = fitted(fit, type = "Subject", process = "Longitudinal")
))
# fitted for the levent process - marginal survival function
head(fitted(fit, type = "Marginal", process = "Event"))



[Package FastJM version 1.4.2 Index]