| threetrees | R Documentation |
Refits the three trees selected by selectionplot on their
original bootstrap samples.
threetrees(x, selection)
## S3 method for class 'threetrees'
summary(object, ...)
## S3 method for class 'threetrees'
print(x, ...)
## S3 method for class 'threetrees'
predict(object, tree = 1, ...)
## S3 method for class 'threetrees'
plot(x, tree = 1, ...)
x |
A |
selection |
A |
object |
A |
... |
Additional arguments passed to |
tree |
Integer 1, 2, or 3 selecting which tree to plot. |
An object of class "threetrees". Use
summary.threetrees, predict.threetrees,
or plot.threetrees to inspect the results.
summary(threetrees): Print a brief summary of a threetrees object.
print(threetrees): Print method (calls summary).
predict(threetrees): Extract predicted values and terminal node
assignments from a threetrees object. Returns a data frame
with columns predict (predicted values) and
terminalnode (terminal node assignments).
plot(threetrees): Plot one of the three trees.
A convenience wrapper around treeplot.
Obata, R. and Sugimoto, T. (2026). A decision tree analysis for longitudinal measurement data and its applications. Advances in Data Analysis and Classification. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11634-025-00665-2")}
longitrees, selectionplot,
treeplot
data(ltreedata)
set.seed(10)
trees_res <- longitrees(y ~ ., time = "time", random = "subject",
weight = 0.5, data = ltreedata, alpha = 0.01,
bootsize = 50, mins = 40)
sel <- selectionplot(trees_res, metric = "PE", nth = 1)
tt <- threetrees(trees_res, selection = sel)
summary(tt)
predict(tt, tree = 1)
predict(tt, tree = 2)
predict(tt, tree = 3)
plot(tt, tree = 1)
plot(tt, tree = 2)
plot(tt, tree = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.