survfitJM(object, newdata, idVar = "id", simulate = TRUE, survTimes = NULL,
last.time = NULL, M = 200, CI.levels = c(0.025, 0.975), scale = 1.6)
jointModel
.newdata
that identifies the different subjects.TRUE
, a Monte Carlo approach is used to estimate survival probabilities. If FALSE
,
a first order estimator is used instead. (see Details)newdat
was known to be alive. If NULL
, then this is automatically taken as the last time each subject provided a longitudinsurvfitJM
with components:survTimes
argument.scale
argument.object
), and a history of longitudinal responses
$\tilde{y}_i(t) = {y_i(s), 0 \leq s \leq t}$ and a covariates vector $x_i$ (stored in
newdata
), this function provides estimates of $Pr(T_i > u | T_i > t, \tilde{y}_i(t), x_i)$, i.e., the conditional probability of surviving time $u$ given that subject $i$, with covariate information
$x_i$, has survived up to time $t$ and has provided longitudinal the measurements $\tilde{y}_i(t)$.
To estimate $Pr(T_i > u | T_i > t, \tilde{y}_i(t), x_i)$ and if simulate = TRUE
, a
Monte Carlo procedure is followed with the following steps:
[object Object],[object Object],[object Object],[object Object]
Based on the M
estimates of the conditional probabilities, we compute useful summary statistics, such as their mean, median, and
quantiles (to produce a confidence interval).
If simulate = FALSE
, then survival probabilities are estimated using the formula $$Pr(T_i > u | T_i > t, \hat{b}_i, x_i;
\hat{\theta}),$$ where $\hat{\theta}$ denotes the MLEs as above, and $\hat{b}_i$
denotes the empirical Bayes estimates.jointModel
, plot.survfitJM
# linear mixed model fit
fitLME <- lme(sqrt(CD4) ~ obstime + obstime:drug,
random = ~ 1 | patient, data = aids)
# cox model fit
fitCOX <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)
# joint model fit
fitJOINT <- jointModel(fitLME, fitCOX,
timeVar = "obstime", method = "weibull-PH-GH")
# sample of the patients who are still alive
ND <- aids[aids$patient == "141", ]
ss <- survfitJM(fitJOINT, newdata = ND, idVar = "patient", M = 50)
ss
Run the code above in your browser using DataLab