jointsep {joineR} | R Documentation |
This generic function fits a joint model with random latent association, building on the formulation described in Wulfsohn and Tsiatis (1997) while allowing for the presence of longitudinal and survival covariates, and two choices for the latent process. This function assumes that each random effect can impact differently upon the hazard of survival.
jointsep(longdat, survdat, longsep = FALSE, survsep = FALSE, gpt, max.it, tol, lgpt, model=c("intslope","quad"))
longdat |
a matrix containing both the longitudinal data and the longitudinal design matrix. The matrix will contain one row per measurement per subject. The matrix is required to have the column form: subject index, longitudinal response, longitudinal measurement time, longitudinal design matrix. |
survdat |
matrix containing both the survival data and the survival design matrix and must contain one row per subject. The matrix is required to be set up in the following column order: subject index, survival time, censoring indicator, survival design matrix. |
longsep |
if TRUE, parameter estimates and log-likelihood from a separate analysis of the longitudinal data (see the 'lme' function in the package nlme for details) are returned. |
survsep |
if TRUE, parameter estimates and log-likelihood from a separate analysis of the survival data using the Cox proportional hazards model are returned (see 'coxph' in the survival package for details). |
gpt |
the number of quadrature points across which the integration with respect to the random effects will be performed. Defaults to gpt=3 which produces stable estimates in most datasets. |
max.it |
the maximum number of iterations which the function will perform. Defaults to max.it=200, though more iterations may be necessary for large, complex data. |
tol |
the tolerance level before convergence of the algorithm is deemed to have occurred. Default value is tol=0.001. |
lgpt |
the number of quadrature points which the log-likelihood is evaluated over following a model fit. This defaults to lgpt=10, though lgpt=3 is often sufficient. |
model |
a character string specifying the type of latent association. This defaults to the intercept and slope version as seen in Wulfsohn and Tsiatis. For a quadratic association, use model="quad". Computing times are commensurate with the type of association structure chosen. |
The function uses an EM algorithm to estimate parameters in the joint model. Starting values are provided by calls to standard R functions 'lme' and 'coxph' for the longitudinal and survival components respectively.
A list containing the parameter estimates from the joint model and, if required, from either or both of the separate analyses. The combined log-likelihood from a separate analysis and the log-likelihood from the joint model are also produced as part of the fit.
Both 'longsep' and 'survsep' ignore any latent association between the longitudinal and survival processes but output can be used to compare with the results from the joint model. If interest is solely in the individual processes then the user should instead make use of the functions 'lme' and 'coxph' mentioned above. For proportional association only, see function 'joint', also in this package.
Pete Philipson (p.m.philipson@ncl.ac.uk)
The general approach and model formulation is described by Wulfsohn, M. S. and Tsiatis, A. A.
Wulfsohn, M. S. and Tsiatis, A. A. (1997) "A Joint Model for Survival and Longitudinal Data Measured with Error", Biometrics, 53, 330-339.
'lme','coxph','joint','jointcp','jointplot'.
data(heartlong,heartsurv) fit1=joint(heartlong,heartsurv)