# Explanation of different testtype and teststats in ctree in party package of R

I was looking into the ctree function in the party package for R. In the ctree_control parameters I found the following options for teststat and testtype:

teststat = c("quad", "max")
testtype = c("Bonferroni", "Univariate", "Teststatistic")


Could someone please help me understand the details of each testtype and teststat, and when one should use each option. The documentation of the party package did not cover these in detail.

By default, ctree assesses the null hypothesis of no association between the response and all regressor variables using a quadratic correlation test statistic. Depending on whether the involved variables are numeric, categorical, or survival, different types of scores are used in these correlation tests. See also: What is the test statistics used for a conditional inference regression tree?

Alternatively, a maximally-selected statistic can be used which makes a difference if one of the score functions used are multivariate (e.g., for multi-level categorical variables).

And, by default, the resulting p-values are Bonferroni-corrected for multiple testing across the number of regressor variables. Alternatively, the Bonferroni correction can be omitted ("Univariate") or the test statistics themselves rather than their p-values can be used ("Teststatistic").

In most situations there should be no need to modify the defaults. For more details about the ctree algorithm see:

• vignette("ctree", package = "partykit") as well as the original manuscript: Torsten Hothorn, Kurt Hornik, Achim Zeileis (2006). Unbiased Recursive Partitioning: A Conditional Inference Framework. Journal of Computational and Graphical Statistics, 15(3), 651–674. doi:10.1198/106186006X133933

For the underlying conditional inference techniques:

• vignette("LegoCondInf", package = "coin") as well as the original manuscript: Torsten Hothorn, Kurt Hornik, Mark A. Van de Wiel, Achim Zeileis (2006). A Lego System for Conditional Inference. The American Statistician, 60(3), 257–263. doi:10.1198/000313006X118430