jlctree: Fits Joint Latent Class Tree (JLCT) model.

Description Usage Arguments Value See Also Examples

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

1
2
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 Surv() object of type “counting” for left-truncated right-censored (LTRC) data, or of type “right” for right-censored data. The right side of the formula specifies the names of covariates to include in the survival model, excluding the longitudinal outcome.

classmb

one-sided formula describing the covariates in the class-membership tree construction; required. Covariates used for tree construction are separated by + on the right of ~.

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 ~ and the covariates are separated by + on the right 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 + on the right of ~.

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 jlctree.control.

control

rpart control parameters. See also rpart.control.

Value

A list with components:

tree

an rpart object, containing the constructed Joint Latent Class tree.

control

the rpart.control parameters.

parms

the jlctree.control parameters.

lmmmodel

an lme4 object, containing the linear mixed-effects effects model with fixed effects, node-specific random effects (if valid), and subject-specific random intercepts (if valid). Returned when fity is TRUE.

coxphmodel_diffh_diffs

a coxph object, containing a Cox PH model with different hazards and different slopes across terminal nodes. Returned when fits is TRUE.

coxphmodel_diffh

a coxph object, containing a Cox PH model with different hazards but same slopes across terminal nodes. Returned when fits is TRUE.

coxphmodel_diffs

a coxph object, containing a Cox PH model with same hazards but different slopes across terminal nodes. Returned when fits is TRUE.

See Also

jlctree-package, jlctree.control, rpart.control

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 # 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))

jlctree documentation built on April 15, 2021, 5:06 p.m.