Survival Trees to Fit Left-Truncated and Right-Censored and Interval-Censored Survival Data
Overview
Recursive partition algorithms designed for fitting survival trees with left-truncated and right-censored (LTRC) data, as well as interval-censored data. The LTRC trees can also be used to fit survival trees with time-varying covariates.
Install
Health
ERRORexamplesr-devel-linux-x86_64-debian-gcc
Running examples in ‘LTRCtrees-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: LTRCART
> ### Title: Fit a relative risk survival tree for LTRC data
> ### Aliases: LTRCART
>
> ### ** Examples
>
> ## The Assay of serum free light chain data in survival package
> ## Adjust data & clean data
> library(survival)
> library(LTRCtrees)
> Data <- flchain
> Data <- Data[!is.na(Data$creatinine),]
> Data$End <- Data$age + Data$futime/365
> DATA <- Data[Data$End > Data$age,]
> names(DATA)[6] <- "FLC"
>
> ## Setup training set and test set
> Train = DATA[1:500,]
> Test = DATA[1000:1020,]
>
> ## Fit LTRCART survival tree
> ## make sure to attach survival package (by library(survival) ) before using Surv function
> LTRCART.obj <- LTRCART(Surv(age, End, death) ~ sex + FLC + creatinine, Train)
Error in a$specials[[i]] : subscript out of bounds
Calls: LTRCART ... survfit.coxph -> model.matrix.coxph -> delete.response -> off
Execution haltedERRORre-building of vignette outputsr-devel-linux-x86_64-debian-gcc
Error(s) in re-building vignettes:
...
--- re-building ‘LTRCtrees.Rmd’ using rmarkdown
Quitting from LTRCtrees.Rmd:47-62 [unnamed-chunk-3]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `a$specials[[i]]`:
! subscript out of bounds
---
Backtrace:
▆
1. └─LTRCtrees::LTRCART(...)
2. └─survival::basehaz(temp)
3. ├─survival::survfit(fit, se.fit = FALSE)
4. └─survival:::survfit.coxph(fit, se.fit = FALSE)
5. └─survival:::model.matrix.coxph(object, data = mf)
6. └─stats::delete.response(object$terms)
7. └─stats (local) off(a$specials[[i]])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'LTRCtrees.Rmd' failed with diagnostics:
subscript out of bounds
--- failed re-building ‘LTRCtrees.Rmd’
SUMMARY: processing the following file failed:
‘LTRCtrees.Rmd’
Error: Vignette re-building failed.
Execution halted- ERROR12 OK, 1 ERROR2026-10-24
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
Show 1 earlier changeHide 1 earlier change
- OK14 OK2026-03-10
Documentation
- Help pages
- 6
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 96%
- Return-value docs
- 100%
- Help pages citing references
- 50%
Downloads
Dependencies
Installing LTRCtrees adds 15 packages (9 with compiled code, 12 MB of source tarballs). Heaviest: partykit 2.1 MB, Rcpp 1.8 MB, RcppEigen 1.7 MB.
Code & Tests
People & History
Previously maintained by Wei Fu (0.1.0 to 1.1.0).
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 1.1.2Latest
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- unarchivedReturned to CRAN2021-01-13
- 1.1.12021-01-13 · diff ↗
- archivedRemoved from CRAN2020-10-03check issues were not corrected in time
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- 1.1.02018-03-29 · diff ↗
- 1.0.02018-01-06 · diff ↗
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2016-06-12
- Total releases
- 7 / 10 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.2.0
- Download size
- 300 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("LTRCtrees")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.