| rescale_statistic | R Documentation |
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).
rescale_statistic(statistic, m, df)
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. |
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.
A list with 'statistic_rescaled' and 'p_value'.
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")}
rescale_statistic(115.2, m = 30, df = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.