| ctreeMI-package | R Documentation |
Implements the stacked-imputation workflow for conditional inference trees ('ctree') described in Sherlock et al. (2026) <doi:10.1080/00273171.2026.2661244>. When data contain missing values, multiply imputed datasets (e.g., from 'mice') are stacked vertically and a single 'ctree' is fit on the combined data. To correct for the artificially inflated sample size introduced by stacking, each node-level test statistic is divided by the number of imputations M and its p-value recomputed before nodes are pruned (the Stack/M correction), producing a conservative but interpretable single tree that incorporates imputation uncertainty without requiring pooling of structurally different trees. Also exports stack_imputations(), rescale_statistic() and prune_stackM() as standalone utilities. The underlying 'ctree' algorithm is provided by 'partykit' (Hothorn & Zeileis, 2015; Hothorn, Hornik & Zeileis, 2006 <doi:10.1198/106186006X133933>).
The main function is ctree_stacked, which accepts a
mids object from mice, a list of imputed data frames, or a
plain data frame. It returns a ctreeMI object that inherits from
partykit's constparty class, so all standard methods
(plot, predict, nodeids, etc.)
work without modification.
Two utility functions are also exported:
stack_imputations (stack a list of data frames) and
rescale_alpha (compute alpha / M).
Phillip Sherlock [aut, cre] (ORCID: <https://orcid.org/0000-0003-0433-3681>)
Maintainer: Phillip Sherlock <phillip.sherlock@ufl.edu>
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")}
Hothorn, T., Hornik, K., & Zeileis, A. (2006). Unbiased recursive partitioning: A conditional inference framework. Journal of Computational and Graphical Statistics, 15(3), 651–674. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/106186006X133933")}
Hothorn, T., & Zeileis, A. (2015). partykit: A modular toolkit for recursive partitioning in R. Journal of Machine Learning Research, 16, 3905–3909.
ctree_stacked,
stack_imputations,
rescale_alpha,
ctree,
mice
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.