rescale_statistic: Rescale a Node-Level Test Statistic for Stacking

View source: R/stackM.R

rescale_statisticR Documentation

Rescale a Node-Level Test Statistic for Stacking

Description

Divides a node-level chi-square test statistic by the number of imputations 'M' and recomputes the corresponding p-value. This is the Stack / M correction of Sherlock et al. (2026).

Usage

rescale_statistic(statistic, m, df)

Arguments

statistic

Numeric. The raw test statistic computed on the stacked data.

m

Integer. Number of imputations.

df

Numeric. Degrees of freedom of the reference chi-square distribution: the outcome dimension for a numeric or ordered predictor, '(L - 1)' times the outcome dimension for an unordered factor with 'L' levels. See [prune_stackM()], which derives this for you.

Details

Stacking 'M' imputed datasets produces 'M * n' rows, and a chi-square statistic computed on the stacked data scales approximately linearly with 'M'. Dividing the statistic by 'M' returns it to the scale of a single imputed dataset before the p-value is computed.

This is **not** the same as dividing the significance threshold by 'M'. The two rules coincide only at 'M = 1':

  • Statistic rescaling rejects when 'X > M * qchisq(1 - alpha, df)'.

  • Threshold rescaling rejects when 'X > qchisq(1 - alpha / M, df)'.

For 'df = 1', 'alpha = 0.05' and 'M = 30', the first requires 'X > 115.2' and the second only 'X > 9.9'. Versions 0.1.0 and 0.2.0 implemented the second rule.

Value

A list with 'statistic_rescaled' and 'p_value'.

References

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")}

Examples

rescale_statistic(115.2, m = 30, df = 1)


ctreeMI documentation built on July 27, 2026, 5:08 p.m.