| treeplot | R Documentation |
Visualises the structure of a decision tree for longitudinal
data. Built on ggparty. Each split node displays the node
number, split variable, p-value, and weight w. Each
terminal node displays the node number, sample size N, and the
intercept (\hat\beta_0) and slope (\hat\beta_1) from a
linear mixed-effects model fitted within that node. Individual
longitudinal trajectories are shown as dashed lines; the predicted
values (average at each time point) are shown as solid lines, with the
response variable on the vertical axis and time on the horizontal axis.
treeplot(
x,
tree = NULL,
snsize = 50,
spsize = 5,
plotsize = 80,
linesize1 = 0.3,
linesize2 = 1,
tnsize = 60
)
x |
A |
tree |
Integer 1, 2, or 3 selecting which tree to plot when |
snsize |
Split-node label size (default 50). |
spsize |
Split-point label size (default 5). |
plotsize |
Overall plot size (default 80). |
linesize1 |
Branch line width (default 0.3). |
linesize2 |
Main line width (default 1). |
tnsize |
Terminal-node label size (default 60). |
A ggplot2/ggparty object.
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")}
longitree, threetrees
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.