jlctree {jlctree} | R Documentation |
Fits Joint Latent Class Tree (JLCT) model.
Description
Fits Joint Latent Class Tree model.
This is the main function that is normally called by the user.
See jlctree-package
for more details.
Usage
jlctree(survival, classmb, fixed, random, subject, data, parms = list(),
control = list())
Arguments
survival |
a two-sided formula object; required. The left side of the formula corresponds
to a |
classmb |
one-sided formula describing the covariates in the class-membership tree construction; required.
Covariates used for tree construction are separated by |
fixed |
two-sided linear formula object for the fixed-effects in the linear mixed-effects model for
longitudinal outcomes; required.
The longitudinal outcome is on the left of |
random |
one-sided formula for the node-specific random effects in the linear mixed-effects model for
longitudinal outcomes; optional.
If missing, there are no node-specific random effects in the fitted linear mixed-effects model.
Covariates with a random effect are separated by |
subject |
name of the covariate representing the subject identifier; optional. If missing, there are no subject-specific random intercepts in the fitted linear mixed-effects model for longitudinal outcomes. |
data |
the dataset; required. |
parms |
parameter list of Joint Latent Class Tree model parameters.
See also |
control |
|
Value
A list with components:
tree |
an |
control |
the |
parms |
the |
lmmmodel |
an |
coxphmodel_diffh_diffs |
a |
coxphmodel_diffh |
a |
coxphmodel_diffs |
a |
See Also
jlctree-package, jlctree.control, rpart.control
Examples
# Time-to-event in LTRC format:
data(data_timevar)
tree <- jlctree(survival=Surv(time_L, time_Y, delta)~X3+X4+X5,
classmb=~X1+X2, fixed=y~X1+X2+X3+X4+X5, random=~1,
subject='ID',data=subset(data_timevar, ID<=30),
parms=list(maxng=4, fity=FALSE, fits=FALSE))
# Time-to-event in right-censored format:
data(data_timeinv)
tree <- jlctree(survival=Surv(time_Y, delta)~X3+X4+X5,
classmb=~X1+X2, fixed=y~X1+X2+X3+X4+X5, random=~1,
subject='ID', data=subset(data_timeinv, ID<=30),
parms=list(maxng=4, fity=FALSE, fits=FALSE))