| node_table | R Documentation |
Summarizes the nodes of a fitted tree: the split path leading to each node,
its size in the stacked data, its effective size in original observations
(stacked size divided by M), and node-level outcome summaries.
node_table(object, terminal_only = TRUE, max_levels = NULL, digits = 3)
object |
A |
terminal_only |
Logical. Report terminal nodes only (default), or every node including the root. |
max_levels |
Integer or |
digits |
Number of digits for the outcome summaries. |
Terminal-node sample sizes printed by partykit refer to the stacked data,
in which every observation appears M times. effective_n divides by M
to give the number of original observations behind each node. Node-level
means and proportions need no such adjustment: they are already averages
over the imputations.
A data frame of class "ctreeMI_nodes" with one row per node:
node_id, depth, n_stacked, effective_n, any outcome summaries,
path, and a conditions list column holding the split conditions
individually.
ctree_stacked(), report_ctreeMI()
set.seed(1)
imps <- lapply(1:5, function(i) {
x <- stats::rnorm(200)
data.frame(x = x, y = stats::rnorm(200) + 1.5 * (x > 0))
})
fit <- ctree_stacked(y ~ x, data = imps, verbose = FALSE)
node_table(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.