| report_ctreeMI | R Documentation |
Generates a short methods paragraph describing how a
ctree_stacked model was fit, populated with the actual
values used: the number of imputations, the original and stacked sample
sizes, the nominal and applied significance thresholds, and the size and
depth of the resulting tree. The paragraph is intended to be edited and
pasted into a manuscript, and it standardizes how the Stack/M correction
is described across studies.
report_ctreeMI(object, digits = 3)
object |
An object of class |
digits |
Integer. Significant digits used when reporting the applied significance threshold. |
The generated text describes the imputation and stacking workflow and the Stack/M threshold correction, and states that node sizes are reported on the original scale. It does not describe the imputation model itself, which is specific to the analysis and must be added by the author: the number of iterations, the variables included, and the imputation methods used should be reported alongside this paragraph.
An object of class "ctreeMI_report": a list whose
text element is the methods paragraph as a single character
string, alongside the underlying quantities (m,
n_original, n_stacked, alpha_nominal,
alpha_applied, n_terminal, max_depth,
formula) so they can be used programmatically. The print method
wraps and displays the paragraph.
Sherlock, P., Mansolf, M., Hofheimer, J., Hockett, C. W., O'Connor, T. G., Roubinov, D., Graff, J. C., Lai, J.-S., Bush, N. R., Wright, R. J., & Chiu, Y.-H. M. (2026). Beyond linear risk: A machine learning approach to understanding perinatal depression in context. Multivariate Behavioral Research, 1–16. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/00273171.2026.2661244")}
ctree_stacked, node_table
set.seed(1)
make_df <- function(i) {
set.seed(i)
n <- 200
x1 <- rnorm(n)
y <- 2 * (x1 > 0) + rnorm(n)
data.frame(y = y, x1 = x1)
}
imp_list <- lapply(1:10, make_df)
fit <- ctree_stacked(y ~ x1, data = imp_list, verbose = FALSE)
# Print the methods paragraph
report_ctreeMI(fit)
# Access the raw text or the underlying quantities
rep <- report_ctreeMI(fit)
rep$n_terminal
substr(rep$text, 1, 60)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.