# \donttest{
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"))
# }
Run the code above in your browser using DataLab