jplm(formula.lm.y, nlm.par=NULL, data.y, formula.surv.fixed, formula.frailty, id.vec=NULL, transf.par=0, data.surv, degree=3, n.knots=3, CovEst=TRUE, maxiter=200, epsilon=5e-04,...)
lmer
. The right side of the formula describes both the linear fixed effects and random effects part of the longitudinal model. Random-effects terms are distinguished by one vertical bar (|) separating expressions for design matrices from grouping factors. Only one vertical var is allowed. formula.lm.y
. coxph
. That is, the response must be a survival object as returned by the Surv(,)
function, and the right side of formula must include only fixed effects covariates. ~ -1+...
or ~ 0+...
. formula.frailty
.transf.par=0
will fit a proportional hazards model, while transf.par=1
will fit a proportional odds model. Default is 0. formula.surv.fixed
.TRUE
, the covariate matrix of all the model parameters are estimated. coef.lm.y
,coef.nlm.y
, and var.resid
.raneff.vcomp
.coef.fixed.surv
, coef.frailty.surv
, and lambdas
.jplm
fits joint models for longitudinal and survival data. Viewing time-to-drop-out as an event process, the same joint models also can be fitted to longitudinal data with informative drop-outs. For more detailed formulation of these models, refer to Kim et al. (2016).
For the longitudinal model specification, all linear effects part (including fixed and random) should be described in formula.lm.y
, while a non-linear fixed effect component should be specified in the nlm.par
argument.
For the survival model specification, the fixed effects component should be described by the argument formula.surv.fixed
, whereas the random effects (frailty) component should be described in formula.frailty
. The current version assumes all random effects coefficients are the same.
For example, the argument formula.frailty= ~ 1+time
implies a regression model with $\phi(b_1 + b_2*time)$, where $b_1$ and $b_2$ represent the random intercept and slope terms and $\phi$ is one dimensional coefficient corresponding to both $b_1$ and $b_2$. A logarithmic transformation can be applied to the cumulative hazard function by varying the value of transf.par
. Specifically, the transformation function takes the form of: $H(x) = 0$ if transf.par=0
; otherwise $H(x) = log(1 + K)/K$ with transf.par=K
. transf.par=0
will fit a proportional hazards model, while transf.par=1
will fit a proportional odds model.
For AIC- or BIC-based model selection, CovEst=FALSE
is strongly recommended.
pred.jplm.nonlinear
,
pred.jplm.cumhaz
# a simulated data set of longitudinal responses
attach(prostate)
# a simulated data set of time-to-event (e.g., drop-out process)
attach(dropout)
# joint fit of a partially linear model and a proportional hazards model
# with a subject-specific random intercept and random slope
fit0 <- jplm(logPSA.postRT ~ logPSA.base + (1 + VisitTime|ID),
nlm.par=prostate$VisitTime, data.y=prostate,
Surv(DropTime, Status) ~ logPSA.base2,
formula.frailty= ~ 1 + DropTime,
id.vec=dropout$ID2, transf.par=0, data.surv=dropout)
summary(fit0)
Run the code above in your browser using DataLab