The function prints an rocTree
object. It is a method for the generic function print of class "rocTree
".
# S3 method for rocTree print(x, digits = 5, tree = NULL, ...)
x | an |
---|---|
digits | the number of digits of numbers to print. |
tree | an optional integer specifying the \(n^{th}\) tree in the forest to print.
The function prints the contents of an |
... | for future development. |
data(simDat) ## Fitting a pruned survival tree rocTree(Surv(Time, death) ~ z1 + z2, id = id, data = simDat, ensemble = FALSE)#> ROC-guided survival tree #> #> node), split #> * denotes terminal node #> #> Root #> ¦--2) z1 <= 0.32338 #> ¦ ¦--4) z1 <= 0.16418* #> ¦ °--5) z1 > 0.16418* #> °--3) z1 > 0.32338 #> ¦--6) z2 <= 0.60199 #> ¦ ¦--12) z2 <= 0.22388* #> ¦ °--13) z2 > 0.22388* #> °--7) z2 > 0.60199* #>## Fitting a unpruned survival tree rocTree(Surv(Time, death) ~ z1 + z2, id = id, data = simDat, ensemble = FALSE, control = list(numFold = 0))#> ROC-guided survival tree #> #> node), split #> * denotes terminal node #> #> Root #> ¦--2) z1 <= 0.32338 #> ¦ ¦--4) z1 <= 0.16418* #> ¦ °--5) z1 > 0.16418* #> °--3) z1 > 0.32338 #> ¦--6) z2 <= 0.60199 #> ¦ ¦--12) z2 <= 0.22388* #> ¦ °--13) z2 > 0.22388* #> °--7) z2 > 0.60199* #># NOT RUN { ## Fitting the ensemble algorithm (default) rocTree(Surv(Time, death) ~ z1 + z2, id = id, data = simDat, ensemble = TRUE) # }