Title: | Semi-Parametric Joint Modeling of Longitudinal and Survival Data |
---|---|
Description: | Maximum likelihood estimation for the semi-parametric joint modeling of competing risks and longitudinal data applying customized linear scan algorithms, proposed by Li and colleagues (2022) <doi:10.1155/2022/1362913>. The time-to-event data is modelled using a (cause-specific) Cox proportional hazards regression model with time-fixed covariates. The longitudinal outcome is modelled using a linear mixed effects model. The association is captured by shared random effects. The model is estimated using an Expectation Maximization algorithm. |
Authors: | Shanpeng Li [aut, cre], Ning Li [ctb], Hong Wang [ctb], Jin Zhou [ctb], Hua Zhou [ctb], Gang Li [ctb] |
Maintainer: | Shanpeng Li <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.4.2 |
Built: | 2024-10-26 04:42:18 UTC |
Source: | https://github.com/shanpengli/fastjm |
Performs a likelihood ratio test between two nested joint models.
## S3 method for class 'jmcs' anova(object, object2, digits = 4, ...)
## S3 method for class 'jmcs' anova(object, object2, digits = 4, ...)
object |
an object inheriting from class |
object2 |
an object inheriting from class |
digits |
the number of significant digits to use when printing. Default is 4. |
... |
further arguments passed to or from other methods. |
A table to summarize the likelihood ratio test.
Shanpeng Li [email protected]
# Fit a joint model fit <- jmcs(ydata = ydata, cdata = cdata, long.formula = response ~ time + x1, surv.formula = Surv(surv, failure_type) ~ x1 + x2, random = ~ time| ID) fit2 <- 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) anova(fit, fit2)
# Fit a joint model fit <- jmcs(ydata = ydata, cdata = cdata, long.formula = response ~ time + x1, surv.formula = Surv(surv, failure_type) ~ x1 + x2, random = ~ time| ID) fit2 <- 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) anova(fit, fit2)
Time-dependent AUC for joint models
AUCjmcs( seed = 100, object, landmark.time = NULL, horizon.time = NULL, obs.time = NULL, method = c("Laplace", "GH"), quadpoint = NULL, maxiter = NULL, n.cv = 3, survinitial = TRUE, ... )
AUCjmcs( seed = 100, object, landmark.time = NULL, horizon.time = NULL, obs.time = NULL, method = c("Laplace", "GH"), quadpoint = NULL, maxiter = NULL, n.cv = 3, survinitial = TRUE, ... )
seed |
a numeric value of seed to be specified for cross validation. |
object |
object of class 'jmcs'. |
landmark.time |
a numeric value of time for which dynamic prediction starts.. |
horizon.time |
a numeric vector of future times for which predicted probabilities are to be computed. |
obs.time |
a character string of specifying a longitudinal time variable. |
method |
estimation method for predicted probabilities. If |
quadpoint |
the number of pseudo-adaptive Gauss-Hermite quadrature points if |
maxiter |
the maximum number of iterations of the EM algorithm that the function will perform. Default is 10000. |
n.cv |
number of folds for cross validation. Default is 3. |
survinitial |
Fit a Cox model to obtain initial values of the parameter estimates. Default is TRUE. |
... |
Further arguments passed to or from other methods. |
a list of matrices with conditional probabilities for subjects.
Shanpeng Li [email protected]
The cdata
data frame has 1000 rows and 7 columns.
data(cdata)
data(cdata)
This data frame contains the following columns:
ID
patient identifier.
surv
event time.
failure_type
event indicator. 0
denotes censoring, 1
risk 1,
and 2
risk 2.
x1
continuous variable.
x2
treatment indicator. 0
denotes the placebo group and 1
the treatment group.
gender
gender indicator.
race
race indicator.
Extract fitted values for joint models.
## S3 method for class 'jmcs' fitted( object, type = c("Marginal", "Subject"), process = c("Longitudinal", "Event"), ... )
## S3 method for class 'jmcs' fitted( object, type = c("Marginal", "Subject"), process = c("Longitudinal", "Event"), ... )
object |
an object inheriting from class |
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. |
a numeric vector of fitted values.
Shanpeng Li [email protected]
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"))
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"))
Extracts the fixed effects for a fitted joint model.
fixef(object, process = c("Longitudinal", "Event"), ...)
fixef(object, process = c("Longitudinal", "Event"), ...)
object |
an object inheriting from class |
process |
for which sub-model to extract the estimated coefficients. |
... |
further arguments passed to or from other methods. |
A numeric vector or a list of the estimated parameters for the fitted model.
Shanpeng Li [email protected]
# a joint model fit 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) # fixed effects for the longitudinal process fixef(fit, process = "Longitudinal") # fixed effects for the event process fixef(fit, process = "Event")
# a joint model fit 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) # fixed effects for the longitudinal process fixef(fit, process = "Longitudinal") # fixed effects for the event process fixef(fit, process = "Event")
Joint modeling of longitudinal continuous data and competing risks
jmcs( ydata, cdata, long.formula, random = NULL, surv.formula, REML = TRUE, quadpoint = NULL, maxiter = 10000, print.para = FALSE, survinitial = TRUE, tol = 1e-04, method = "pseudo-adaptive", opt = "nlminb" )
jmcs( ydata, cdata, long.formula, random = NULL, surv.formula, REML = TRUE, quadpoint = NULL, maxiter = 10000, print.para = FALSE, survinitial = TRUE, tol = 1e-04, method = "pseudo-adaptive", opt = "nlminb" )
ydata |
a longitudinal data frame in long format. |
cdata |
a survival data frame with competing risks or single failure. Each subject has one data entry. |
long.formula |
a formula object with the response variable and fixed effects covariates to be included in the longitudinal sub-model. |
random |
a one-sided formula object describing the random effects part of the longitudinal sub-model.
For example, fitting a random intercept model takes the form |
surv.formula |
a formula object with the survival time, event indicator, and the covariates to be included in the survival sub-model. |
REML |
a logic object that indicates the use of REML estimator. Default is TRUE. |
quadpoint |
the number of pseudo-adaptive Gauss-Hermite quadrature points. to be chosen for numerical integration. Default is 6 which produces stable estimates in most dataframes. |
maxiter |
the maximum number of iterations of the EM algorithm that the function will perform. Default is 10000. |
print.para |
Print detailed information of each iteration. Default is FALSE, i.e., not to print the iteration details. |
survinitial |
Fit a Cox model to obtain initial values of the parameter estimates. Default is TRUE. |
tol |
Tolerance parameter. Default is 0.0001. |
method |
Method for proceeding numerical integration in the E-step. Default is pseudo-adaptive. |
opt |
Optimization method to fit a linear mixed effects model, either |
Object of class jmcs
with elements
beta |
the vector of fixed effects for the linear mixed effects model. |
gamma1 |
the vector of fixed effects for type 1 failure for the survival model. |
gamma2 |
the vector of fixed effects for type 2 failure for the survival model.
Valid only if |
nu1 |
the vector of association parameter(s) for type 1 failure. |
nu2 |
the vector of association parameter(s) for type 2 failure. Valid only if |
H01 |
the matrix that collects baseline hazards evaluated at each uncensored event time for type 1 failure. The first column denotes uncensored event times, the second column the number of events, and the third columns the hazards obtained by Breslow estimator. |
H02 |
the matrix that collects baseline hazards evaluated at each uncensored event time for type 2 failure.
The data structure is the same as |
Sig |
the variance-covariance matrix of the random effects. |
sigma |
the variance of the measurement error for the linear mixed effects model. |
iter |
the total number of iterations until convergence. |
convergence |
convergence identifier: 1 corresponds to successful convergence, whereas 0 to a problem (i.e., when 0, usually more iterations are required). |
vcov |
the variance-covariance matrix of all the fixed effects for both models. |
sebeta |
the standard error of |
segamma1 |
the standard error of |
segamma2 |
the standard error of |
senu1 |
the standard error of |
senu2 |
the standard error of |
seSig |
the vector of standard errors of covariance of random effects. |
sesigma |
the standard error of variance of measurement error for the linear mixed effects model. |
loglike |
the log-likelihood value. |
fitted |
a list with the fitted values:
|
fittedSurv |
the estimated survival rate evaluated at each uncensored event time. |
FUNB |
the estimated random effects for each subject. |
CompetingRisk |
logical value; TRUE if a competing event are accounted for. |
quadpoint |
the number of Gauss Hermite quadrature points used for numerical integration. |
ydata |
the input longitudinal dataset for fitting a joint model.
It has been re-ordered in accordance with descending observation times in |
cdata |
the input survival dataset for fitting a joint model. It has been re-ordered in accordance with descending observation times. |
PropEventType |
a frequency table of number of events. |
LongitudinalSubmodel |
the component of the |
SurvivalSubmodel |
the component of the |
random |
the component of the |
call |
the matched call. |
Quad.method |
the quadrature rule used for integration.
If pseudo-adaptive quadrature rule is used, then return |
id |
the grouping vector for the longitudinal outcome. |
Shanpeng Li [email protected]
ranef, fixef, fitted.jmcs,
residuals.jmcs, survfitjmcs, plot.jmcs,
vcov.jmcs
require(FastJM) require(survival) # Load a simulated longitudinal dataset data(ydata) # Load a simulated survival dataset with two competing events data(cdata) # Fit a joint model 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) fit # Extract the parameter estimates of longitudinal sub-model fixed effects fixef(fit, process = "Longitudinal") # Extract the parameter estimates of survival sub-model fixed effects fixef(fit, process = "Event") # Obtain the random effects estimates for first 6 subjects head(ranef(fit)) # Obtain the variance-covariance matrix of all parameter estimates vcov(fit) # Obtain the result summaries of the joint model fit summary(fit, process = "Longitudinal") summary(fit, process = "Event") # Prediction of cumulative incidence for competing risks data # Predict the conditional probabilities for two patients who are alive (censored) ND <- ydata[ydata$ID %in% c(419, 218), ] ID <- unique(ND$ID) NDc <- cdata[cdata$ID %in% ID, ] survfit <- survfitjmcs(fit, ynewdata = ND, cnewdata = NDc, u = seq(3, 4.8, by = 0.2), method = "GH", obs.time = "time") survfit PE <- PEjmcs(fit, seed = 100, landmark.time = 3, horizon.time = c(3.6, 4, 4.4), obs.time = "time", method = "GH", quadpoint = NULL, maxiter = 1000, n.cv = 3, survinitial = TRUE) Brier <- summary(PE, error = "Brier") Brier MAEQ <- MAEQjmcs(fit, seed = 100, landmark.time = 3, horizon.time = c(3.6, 4, 4.4), obs.time = "time", method = "GH", quadpoint = NULL, maxiter = 1000, n.cv = 3, survinitial = TRUE) APE <- summary(MAEQ, digits = 3) APE ## evaluate prediction accuracy of fitted joint model using cross-validated mean AUC AUC <- AUCjmcs(fit, seed = 100, landmark.time = 3, horizon.time = c(3.6, 4, 4.4), obs.time = "time", method = "GH", quadpoint = NULL, maxiter = 1000, n.cv = 3) summary(AUC, digits = 3)
require(FastJM) require(survival) # Load a simulated longitudinal dataset data(ydata) # Load a simulated survival dataset with two competing events data(cdata) # Fit a joint model 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) fit # Extract the parameter estimates of longitudinal sub-model fixed effects fixef(fit, process = "Longitudinal") # Extract the parameter estimates of survival sub-model fixed effects fixef(fit, process = "Event") # Obtain the random effects estimates for first 6 subjects head(ranef(fit)) # Obtain the variance-covariance matrix of all parameter estimates vcov(fit) # Obtain the result summaries of the joint model fit summary(fit, process = "Longitudinal") summary(fit, process = "Event") # Prediction of cumulative incidence for competing risks data # Predict the conditional probabilities for two patients who are alive (censored) ND <- ydata[ydata$ID %in% c(419, 218), ] ID <- unique(ND$ID) NDc <- cdata[cdata$ID %in% ID, ] survfit <- survfitjmcs(fit, ynewdata = ND, cnewdata = NDc, u = seq(3, 4.8, by = 0.2), method = "GH", obs.time = "time") survfit PE <- PEjmcs(fit, seed = 100, landmark.time = 3, horizon.time = c(3.6, 4, 4.4), obs.time = "time", method = "GH", quadpoint = NULL, maxiter = 1000, n.cv = 3, survinitial = TRUE) Brier <- summary(PE, error = "Brier") Brier MAEQ <- MAEQjmcs(fit, seed = 100, landmark.time = 3, horizon.time = c(3.6, 4, 4.4), obs.time = "time", method = "GH", quadpoint = NULL, maxiter = 1000, n.cv = 3, survinitial = TRUE) APE <- summary(MAEQ, digits = 3) APE ## evaluate prediction accuracy of fitted joint model using cross-validated mean AUC AUC <- AUCjmcs(fit, seed = 100, landmark.time = 3, horizon.time = c(3.6, 4, 4.4), obs.time = "time", method = "GH", quadpoint = NULL, maxiter = 1000, n.cv = 3) summary(AUC, digits = 3)
A metric of prediction accuracy of joint model by comparing the predicted risk with the empirical risks stratified on different predicted risk group.
MAEQjmcs( seed = 100, object, landmark.time = NULL, horizon.time = NULL, obs.time = NULL, method = c("Laplace", "GH"), quadpoint = NULL, maxiter = 1000, n.cv = 3, survinitial = TRUE, quantile.width = 0.25, ... )
MAEQjmcs( seed = 100, object, landmark.time = NULL, horizon.time = NULL, obs.time = NULL, method = c("Laplace", "GH"), quadpoint = NULL, maxiter = 1000, n.cv = 3, survinitial = TRUE, quantile.width = 0.25, ... )
seed |
a numeric value of seed to be specified for cross validation. |
object |
object of class 'jmcs'. |
landmark.time |
a numeric value of time for which dynamic prediction starts.. |
horizon.time |
a numeric vector of future times for which predicted probabilities are to be computed. |
obs.time |
a character string of specifying a longitudinal time variable. |
method |
estimation method for predicted probabilities. If |
quadpoint |
the number of pseudo-adaptive Gauss-Hermite quadrature points if |
maxiter |
the maximum number of iterations of the EM algorithm that the function will perform. Default is 10000. |
n.cv |
number of folds for cross validation. Default is 3. |
survinitial |
Fit a Cox model to obtain initial values of the parameter estimates. Default is TRUE. |
quantile.width |
a numeric value of width of quantile to be specified. Default is 0.25. |
... |
Further arguments passed to or from other methods. |
a list of matrices with conditional probabilities for subjects.
Shanpeng Li [email protected]
A metric of prediction accuracy of joint model by comparing the predicted risk with the counting process.
PEjmcs( object, seed = 100, landmark.time = NULL, horizon.time = NULL, obs.time = NULL, method = c("Laplace", "GH"), quadpoint = NULL, maxiter = NULL, n.cv = 3, survinitial = TRUE, ... )
PEjmcs( object, seed = 100, landmark.time = NULL, horizon.time = NULL, obs.time = NULL, method = c("Laplace", "GH"), quadpoint = NULL, maxiter = NULL, n.cv = 3, survinitial = TRUE, ... )
object |
object of class 'jmcs'. |
seed |
a numeric value of seed to be specified for cross validation. |
landmark.time |
a numeric value of time for which dynamic prediction starts.. |
horizon.time |
a numeric vector of future times for which predicted probabilities are to be computed. |
obs.time |
a character string of specifying a longitudinal time variable. |
method |
estimation method for predicted probabilities. If |
quadpoint |
the number of pseudo-adaptive Gauss-Hermite quadrature points if |
maxiter |
the maximum number of iterations of the EM algorithm that the function will perform. Default is 10000. |
n.cv |
number of folds for cross validation. Default is 3. |
survinitial |
Fit a Cox model to obtain initial values of the parameter estimates. Default is TRUE. |
... |
Further arguments passed to or from other methods. |
a list of matrices with conditional probabilities for subjects.
Shanpeng Li [email protected]
Plot Diagnostics for Joint Models.
## S3 method for class 'jmcs' plot(x, add.smooth = getOption("add.smooth"), ...)
## S3 method for class 'jmcs' plot(x, add.smooth = getOption("add.smooth"), ...)
x |
x of class 'jmcs'. |
add.smooth |
logical; if |
... |
further arguments passed to or from other methods. |
The first two plots are longitudinal sub-model diagnostics and the last two are marginal survival function and marginal cumulative hazard.
Shanpeng Li [email protected]
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) oldpar <- par(mfrow = c(2, 2)) plot(fit) par(oldpar)
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) oldpar <- par(mfrow = c(2, 2)) plot(fit) par(oldpar)
Print jmcs
## S3 method for class 'jmcs' print(x, digits = 4, ...)
## S3 method for class 'jmcs' print(x, digits = 4, ...)
x |
Object of class 'jmcs'. |
digits |
the number of significant digits to use when printing. |
... |
Further arguments passed to or from other methods. |
a summary of data, joint model, log likelihood, and parameter estimates.
Shanpeng Li [email protected]
Print survfitjmcs
## S3 method for class 'survfitjmcs' print(x, ...)
## S3 method for class 'survfitjmcs' print(x, ...)
x |
x of class 'survfitjmcs'. |
... |
Further arguments passed to or from other methods. |
a list of matrices with conditional probabilities for subjects.
Shanpeng Li [email protected]
Extracts the posterior mean of the random effects for a fitted joint model.
ranef(object, ...)
ranef(object, ...)
object |
an object inheriting from class |
... |
further arguments passed to or from other methods. |
a matrix of random effects estimates.
Shanpeng Li [email protected]
# a joint model fit 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) # extract random effects estimates head(ranef(fit))
# a joint model fit 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) # extract random effects estimates head(ranef(fit))
Extract residuals for joint models.
## S3 method for class 'jmcs' residuals(object, type = c("Marginal", "Subject"), ...)
## S3 method for class 'jmcs' residuals(object, type = c("Marginal", "Subject"), ...)
object |
an object inheriting from class |
type |
what type of residuals to calculate. |
... |
further arguments passed to or from other methods. |
a vector of residuals of the longitudinal sub-model.
Shanpeng Li [email protected]
# a joint model fit 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) # residuals of the longitudinal sub-model head(cbind( "Marg" = residuals(fit, type = "Marginal"), "Subj" = residuals(fit, type = "Subject") ))
# a joint model fit 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) # residuals of the longitudinal sub-model head(cbind( "Marg" = residuals(fit, type = "Marginal"), "Subj" = residuals(fit, type = "Subject") ))
Produce result summaries of a joint model fit.
## S3 method for class 'jmcs' summary(object, process = c("Longitudinal", "Event"), digits = 4, ...)
## S3 method for class 'jmcs' summary(object, process = c("Longitudinal", "Event"), digits = 4, ...)
object |
an object inheriting from class |
process |
for which model (i.e., longitudinal model or survival model) to extract the estimated coefficients. |
digits |
the number of significant digits to use when printing. Default is 4. |
... |
further arguments passed to or from other methods. |
A table to summarize the model results.
Print AUCjmcs
## S3 method for class 'AUCjmcs' summary(object, digits = 4, ...)
## S3 method for class 'AUCjmcs' summary(object, digits = 4, ...)
object |
object of class 'AUCjmcs'. |
digits |
number of digits of decimal to be printed. |
... |
Further arguments passed to or from other methods. |
a list of matrices with conditional probabilities for subjects.
Shanpeng Li [email protected]
Print MAEQjmcs
## S3 method for class 'MAEQjmcs' summary(object, digits = 3, ...)
## S3 method for class 'MAEQjmcs' summary(object, digits = 3, ...)
object |
object of class 'MAEQjmcs'. |
digits |
number of decimal points to be rounded. |
... |
Further arguments passed to or from other methods. |
a list of matrices with conditional probabilities for subjects.
Shanpeng Li [email protected]
Print PEjmcs
## S3 method for class 'PEjmcs' summary(object, error = c("MAE", "Brier"), ...)
## S3 method for class 'PEjmcs' summary(object, error = c("MAE", "Brier"), ...)
object |
object of class 'PEjmcs'. |
error |
a character string that specifies the loss function. |
... |
Further arguments passed to or from other methods. |
a list of matrices with conditional probabilities for subjects.
Shanpeng Li [email protected]
This function computes the conditional probability of surviving later times than the last observed time for which a longitudinal measurement was available.
survfitjmcs( object, seed = 100, ynewdata = NULL, cnewdata = NULL, u = NULL, Last.time = NULL, obs.time = NULL, method = c("Laplace", "GH"), quadpoint = NULL, ... )
survfitjmcs( object, seed = 100, ynewdata = NULL, cnewdata = NULL, u = NULL, Last.time = NULL, obs.time = NULL, method = c("Laplace", "GH"), quadpoint = NULL, ... )
object |
an object inheriting from class |
seed |
a random seed number to proceed Monte Carlo simulation. 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. |
method |
a character string specifying the type of probability approximation; if |
quadpoint |
number of quadrature points used for estimating conditional probabilities
when |
... |
further arguments passed to or from other methods. |
a list of matrices with conditional probabilities for subjects.
Shanpeng Li [email protected]
Extract variance-covariance matrix for joint models.
## S3 method for class 'jmcs' vcov(object, ...)
## S3 method for class 'jmcs' vcov(object, ...)
object |
an object inheriting from class |
... |
further arguments passed to or from other methods. |
a matrix of variance covariance of all parameter estimates.
Shanpeng Li [email protected]
The ydata
data frame has 3067 rows and 6 columns.
data(ydata)
data(ydata)
This data frame contains the following columns:
ID
patient identifier.
response
response variable.
time
visit time.
x1
treatment indicator. 0
denotes the placebo group and 1
the treatment group.
gender
gender indicator.
race
race indicator.